ngwr 16.2.0 → 16.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/carousel/styles/_index.scss +53 -1
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +19 -0
- package/dropdown/styles/_index.scss +13 -19
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel-testing.mjs +24 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +73 -10
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +45 -37
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +28 -13
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +342 -69
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +59 -8
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +70 -99
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +279 -16
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +30 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +664 -43
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +27 -8
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +27 -8
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +27 -8
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +27 -8
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +27 -8
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +27 -8
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +27 -8
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +27 -8
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +27 -8
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +27 -8
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +27 -8
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +27 -8
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +27 -8
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +27 -8
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +27 -8
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +27 -8
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +27 -8
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +27 -8
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +27 -8
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +27 -8
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +6 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +31 -29
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +416 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +361 -84
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +6 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +29 -12
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +157 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1051 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +19 -15
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +978 -79
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +97 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +29 -8
- package/i18n/cs.json +29 -8
- package/i18n/de.json +29 -8
- package/i18n/en.json +29 -8
- package/i18n/es.json +29 -8
- package/i18n/fr.json +29 -8
- package/i18n/he.json +29 -8
- package/i18n/hi.json +29 -8
- package/i18n/id.json +29 -8
- package/i18n/it.json +29 -8
- package/i18n/ja.json +29 -8
- package/i18n/ko.json +29 -8
- package/i18n/nl.json +29 -8
- package/i18n/pl.json +29 -8
- package/i18n/pt.json +29 -8
- package/i18n/ru.json +29 -8
- package/i18n/sv.json +29 -8
- package/i18n/tr.json +29 -8
- package/i18n/uk.json +29 -8
- package/i18n/vi.json +29 -8
- package/i18n/zh-TW.json +29 -8
- package/i18n/zh.json +29 -8
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +53 -21
- package/llms.txt +57 -24
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +33 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +5 -0
- package/select/styles/_index.scss +127 -22
- package/skills/ngwr/SKILL.md +31 -4
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +191 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +16 -1
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-carousel-testing.d.ts +27 -6
- package/types/ngwr-carousel.d.ts +42 -6
- package/types/ngwr-cascader.d.ts +13 -6
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-context-menu.d.ts +2 -0
- package/types/ngwr-date-picker-testing.d.ts +23 -8
- package/types/ngwr-date-picker.d.ts +100 -9
- package/types/ngwr-date.d.ts +71 -1
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +20 -0
- package/types/ngwr-dropdown.d.ts +26 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +156 -3
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +36 -3
- package/types/ngwr-graph.d.ts +309 -13
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +2 -1
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +149 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +3 -1
- package/types/ngwr-slider.d.ts +21 -1
- package/types/ngwr-sortable-list.d.ts +6 -0
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +122 -7
- package/types/ngwr-table.d.ts +572 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +11 -2
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +335 -12
- package/types/ngwr-utils.d.ts +107 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-graph.mjs","names":[],"sources":["../../../projects/lib/graph/graph-node-template.ts","../../../projects/lib/graph/internal/layout/order.ts","../../../projects/lib/graph/internal/layout/position.ts","../../../projects/lib/graph/internal/layout/prepare.ts","../../../projects/lib/graph/internal/layout/rank.ts","../../../projects/lib/graph/internal/layout/route.ts","../../../projects/lib/graph/internal/layout/types.ts","../../../projects/lib/graph/internal/layout/layered-layout.ts","../../../projects/lib/graph/graph.ts","../../../projects/lib/graph/graph.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, TemplateRef, inject } from '@angular/core';\n\nimport type { WrGraphNodeContext } from './types';\n\n/**\n * Replace the default card. The node is the implicit context; its box — the\n * size the layout reserved, its position and the relation text read to a screen\n * reader — stays with the graph, so a template cannot break the geometry.\n *\n * Render `node.label` somewhere in it: the relation text of every neighbour\n * names this node by its label.\n *\n * @example\n * ```html\n * <wr-graph [nodes]=\"nodes\" [edges]=\"edges\">\n * <ng-template wrGraphNode let-node>\n * <strong>{{ node.label }}</strong> {{ node.data.role }}\n * </ng-template>\n * </wr-graph>\n * ```\n */\n@Directive({\n selector: 'ng-template[wrGraphNode]',\n})\nexport class WrGraphNodeTemplate {\n readonly template = inject<TemplateRef<WrGraphNodeContext>>(TemplateRef);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { LayeredGraph } from './rank';\n\n/** Gansner's cap. Counted in sweeps, never in time, so a slow machine draws the same picture. */\nconst MAX_SWEEPS = 24;\nconst MAX_STALE_SWEEPS = 4;\n\ninterface Candidate {\n readonly item: number;\n readonly sum: number;\n readonly count: number;\n readonly slot: number;\n}\n\n/**\n * Depth-first from every item in rank order, placing each item as it is first\n * reached. A tree comes out with no crossings before a single sweep runs, and\n * the sweeps only ever keep a strictly better order, so a tree stays that way.\n */\nfunction initialOrder(graph: LayeredGraph): number[][] {\n const layers: number[][] = Array.from({ length: graph.rankCount }, () => []);\n const byRank: number[][] = Array.from({ length: graph.rankCount }, () => []);\n graph.rank.forEach((rank, item) => byRank[rank].push(item));\n const visited = graph.rank.map(() => false);\n\n for (const bucket of byRank) {\n for (const start of bucket) {\n const stack = [start];\n for (let item = stack.pop(); item !== undefined; item = stack.pop()) {\n if (visited[item]) continue;\n visited[item] = true;\n layers[graph.rank[item]].push(item);\n // Pushed in reverse so the first child is visited first, as a recursive DFS would.\n const below = graph.down[item];\n for (let i = below.length - 1; i >= 0; i--) if (!visited[below[i]]) stack.push(below[i]);\n }\n }\n }\n return layers;\n}\n\n/**\n * Re-sorts one layer by the barycenter of each item's neighbours on the\n * reference layer. Items with no such neighbour are lifted out BEFORE the sort\n * and keep their slot: a comparator asked to rank \"no barycenter\" against a\n * number has no consistent answer, and an inconsistent comparator sorts\n * differently in different engines.\n *\n * Barycenters are compared exactly. They are means of integer slot indices, so\n * `sumA / countA < sumB / countB` becomes `sumA * countB < sumB * countA`, which\n * stays in exact integer arithmetic at any size this component draws. Ties fall\n * back to the current slot, so the comparator is total.\n */\nfunction reorder(layer: number[], neighbours: LayeredGraph['up'], slotOf: number[]): void {\n const candidates: Candidate[] = [];\n layer.forEach((item, slot) => {\n const adjacent = neighbours[item];\n if (adjacent.length === 0) return;\n let sum = 0;\n for (const other of adjacent) sum += slotOf[other];\n candidates.push({ item, sum, count: adjacent.length, slot });\n });\n const slots = candidates.map(candidate => candidate.slot);\n candidates.sort((a, b) => a.sum * b.count - b.sum * a.count || a.slot - b.slot);\n candidates.forEach((candidate, k) => {\n layer[slots[k]] = candidate.item;\n slotOf[candidate.item] = slots[k];\n });\n}\n\n/**\n * Crossings between adjacent layers, counted pairwise. Quadratic in the\n * segments between one pair of layers, which at the few hundred edges this\n * component is meant for is cheaper to trust than an accumulator tree.\n * Two segments sharing an end never count: their product is zero.\n */\nexport function countCrossings(layers: readonly (readonly number[])[], down: readonly (readonly number[])[]): number {\n const slotOf: number[] = down.map(() => 0);\n for (const layer of layers) layer.forEach((item, slot) => (slotOf[item] = slot));\n\n let crossings = 0;\n for (let r = 0; r + 1 < layers.length; r++) {\n const top: number[] = [];\n const bottom: number[] = [];\n for (const item of layers[r]) {\n for (const next of down[item]) {\n top.push(slotOf[item]);\n bottom.push(slotOf[next]);\n }\n }\n for (let i = 0; i < top.length; i++) {\n for (let j = i + 1; j < top.length; j++) {\n if ((top[i] - top[j]) * (bottom[i] - bottom[j]) < 0) crossings++;\n }\n }\n }\n return crossings;\n}\n\n/**\n * Stage 5. Alternating down and up barycenter sweeps, keeping the best order\n * seen. \"Best\" moves only on a strict improvement, so an equally good later\n * order never displaces an earlier one.\n */\nexport function orderLayers(graph: LayeredGraph): number[][] {\n const layers = initialOrder(graph);\n const slotOf: number[] = graph.rank.map(() => 0);\n for (const layer of layers) layer.forEach((item, slot) => (slotOf[item] = slot));\n\n let best = layers.map(layer => layer.slice());\n let fewest = countCrossings(layers, graph.down);\n for (let sweep = 0, stale = 0; sweep < MAX_SWEEPS && stale < MAX_STALE_SWEEPS && fewest > 0; sweep++) {\n if (sweep % 2 === 0) {\n for (let r = 1; r < layers.length; r++) reorder(layers[r], graph.up, slotOf);\n } else {\n for (let r = layers.length - 2; r >= 0; r--) reorder(layers[r], graph.down, slotOf);\n }\n const crossings = countCrossings(layers, graph.down);\n if (crossings < fewest) {\n fewest = crossings;\n best = layers.map(layer => layer.slice());\n stale = 0;\n } else {\n stale++;\n }\n }\n return best;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { LayeredGraph } from './rank';\n\n/** Four down passes and four up passes, alternating, ending on up so parents settle over their children. */\nconst COORDINATE_PASSES = 8;\n\nfunction separation(extents: ItemExtents, a: number, b: number): number {\n return extents.right[a] + extents.halfGap[a] + extents.halfGap[b] + extents.left[b];\n}\n\n/**\n * Moves one layer toward the mean x of each item's neighbours on the reference\n * layer, without reordering it and without letting two items come closer than\n * their separation.\n *\n * Why the result never overlaps: F is built left to right as\n * `F[i] = max(desired[i], F[i-1] + sep[i])`, so `F[i] - F[i-1] >= sep[i]`; B is\n * built right to left as `B[i] = min(desired[i], B[i+1] - sep[i+1])`, so\n * `B[i+1] - B[i] >= sep[i+1]`. Both are feasible on their own, and the average\n * of two feasible placements is feasible, because\n * `(F[i] + B[i]) / 2 - (F[i-1] + B[i-1]) / 2` is half of a sum of two terms that\n * are each at least `sep[i]`. That holds whatever the desired positions are,\n * which is why no pass needs to repair a previous one. Averaging the two is also\n * what keeps a crowded layer centred on what it wants instead of piled to one\n * side.\n */\nfunction align(layer: readonly number[], neighbours: LayeredGraph['up'], x: number[], extents: ItemExtents): void {\n const desired = layer.map(item => {\n const adjacent = neighbours[item];\n if (adjacent.length === 0) return x[item];\n let sum = 0;\n for (const other of adjacent) sum += x[other];\n return sum / adjacent.length;\n });\n const forward = desired.slice();\n for (let i = 1; i < layer.length; i++) {\n forward[i] = Math.max(desired[i], forward[i - 1] + separation(extents, layer[i - 1], layer[i]));\n }\n const backward = desired.slice();\n for (let i = layer.length - 2; i >= 0; i--) {\n backward[i] = Math.min(desired[i], backward[i + 1] - separation(extents, layer[i], layer[i + 1]));\n }\n layer.forEach((item, i) => (x[item] = (forward[i] + backward[i]) / 2));\n}\n\n/**\n * Per item, the room it needs around its anchor x. The two sides differ for a\n * node with a self-loop, whose right side also holds the loop.\n */\nexport interface ItemExtents {\n readonly left: readonly number[];\n readonly right: readonly number[];\n /** Half the gap the item keeps to a neighbour: half of `nodeGap` for a node, half of `edgeGap` for a dummy. */\n readonly halfGap: readonly number[];\n /** What the item contributes to its layer's height — zero for a dummy. */\n readonly height: readonly number[];\n}\n\n/** Stage 6, horizontal: the anchor x of every item, starting packed and relaxing toward neighbours. */\nexport function placeItems(\n layers: readonly (readonly number[])[],\n graph: LayeredGraph,\n extents: ItemExtents\n): number[] {\n const x: number[] = graph.rank.map(() => 0);\n for (const layer of layers) {\n layer.forEach((item, i) => {\n x[item] = i === 0 ? extents.left[item] : x[layer[i - 1]] + separation(extents, layer[i - 1], item);\n });\n }\n for (let pass = 0; pass < COORDINATE_PASSES; pass++) {\n if (pass % 2 === 0) {\n for (let r = 1; r < layers.length; r++) align(layers[r], graph.up, x, extents);\n } else {\n for (let r = layers.length - 2; r >= 0; r--) align(layers[r], graph.down, x, extents);\n }\n }\n return x;\n}\n\n/**\n * Stage 6, vertical: a layer is as tall as its tallest node, layers are\n * `layerGap` apart, and every item is centred in its layer — so a short node\n * beside a tall one still lines up with it. The layer's band is\n * `centre ± half`, written the way a node's border is (`centre ± height / 2`),\n * so the tallest node's border and the band's edge are the same number.\n */\nexport function layerCentres(\n layers: readonly (readonly number[])[],\n extents: ItemExtents,\n layerGap: number\n): { readonly centre: readonly number[]; readonly half: readonly number[]; readonly height: number } {\n const centre: number[] = [];\n const half: number[] = [];\n let top = 0;\n layers.forEach((layer, r) => {\n let tallest = 0;\n for (const item of layer) tallest = Math.max(tallest, extents.height[item]);\n if (r > 0) top += layerGap;\n half.push(tallest / 2);\n centre.push(top + tallest / 2);\n top += tallest;\n });\n return { centre, half, height: top };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrGraphLayoutEdge, WrGraphLayoutInput, WrGraphLayoutNode } from './types';\n\n/** An edge inside one component, its ends as LOCAL node indices. `slot` is its place in the result. */\nexport interface ComponentEdge {\n readonly slot: number;\n readonly from: number;\n readonly to: number;\n}\n\n/** One weakly connected component. A node's position in `nodes` is its local index. */\nexport interface GraphComponent {\n /** Indices into `PreparedGraph.nodes`, ascending — so local order is still input order. */\n readonly nodes: readonly number[];\n /** Edges between two different nodes, in input order. Parallel edges are kept. */\n readonly edges: readonly ComponentEdge[];\n /** Self-loops, in input order. They take no part in ranking or ordering. */\n readonly loops: readonly ComponentEdge[];\n}\n\nexport interface PreparedGraph {\n /** Unique nodes in input order. */\n readonly nodes: readonly WrGraphLayoutNode[];\n /** Kept edges in input order; an edge's index here is its `slot`. */\n readonly edges: readonly WrGraphLayoutEdge[];\n /** Ordered by each component's smallest node index. */\n readonly components: readonly GraphComponent[];\n}\n\n/**\n * Stage 1. Ids become integer indices in input order and everything after this\n * works on arrays: a plain object keyed by id would enumerate `'2'` before\n * `'10'` whatever order the consumer gave, which is exactly the trap that makes\n * one graph draw two ways.\n *\n * A duplicate id keeps its first occurrence and an edge naming a missing node is\n * dropped. Both are the component's to warn about; the layout only has to\n * survive them.\n */\nexport function prepareGraph(input: WrGraphLayoutInput): PreparedGraph {\n const index = new Map<string, number>();\n const nodes: WrGraphLayoutNode[] = [];\n for (const node of input.nodes) {\n if (index.has(node.id)) continue;\n index.set(node.id, nodes.length);\n nodes.push(node);\n }\n\n const edges: WrGraphLayoutEdge[] = [];\n const ends: (readonly [number, number])[] = [];\n for (const edge of input.edges) {\n const from = index.get(edge.from);\n const to = index.get(edge.to);\n if (from === undefined || to === undefined) continue;\n edges.push(edge);\n ends.push([from, to]);\n }\n\n // Weakly connected components by BFS, started from each unassigned node in\n // input order — so component numbers already follow the smallest index.\n const neighbours: number[][] = nodes.map(() => []);\n for (const [from, to] of ends) {\n neighbours[from].push(to);\n neighbours[to].push(from);\n }\n const componentOf: number[] = nodes.map(() => -1);\n const components: { nodes: number[]; edges: ComponentEdge[]; loops: ComponentEdge[] }[] = [];\n for (let start = 0; start < nodes.length; start++) {\n if (componentOf[start] !== -1) continue;\n componentOf[start] = components.length;\n const queue = [start];\n // `for...of` over an array that grows while it is read visits the appended nodes too.\n for (const current of queue) {\n for (const next of neighbours[current]) {\n if (componentOf[next] !== -1) continue;\n componentOf[next] = components.length;\n queue.push(next);\n }\n }\n components.push({ nodes: [], edges: [], loops: [] });\n }\n\n const local: number[] = [];\n nodes.forEach((_, node) => {\n const component = components[componentOf[node]];\n local.push(component.nodes.length);\n component.nodes.push(node);\n });\n ends.forEach(([from, to], slot) => {\n const component = components[componentOf[from]];\n const edge = { slot, from: local[from], to: local[to] };\n (from === to ? component.loops : component.edges).push(edge);\n });\n\n return { nodes, edges, components };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ComponentEdge } from './prepare';\n\ninterface Frame {\n readonly node: number;\n next: number;\n}\n\n/**\n * Stage 2. Depth-first search from the sources in input order, then from\n * whatever is left; an edge into the current stack closes a cycle and is\n * reversed. A back edge points at an ancestor on the current path, so both of\n * its ends are in one strongly connected component by construction — no SCC\n * pass is needed here. The stack is explicit because a long chain would\n * otherwise recurse once per node.\n */\nfunction findBackEdges(count: number, edges: readonly ComponentEdge[]): boolean[] {\n const out: number[][] = Array.from({ length: count }, () => []);\n const indegree: number[] = new Array<number>(count).fill(0);\n edges.forEach((edge, k) => {\n out[edge.from].push(k);\n indegree[edge.to]++;\n });\n\n const reversed = edges.map(() => false);\n const visited: boolean[] = new Array<boolean>(count).fill(false);\n const onStack: boolean[] = new Array<boolean>(count).fill(false);\n const nodes = Array.from({ length: count }, (_, node) => node);\n const starts = [...nodes.filter(node => indegree[node] === 0), ...nodes.filter(node => indegree[node] !== 0)];\n\n for (const start of starts) {\n if (visited[start]) continue;\n visited[start] = onStack[start] = true;\n const stack: Frame[] = [{ node: start, next: 0 }];\n while (stack.length > 0) {\n const frame = stack[stack.length - 1];\n if (frame.next === out[frame.node].length) {\n onStack[frame.node] = false;\n stack.pop();\n continue;\n }\n const k = out[frame.node][frame.next++];\n const to = edges[k].to;\n if (onStack[to]) {\n reversed[k] = true;\n } else if (!visited[to]) {\n visited[to] = onStack[to] = true;\n stack.push({ node: to, next: 0 });\n }\n }\n }\n return reversed;\n}\n\n/**\n * Stage 3. Longest path from the sources: a node sits one rank below its\n * deepest parent, so an org chart keeps a leaf directly under its manager\n * rather than sinking every leaf to the bottom rank the way a sink-based\n * longest path does. Network simplex would be more compact and is several\n * times the code; this is the simplest ranking that reads well.\n *\n * The one tightening pass fixes the cost this ranking is known for: a root\n * whose only child is deep would otherwise sit on rank 0 and draw a long edge\n * through every rank in between. Only a node with no incoming edge moves, and it\n * moves to just above its highest child — so no other node's rank changes and\n * every rank stays occupied.\n */\nfunction assignRanks(count: number, from: readonly number[], to: readonly number[]): number[] {\n const out: number[][] = Array.from({ length: count }, () => []);\n const indegree: number[] = new Array<number>(count).fill(0);\n from.forEach((node, k) => {\n out[node].push(to[k]);\n indegree[to[k]]++;\n });\n\n // Kahn's algorithm with a FIFO queue seeded in input order.\n const rank: number[] = new Array<number>(count).fill(0);\n const remaining = indegree.slice();\n const order: number[] = [];\n for (let node = 0; node < count; node++) if (indegree[node] === 0) order.push(node);\n // `for...of` over an array that grows while it is read visits the appended nodes too.\n for (const node of order) {\n for (const child of out[node]) {\n rank[child] = Math.max(rank[child], rank[node] + 1);\n if (--remaining[child] === 0) order.push(child);\n }\n }\n\n for (let i = order.length - 1; i >= 0; i--) {\n const node = order[i];\n if (indegree[node] !== 0 || out[node].length === 0) continue;\n let highest = rank[out[node][0]];\n for (const child of out[node]) highest = Math.min(highest, rank[child]);\n if (highest - 1 > rank[node]) rank[node] = highest - 1;\n }\n\n let lowest = rank[0];\n for (const value of rank) lowest = Math.min(lowest, value);\n return rank.map(value => value - lowest);\n}\n\n/** An edge after cycle removal and dummy insertion. */\nexport interface LayeredEdge {\n readonly slot: number;\n /** Whether the edge runs child-to-parent in the layout. Its route is reversed at the end. */\n readonly reversed: boolean;\n /** Items from the upper end to the lower end, one per rank: real node, dummies, real node. */\n readonly chain: readonly number[];\n}\n\n/**\n * A proper layered graph: every edge segment spans exactly one rank. Items\n * `0..n-1` are the real nodes in local input order, dummies are appended after\n * them — integer indices rather than generated names, so nothing depends on a\n * counter that outlives the call.\n */\nexport interface LayeredGraph {\n readonly rank: readonly number[];\n readonly rankCount: number;\n /** Per item, its neighbours one rank up, in edge order (a parallel edge appears twice). */\n readonly up: readonly (readonly number[])[];\n /** Per item, its neighbours one rank down, in edge order. */\n readonly down: readonly (readonly number[])[];\n readonly edges: readonly LayeredEdge[];\n}\n\n/**\n * Stages 2–4 for one connected component: break cycles, rank, and give every\n * edge that spans k ranks its own chain of k − 1 zero-size dummies, so parallel\n * long edges stay apart instead of sharing one.\n */\nexport function layerGraph(count: number, edges: readonly ComponentEdge[]): LayeredGraph {\n const reversed = findBackEdges(count, edges);\n const upper = edges.map((edge, k) => (reversed[k] ? edge.to : edge.from));\n const lower = edges.map((edge, k) => (reversed[k] ? edge.from : edge.to));\n const rank = assignRanks(count, upper, lower);\n\n const up: number[][] = Array.from({ length: count }, () => []);\n const down: number[][] = Array.from({ length: count }, () => []);\n const layered = edges.map((edge, k): LayeredEdge => {\n const chain = [upper[k]];\n for (let r = rank[upper[k]] + 1; r < rank[lower[k]]; r++) {\n chain.push(rank.length);\n rank.push(r);\n up.push([]);\n down.push([]);\n }\n chain.push(lower[k]);\n for (let i = 1; i < chain.length; i++) {\n down[chain[i - 1]].push(chain[i]);\n up[chain[i]].push(chain[i - 1]);\n }\n return { slot: edge.slot, reversed: reversed[k], chain };\n });\n\n let rankCount = 0;\n for (const value of rank) rankCount = Math.max(rankCount, value + 1);\n return { rank, rankCount, up, down, edges: layered };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ComponentEdge } from './prepare';\nimport type { LayeredGraph } from './rank';\nimport type { WrGraphPoint } from './types';\n\n/** Room between a node's right border and the ends of its self-loops, where the arrowhead lands. */\nconst LOOP_CLEARANCE = 4;\n\ninterface Port {\n readonly edge: number;\n /** The item at the other end of the first or last segment — a dummy or a node. */\n readonly toward: number;\n}\n\n/**\n * Spreads k ports along one side of each node, ordered by where each edge\n * heads next so that ports on one side never cross each other; ties go to the\n * earlier edge. Without the spread, parallel edges between adjacent layers\n * would draw as one line. The inset shrinks to a quarter of the width on a\n * narrow node, so any node wider than zero keeps half its side for the spread\n * instead of stacking every port on its centre.\n */\nfunction assignPorts(\n sides: readonly (readonly Port[])[],\n geometry: RouteGeometry,\n portGap: number,\n inset: number,\n into: number[]\n): void {\n sides.forEach((ports, node) => {\n const sorted = ports.slice().sort((a, b) => {\n const ax = geometry.x[a.toward];\n const bx = geometry.x[b.toward];\n return ax < bx ? -1 : ax > bx ? 1 : a.edge - b.edge;\n });\n const room = geometry.width[node] - 2 * Math.min(inset, geometry.width[node] / 4);\n const spread = Math.max(0, Math.min(room, (sorted.length - 1) * portGap));\n const step = sorted.length > 1 ? spread / (sorted.length - 1) : 0;\n sorted.forEach((port, j) => (into[port.edge] = geometry.x[node] - spread / 2 + j * step));\n });\n}\n\n/** Everything routing reads: anchors per item, centres and band half-heights per rank, real sizes per node. */\nexport interface RouteGeometry {\n readonly x: readonly number[];\n readonly centreY: readonly number[];\n /** Half of each rank's tallest node: the rank's band spans `centreY ± halfBand`. */\n readonly halfBand: readonly number[];\n readonly width: readonly number[];\n readonly height: readonly number[];\n}\n\n/** How far right a node's layout box grows to hold its self-loops. */\nexport function loopReserve(loops: number, step: number): number {\n return loops === 0 ? 0 : LOOP_CLEARANCE + loops * step;\n}\n\n/**\n * Stage 8. Out of the bottom side, through each dummy, into the top side — as\n * vertical stretches inside the layer bands joined by exactly one stretch per\n * inter-layer gap: straight down from the port to the bottom of its node's band,\n * straight through every intermediate band at the dummy's x (a point on the\n * band's top and one on its bottom), and straight down from the top of the\n * child's band to its port.\n *\n * Why bands and not a bend at each dummy's centre: the component draws a\n * stretch as a cubic whose control points sit at the stretch's middle height,\n * so a stretch that ended inside a band swept sideways at card height and cut\n * straight through whatever unrelated card stood between its ends. Now every\n * stretch that moves sideways starts and ends on the two boundaries of one gap,\n * so its y never leaves the gap, where no node lives; and every vertical one\n * keeps the x of a port (inside its own node's width) or of a dummy (half an\n * edge gap plus half a node gap clear of any neighbour).\n *\n * A reversed edge is routed the way the layout sees it and then turned around,\n * so its points still start at the real parent: it leaves the parent's top and\n * enters the child's bottom, which is itself the visual cue that the edge\n * closes a cycle.\n */\nexport function routeEdges(\n graph: LayeredGraph,\n geometry: RouteGeometry,\n portGap: number,\n inset: number\n): WrGraphPoint[][] {\n const outgoing: Port[][] = geometry.width.map(() => []);\n const incoming: Port[][] = geometry.width.map(() => []);\n graph.edges.forEach(({ chain }, edge) => {\n outgoing[chain[0]].push({ edge, toward: chain[1] });\n incoming[chain[chain.length - 1]].push({ edge, toward: chain[chain.length - 2] });\n });\n const start = graph.edges.map(() => 0);\n const end = graph.edges.map(() => 0);\n assignPorts(outgoing, geometry, portGap, inset, start);\n assignPorts(incoming, geometry, portGap, inset, end);\n\n const centre = (item: number): number => geometry.centreY[graph.rank[item]];\n const half = (item: number): number => geometry.halfBand[graph.rank[item]];\n return graph.edges.map(({ chain, reversed }, edge) => {\n const upper = chain[0];\n const lower = chain[chain.length - 1];\n const points: WrGraphPoint[] = [];\n // A node as tall as its band, or a band with no height, would repeat a point.\n const add = (x: number, y: number): void => {\n const last = points[points.length - 1];\n if (last?.x !== x || last.y !== y) points.push({ x, y });\n };\n add(start[edge], centre(upper) + geometry.height[upper] / 2);\n add(start[edge], centre(upper) + half(upper));\n for (let i = 1; i < chain.length - 1; i++) {\n add(geometry.x[chain[i]], centre(chain[i]) - half(chain[i]));\n add(geometry.x[chain[i]], centre(chain[i]) + half(chain[i]));\n }\n add(end[edge], centre(lower) - half(lower));\n add(end[edge], centre(lower) - geometry.height[lower] / 2);\n return reversed ? points.reverse() : points;\n });\n}\n\n/**\n * Self-loops as fixed rectangles beside the node's right side, nested outward\n * one `step` apart, each a little taller than the one inside it. Every point is\n * strictly outside the node, and the space is already reserved in the node's\n * layout box, so a loop can never run into a neighbour. The side is a layout\n * side: under RTL the whole drawing mirrors, loop included.\n */\nexport function routeLoops(\n loops: readonly ComponentEdge[],\n geometry: RouteGeometry,\n rank: readonly number[],\n step: number\n): WrGraphPoint[][] {\n const total = geometry.width.map(() => 0);\n for (const loop of loops) total[loop.from]++;\n const drawn = geometry.width.map(() => 0);\n\n return loops.map(({ from }) => {\n const nth = drawn[from]++;\n const inner = geometry.x[from] + geometry.width[from] / 2 + LOOP_CLEARANCE;\n const outer = inner + (nth + 1) * step;\n const centre = geometry.centreY[rank[from]];\n const reach = ((geometry.height[from] / 2) * (nth + 1)) / (total[from] + 1);\n return [\n { x: inner, y: centre - reach },\n { x: outer, y: centre - reach },\n { x: outer, y: centre + reach },\n { x: inner, y: centre + reach },\n ];\n });\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A point in graph space: origin top-left, y grows downward. */\nexport interface WrGraphPoint {\n readonly x: number;\n readonly y: number;\n}\n\n/**\n * What a layout reads about a node: resolved, plain and serialisable. The\n * consumer's `data` never reaches a layout, and neither does the DOM — sizes\n * arrive as finite numbers the component already resolved.\n */\nexport interface WrGraphLayoutNode {\n readonly id: string;\n readonly width: number;\n readonly height: number;\n}\n\n/** A layout edge. `from` is the parent, `to` the child; `id` is unique per edge. */\nexport interface WrGraphLayoutEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n}\n\n/**\n * The whole graph a layout works on. Input order IS the tie-break order, so the\n * same arrays always produce the same picture. Parallel edges and self-loops\n * are legal here; an edge naming a missing node is dropped silently, because\n * the component has already warned about it.\n */\nexport interface WrGraphLayoutInput {\n readonly nodes: readonly WrGraphLayoutNode[];\n readonly edges: readonly WrGraphLayoutEdge[];\n}\n\n/**\n * Per-call context. An object from day one so later fields are additive. The\n * signal aborts when the input changes before an asynchronous layout settles —\n * an engine that cannot stop its work can still discard the result.\n */\nexport interface WrGraphLayoutContext {\n readonly signal: AbortSignal;\n}\n\n/** Where a node goes: its TOP-LEFT corner in graph space, which maps straight onto a CSS translate. */\nexport interface WrGraphNodePlacement {\n readonly id: string;\n readonly x: number;\n readonly y: number;\n}\n\n/** The polyline of one edge, from the `from` end to the `to` end — at least two points. */\nexport interface WrGraphEdgeRoute {\n readonly id: string;\n readonly points: readonly WrGraphPoint[];\n}\n\n/**\n * A finished layout. The bounding box starts at (0, 0) and measures\n * `width` × `height`. Direction-free: RTL is applied after the layout, so these\n * numbers never depend on `dir`.\n */\nexport interface WrGraphLayoutResult {\n readonly nodes: readonly WrGraphNodePlacement[];\n readonly edges: readonly WrGraphEdgeRoute[];\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * The seam a layout engine plugs into. Used as both the type and the DI token,\n * the way `WrDateAdapter` is.\n *\n * The return type admits a Promise from the first release, even though the\n * built-in engine is synchronous: an asynchronous engine (elk runs in a worker)\n * has to fit without a breaking change, and widening a synchronous return type\n * later would break every caller that reads the result directly.\n */\nexport abstract class WrGraphLayout {\n abstract layout(\n input: WrGraphLayoutInput,\n context: WrGraphLayoutContext\n ): WrGraphLayoutResult | Promise<WrGraphLayoutResult>;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { orderLayers } from './order';\nimport { layerCentres, placeItems } from './position';\nimport type { ItemExtents } from './position';\nimport { prepareGraph } from './prepare';\nimport type { GraphComponent, PreparedGraph } from './prepare';\nimport { layerGraph } from './rank';\nimport { loopReserve, routeEdges, routeLoops } from './route';\nimport { WrGraphLayout } from './types';\nimport type { WrGraphLayoutInput, WrGraphLayoutResult, WrGraphPoint } from './types';\n\ninterface Gaps {\n readonly nodeGap: number;\n readonly layerGap: number;\n readonly edgeGap: number;\n readonly componentGap: number;\n}\n\n/** One component in its own coordinates: top-left per local node, routes by result slot. */\ninterface ComponentDrawing {\n readonly left: readonly number[];\n readonly top: readonly number[];\n readonly routes: readonly { readonly slot: number; readonly points: readonly WrGraphPoint[] }[];\n readonly minX: number;\n readonly width: number;\n readonly height: number;\n}\n\nfunction drawComponent(graph: PreparedGraph, component: GraphComponent, gaps: Gaps): ComponentDrawing {\n const width = component.nodes.map(node => graph.nodes[node].width);\n const height = component.nodes.map(node => graph.nodes[node].height);\n const loops = width.map(() => 0);\n for (const loop of component.loops) loops[loop.from]++;\n\n const layered = layerGraph(width.length, component.edges);\n const layers = orderLayers(layered);\n const real = (item: number): boolean => item < width.length;\n const extents: ItemExtents = {\n left: layered.rank.map((_, item) => (real(item) ? width[item] / 2 : 0)),\n right: layered.rank.map((_, item) => (real(item) ? width[item] / 2 + loopReserve(loops[item], gaps.edgeGap) : 0)),\n halfGap: layered.rank.map((_, item) => (real(item) ? gaps.nodeGap : gaps.edgeGap) / 2),\n height: layered.rank.map((_, item) => (real(item) ? height[item] : 0)),\n };\n\n const x = placeItems(layers, layered, extents);\n const { centre, half, height: total } = layerCentres(layers, extents, gaps.layerGap);\n const geometry = { x, centreY: centre, halfBand: half, width, height };\n const edges = routeEdges(layered, geometry, gaps.edgeGap, gaps.edgeGap / 2);\n const selfLoops = routeLoops(component.loops, geometry, layered.rank, gaps.edgeGap);\n\n // Every route point lies horizontally within some item's box — ports and the\n // band points straight above or below them inside a node's width, bends on\n // dummies, loops inside the reserve — so the items alone bound it.\n let minX = x[0] - extents.left[0];\n let maxX = x[0] + extents.right[0];\n x.forEach((anchor, item) => {\n minX = Math.min(minX, anchor - extents.left[item]);\n maxX = Math.max(maxX, anchor + extents.right[item]);\n });\n\n return {\n left: width.map((w, node) => x[node] - extents.left[node]),\n top: height.map((h, node) => centre[layered.rank[node]] - h / 2),\n routes: [\n ...layered.edges.map((edge, k) => ({ slot: edge.slot, points: edges[k] })),\n ...component.loops.map((loop, k) => ({ slot: loop.slot, points: selfLoops[k] })),\n ],\n minX,\n width: maxX - minX,\n height: total,\n };\n}\n\n/** Options for {@link WrLayeredGraphLayout}. Spacing lives here, not on the component: the names are engine-specific. */\nexport interface WrLayeredGraphLayoutOptions {\n /** Horizontal gap between two nodes in one layer. Default `24`. */\n readonly nodeGap?: number;\n /** Vertical gap between two layers. Default `48`. */\n readonly layerGap?: number;\n /** Gap between an edge's bend and its neighbours, and between ports on one side. Default `12`. */\n readonly edgeGap?: number;\n /** Horizontal gap between two unconnected parts of the graph. Default `48`. */\n readonly componentGap?: number;\n}\n\n/**\n * The built-in layered layout: parents above children, pure TypeScript, no DOM\n * and no dependency, so it runs the same under prerender as in the browser.\n *\n * It is deliberately the light version of the pipeline: DFS cycle breaking,\n * source-based longest-path ranking with one tightening pass, barycenter sweeps\n * with a pairwise crossing count, and averaged forward/backward compaction for\n * coordinates. Network simplex and Brandes–Köpf would draw some graphs more\n * compactly at several times the code.\n *\n * Deterministic by construction rather than by luck: ids are turned into indices\n * in input order before anything else, every loop is capped by a count, every\n * comparator is total with an integer tie-break, and the arithmetic is limited\n * to operations the language specifies exactly — so the server and the browser\n * agree to the last bit. Nothing is kept between calls and the input is never\n * written to.\n */\nexport class WrLayeredGraphLayout extends WrGraphLayout {\n private readonly gaps: Gaps;\n\n constructor(options: WrLayeredGraphLayoutOptions = {}) {\n super();\n this.gaps = {\n nodeGap: options.nodeGap ?? 24,\n layerGap: options.layerGap ?? 48,\n edgeGap: options.edgeGap ?? 12,\n componentGap: options.componentGap ?? 48,\n };\n }\n\n /** Synchronous — a narrowing of the base signature, so a caller holding this class needs no `await`. */\n override layout(input: WrGraphLayoutInput): WrGraphLayoutResult {\n const graph = prepareGraph(input);\n const placed: WrGraphPoint[] = graph.nodes.map(() => ({ x: 0, y: 0 }));\n const routes: (readonly WrGraphPoint[])[] = graph.edges.map(() => []);\n let width = 0;\n let height = 0;\n\n // Components go in one row, top-aligned, in the order of their first node.\n // `+ 0` turns a negative zero into a positive one: the two compare equal with\n // `===` and unequal everywhere a result is compared structurally.\n graph.components.forEach((component, c) => {\n const drawing = drawComponent(graph, component, this.gaps);\n const offset = c === 0 ? 0 : width + this.gaps.componentGap;\n const shift = offset - drawing.minX;\n component.nodes.forEach((node, local) => {\n placed[node] = { x: drawing.left[local] + shift + 0, y: drawing.top[local] + 0 };\n });\n for (const { slot, points } of drawing.routes) {\n routes[slot] = points.map(point => ({ x: point.x + shift + 0, y: point.y + 0 }));\n }\n width = offset + drawing.width;\n height = Math.max(height, drawing.height);\n });\n\n return {\n nodes: graph.nodes.map((node, i) => ({ id: node.id, x: placed[i].x, y: placed[i].y })),\n edges: graph.edges.map((edge, slot) => ({ id: edge.id, points: routes[slot] })),\n width: width + 0,\n height: height + 0,\n };\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n LOCALE_ID,\n ViewEncapsulation,\n computed,\n contentChild,\n effect,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\n\nimport { WrI18n, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport { WrGraphNodeTemplate } from './graph-node-template';\nimport { WrLayeredGraphLayout } from './internal/layout/layered-layout';\nimport { WrGraphLayout } from './internal/layout/types';\nimport type { WrGraphLayoutInput, WrGraphLayoutResult, WrGraphPoint } from './internal/layout/types';\nimport type { WrGraphEdge, WrGraphNode } from './types';\n\n/** What a size falls back to when neither the node nor the graph supplies a usable one. */\nconst DEFAULT_NODE_WIDTH = 160;\nconst DEFAULT_NODE_HEIGHT = 48;\n\n/**\n * The arrowhead's size in pixels, and the length of the straight lead-in under it.\n * A fixed user-space size rather than a multiple of the stroke, so a thinner or\n * thicker `--wr-graph-edge-width` never shrinks the arrow off its lead-in.\n */\nconst ARROW_SIZE = 6;\n\n/**\n * Instance counter for the arrowhead marker id. Several graphs share one page\n * under `ViewEncapsulation.None`, so the id has to be per instance — and\n * counted rather than `wrRandomId()`, so the prerendered id is the one the\n * browser renders again.\n */\nlet graphUid = 0;\n\n/** A node the component keeps: the consumer's object, where it came in, and its resolved size. */\ninterface PreparedNode<TData> {\n readonly node: WrGraphNode<TData>;\n readonly index: number;\n readonly width: number;\n readonly height: number;\n}\n\n/** A kept edge. `id` is `e${inputIndex}`, so it never shifts when an earlier edge is dropped. */\ninterface PreparedEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n}\n\n/** The inputs, cleaned: everything the layout reads, plus what dev mode reports. */\ninterface PreparedGraph<TData> {\n readonly nodes: readonly PreparedNode<TData>[];\n readonly edges: readonly PreparedEdge[];\n readonly input: WrGraphLayoutInput;\n readonly duplicates: readonly string[];\n readonly dangling: readonly string[];\n readonly badSizes: readonly string[];\n}\n\n/** A placed node in layout coordinates, before any mirroring. */\ninterface PlacedNode<TData> extends PreparedNode<TData> {\n readonly x: number;\n readonly y: number;\n}\n\n/** The finished layout joined back to the consumer's data, nodes in READING order. */\ninterface PlacedGraph<TData> {\n readonly width: number;\n readonly height: number;\n readonly nodes: readonly PlacedNode<TData>[];\n readonly edges: readonly { readonly edge: PreparedEdge; readonly points: readonly WrGraphPoint[] }[];\n}\n\ninterface DrawnNode<TData> {\n readonly node: WrGraphNode<TData>;\n readonly width: number;\n readonly height: number;\n readonly transform: string;\n}\n\ninterface DrawnEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n readonly d: string;\n}\n\n/** What the template binds: physical pixels, already mirrored for RTL. */\ninterface GraphView<TData> {\n readonly width: number;\n readonly height: number;\n readonly nodes: readonly DrawnNode<TData>[];\n readonly edges: readonly DrawnEdge[];\n}\n\nfunction isSize(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0;\n}\n\nfunction isThenable(value: unknown): value is PromiseLike<unknown> {\n return typeof (value as { then?: unknown }).then === 'function';\n}\n\n/** Two decimals are below anything a screen can show, and keep a 5 000-bend path short. `+ 0` drops a `-0`. */\nfunction px(value: number): number {\n return Math.round(value * 100) / 100 + 0;\n}\n\nfunction prepare<TData>(\n nodes: readonly WrGraphNode<TData>[],\n edges: readonly WrGraphEdge[],\n nodeWidth: number,\n nodeHeight: number\n): PreparedGraph<TData> {\n // A `Map` built in input order, never an object keyed by id: an object lists\n // index-like keys (`'2'`, `'10'`) first, so the order would depend on the ids.\n const kept = new Map<string, PreparedNode<TData>>();\n const duplicates: string[] = [];\n const badSizes: string[] = [];\n nodes.forEach((node, index) => {\n if (kept.has(node.id)) {\n duplicates.push(node.id);\n return;\n }\n if ((node.width != null && !isSize(node.width)) || (node.height != null && !isSize(node.height))) {\n badSizes.push(node.id);\n }\n kept.set(node.id, {\n node,\n index,\n width: isSize(node.width) ? node.width : nodeWidth,\n height: isSize(node.height) ? node.height : nodeHeight,\n });\n });\n\n const keptEdges: PreparedEdge[] = [];\n const dangling: string[] = [];\n edges.forEach((edge, index) => {\n if (kept.has(edge.from) && kept.has(edge.to)) keptEdges.push({ id: `e${index}`, from: edge.from, to: edge.to });\n else dangling.push(`#${index} (from \"${edge.from}\" to \"${edge.to}\")`);\n });\n\n const list = [...kept.values()];\n return {\n nodes: list,\n edges: keptEdges,\n input: { nodes: list.map(({ node, width, height }) => ({ id: node.id, width, height })), edges: keptEdges },\n duplicates,\n dangling,\n badSizes,\n };\n}\n\n/**\n * Names joined the way the locale joins a list, or the way `'en'` does when the\n * runtime has no list data for that locale — never the host default.\n *\n * `new Intl.ListFormat('zz')` does not throw: a well-formed tag the runtime\n * cannot serve silently resolves to whatever locale the machine runs in, which\n * is one thing on the prerendering server and another in the browser. So the\n * support is asked first, and only a malformed tag reaches the `catch`\n * (`supportedLocalesOf` throws a `RangeError` for it).\n */\nfunction listFormat(locale: string): Intl.ListFormat {\n try {\n if (Intl.ListFormat.supportedLocalesOf(locale).length) return new Intl.ListFormat(locale, { type: 'conjunction' });\n } catch {\n // Not a valid language tag at all; handled by the fallback below.\n }\n return new Intl.ListFormat('en', { type: 'conjunction' });\n}\n\nfunction warn(message: string): void {\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(`[NGWR] <wr-graph>: ${message}`);\n}\n\n/** What a layout returned that the component cannot draw faithfully. */\nfunction layoutProblems(graph: PreparedGraph<unknown>, result: WrGraphLayoutResult): string[] {\n const problems: string[] = [];\n const placed = new Set(result.nodes.map(node => node.id));\n const unplaced = graph.nodes.filter(({ node }) => !placed.has(node.id)).map(({ node }) => `\"${node.id}\"`);\n if (unplaced.length) problems.push(`no position for ${unplaced.join(', ')}`);\n\n const numbers = [\n result.width,\n result.height,\n ...result.nodes.flatMap(node => [node.x, node.y]),\n ...result.edges.flatMap(edge => edge.points.flatMap(point => [point.x, point.y])),\n ];\n if (!numbers.every(Number.isFinite)) problems.push('a coordinate or the size is not a finite number');\n return problems;\n}\n\n/**\n * A graph of blocks joined by parent-child links, laid out in layers from top to\n * bottom. Display only: nothing is selectable, and the graph scrolls inside its\n * own viewport rather than the page.\n *\n * The layout runs in a `computed` with no DOM and no measuring, so the sizes are\n * the consumer's: `nodeWidth` / `nodeHeight` for every node, or `width` /\n * `height` on one. A prerender therefore ships the finished picture.\n *\n * What the lines show is also written out: every node carries visually hidden\n * text naming its parents and children, and the lines themselves are hidden\n * from assistive technology.\n *\n * @example\n * ```html\n * <wr-graph [nodes]=\"nodes\" [edges]=\"edges\" ariaLabel=\"Team structure\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/graph\n */\n@Component({\n selector: 'wr-graph',\n templateUrl: './graph.html',\n imports: [NgTemplateOutlet],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-graph',\n },\n})\nexport class WrGraph<TData = unknown> {\n /**\n * The nodes, in any order. Input order breaks layout ties, so the same arrays\n * always produce the same picture. Never mutated.\n *\n * @default []\n */\n readonly nodes = input<readonly WrGraphNode<TData>[]>([]);\n\n /**\n * Parent-child links, `from` the parent and `to` the child. Never mutated.\n *\n * @default []\n */\n readonly edges = input<readonly WrGraphEdge[]>([]);\n\n /**\n * Width in pixels of a node that sets none of its own.\n *\n * @default 160\n */\n readonly nodeWidth = input(160, { transform: wrNumAttr(160) });\n\n /**\n * Height in pixels of a node that sets none of its own.\n *\n * @default 48\n */\n readonly nodeHeight = input(48, { transform: wrNumAttr(48) });\n\n /** Accessible name of the scrolling viewport. Falls back to `graph.label`, then `'Graph'`. */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly label = useI18nText(this.ariaLabel, 'graph.label', 'Graph');\n // Each value is a whole sentence, terminator included, so the punctuation is the\n // catalog's to choose — `。` in Japanese, `।` in Hindi.\n private readonly parentsText = useI18nFormatter('graph.parents', 'Parents: {{names}}.');\n private readonly childrenText = useI18nFormatter('graph.children', 'Children: {{names}}.');\n\n protected readonly nodeTemplate = contentChild(WrGraphNodeTemplate);\n\n /** `url(#…)` for every edge's `marker-end`. */\n protected readonly markerId = `wr-graph-${graphUid++}-arrow`;\n protected readonly markerUrl = `url(#${this.markerId})`;\n protected readonly arrowSize = ARROW_SIZE;\n\n private readonly engine: WrGraphLayout = inject(WrGraphLayout, { optional: true }) ?? new WrLayeredGraphLayout();\n // Optional on purpose: `Directionality` is root-provided, so a consumer never has\n // to supply it — and a bare `TestBed` does not either.\n private readonly dir = inject(Directionality, { optional: true });\n private readonly i18n = inject(WrI18n, { optional: true });\n private readonly localeId = inject(LOCALE_ID);\n\n private readonly isRtl = computed(() => this.dir?.valueSignal() === 'rtl');\n private readonly locale = computed(() => this.i18n?.locale() ?? this.localeId);\n\n /**\n * The size of a node that sets none of its own. Each dimension falls back on its\n * own, and the dev warning reads this same value, so it cannot name a size the\n * layout did not use.\n */\n private readonly defaultSize = computed(() => {\n const width = this.nodeWidth();\n const height = this.nodeHeight();\n return {\n width: isSize(width) ? width : DEFAULT_NODE_WIDTH,\n height: isSize(height) ? height : DEFAULT_NODE_HEIGHT,\n };\n });\n\n private readonly prepared = computed(() => {\n const { width, height } = this.defaultSize();\n return prepare(this.nodes(), this.edges(), width, height);\n });\n\n /** The engine's answer, as returned. A fresh signal per run: nothing aborts a synchronous layout. */\n private readonly raw = computed(() =>\n this.engine.layout(this.prepared().input, { signal: new AbortController().signal })\n );\n\n /**\n * The drawable result. An asynchronous layout is declared by the interface and\n * not supported by this release: a thenable draws nothing, and dev mode says so.\n */\n private readonly result = computed(() => {\n const raw = this.raw();\n return isThenable(raw) ? null : raw;\n });\n\n /** Layout joined to the nodes and edges, direction-free, nodes in reading order. */\n private readonly placed = computed((): PlacedGraph<TData> => {\n const graph = this.prepared();\n const result = this.result();\n if (!result) return { width: 0, height: 0, nodes: [], edges: [] };\n\n const positions = new Map(result.nodes.map(placement => [placement.id, placement]));\n const nodes = graph.nodes.flatMap(prepared => {\n const at = positions.get(prepared.node.id);\n return at ? [{ ...prepared, x: at.x, y: at.y }] : [];\n });\n // Reading order is layer, then inline position. A layer centres nodes of\n // different heights on one line, so the layer is the vertical CENTRE, taken to\n // two decimals so float noise cannot split one layer in two.\n const layer = (node: PlacedNode<TData>): number => Math.round((node.y + node.height / 2) * 100);\n nodes.sort((a, b) => layer(a) - layer(b) || a.x - b.x || a.index - b.index);\n\n const routes = new Map(result.edges.map(route => [route.id, route.points]));\n const edges = graph.edges.flatMap(edge => {\n const points = routes.get(edge.id);\n return points && points.length >= 2 ? [{ edge, points }] : [];\n });\n\n return { width: result.width, height: result.height, nodes, edges };\n });\n\n /**\n * Physical pixels. Mirrored here rather than in CSS so nodes and lines get the\n * same numbers and cannot drift apart — and kept apart from the layout so a\n * direction change does not lay the graph out again.\n */\n protected readonly view = computed((): GraphView<TData> => {\n const { width, height, nodes, edges } = this.placed();\n const rtl = this.isRtl();\n const x = (value: number, size = 0): number => px(rtl ? width - value - size : value);\n const at = (point: WrGraphPoint): string => `${x(point.x)} ${px(point.y)}`;\n\n // A route as a smooth path. Every stretch between two route points is one cubic\n // Bézier with both control points at the stretch's middle height, so a line\n // leaves a parent vertically and runs through a bend without a corner — a\n // reversed edge too, whose stretches simply climb.\n //\n // The last `ARROW_SIZE` pixels are a straight lead-in. A marker takes its angle\n // from the tangent at the very end, but it covers several pixels of line, and on\n // a curve those already point elsewhere — the line came out of the side of the\n // arrowhead. On a straight piece the triangle and the line agree. A self-loop is\n // one cubic out to its reserved side with the same lead-in coming back level.\n //\n // Only `+`, `-`, `/`, `abs`, `min` and `max`, so the server and the browser\n // write the same numbers.\n const curve = (points: readonly WrGraphPoint[], loop: boolean): string => {\n const start = points[0];\n const end = points[points.length - 1];\n if (loop) {\n const right = Math.max(...points.map(point => point.x));\n const lead = Math.min(ARROW_SIZE, (right - end.x) / 2);\n const outer = x(right);\n return `M${at(start)} C${outer} ${px(start.y)} ${outer} ${px(end.y)} ${x(end.x + lead)} ${px(end.y)} L${at(end)}`;\n }\n const stretches = points.slice(1).map((to, i) => {\n const from = points[i];\n const last = i === points.length - 2;\n const lead = last ? Math.min(ARROW_SIZE, Math.abs(to.y - from.y) / 2) : 0;\n const toY = to.y < from.y ? to.y + lead : to.y - lead;\n const middle = px((from.y + toY) / 2);\n const bend = `C${x(from.x)} ${middle} ${x(to.x)} ${middle} ${x(to.x)} ${px(toY)}`;\n return last ? `${bend} L${at(to)}` : bend;\n });\n return [`M${at(start)}`, ...stretches].join(' ');\n };\n\n return {\n width: px(width),\n height: px(height),\n nodes: nodes.map(placed => ({\n node: placed.node,\n width: placed.width,\n height: placed.height,\n transform: `translate(${x(placed.x, placed.width)}px, ${px(placed.y)}px)`,\n })),\n edges: edges.map(({ edge, points }) => ({\n id: edge.id,\n from: edge.from,\n to: edge.to,\n d: curve(points, edge.from === edge.to),\n })),\n };\n });\n\n /**\n * The visually hidden sentence per node id: its parents, then its children, as\n * name lists. Never a count — the catalogs have no plural forms. A neighbour\n * linked by several edges is named once, and names follow reading order.\n */\n protected readonly relations = computed(() => {\n const { nodes } = this.placed();\n const list = listFormat(this.locale());\n const order = new Map(nodes.map((placed, i) => [placed.node.id, i]));\n const parents = new Map<string, Set<string>>();\n const children = new Map<string, Set<string>>();\n const link = (map: Map<string, Set<string>>, id: string, neighbour: string): void => {\n const set = map.get(id) ?? new Set<string>();\n set.add(neighbour);\n map.set(id, set);\n };\n for (const { from, to } of this.prepared().edges) {\n if (!order.has(from) || !order.has(to)) continue;\n link(parents, to, from);\n link(children, from, to);\n }\n\n const names = (ids: Set<string> | undefined): string | null => {\n if (!ids?.size) return null;\n const sorted = [...ids].sort((a, b) => (order.get(a) ?? 0) - (order.get(b) ?? 0));\n return list.format(sorted.map(id => nodes[order.get(id) ?? 0].node.label));\n };\n\n const text = new Map<string, string>();\n for (const { node } of nodes) {\n const sentences: string[] = [];\n const parentNames = names(parents.get(node.id));\n const childNames = names(children.get(node.id));\n if (parentNames) sentences.push(this.parentsText({ names: parentNames }));\n if (childNames) sentences.push(this.childrenText({ names: childNames }));\n // Every mark of punctuation comes from the catalog. The one character the\n // component adds is the space between two sentences — a word boundary to a\n // screen reader, and silent in a script that sets none.\n if (sentences.length) text.set(node.id, sentences.join(' '));\n }\n return text;\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('graph');\n if (isDevMode()) {\n effect(() => {\n const graph = this.prepared();\n const raw = this.raw();\n if (graph.duplicates.length) {\n warn(\n `node id(s) ${graph.duplicates.map(id => `\"${id}\"`).join(', ')} appear more than once. ` +\n `The first occurrence of each is drawn and the rest are skipped.`\n );\n }\n if (graph.dangling.length) {\n warn(`edge(s) ${graph.dangling.join(', ')} name a node that does not exist and were skipped.`);\n }\n if (graph.badSizes.length) {\n warn(\n `node(s) ${graph.badSizes.map(id => `\"${id}\"`).join(', ')} have a width or height that is not a ` +\n `positive finite number, so nodeWidth / nodeHeight is used instead.`\n );\n }\n const width = this.nodeWidth();\n const height = this.nodeHeight();\n const invalid = [\n ...(isSize(width) ? [] : [`nodeWidth (${String(width)})`]),\n ...(isSize(height) ? [] : [`nodeHeight (${String(height)})`]),\n ];\n if (invalid.length) {\n const used = this.defaultSize();\n warn(\n `${invalid.join(' and ')} must be a positive finite number, so a node with no size of its own is ` +\n `drawn ${used.width} × ${used.height}.`\n );\n }\n if (isThenable(raw)) {\n warn(\n 'the provided WrGraphLayout returned a Promise. Asynchronous layouts are not supported in this ' +\n 'release, so nothing is drawn.'\n );\n return;\n }\n const problems = layoutProblems(graph, raw);\n if (problems.length) warn(`the layout result cannot be drawn faithfully: ${problems.join('; ')}.`);\n });\n }\n }\n}\n","@let graph = view();\n<!-- The scroller is the one tab stop: a named group, so its label is allowed, and focusable so a keyboard can scroll it. -->\n<div class=\"wr-graph__viewport\" role=\"group\" tabindex=\"0\" [attr.aria-label]=\"label()\">\n <div class=\"wr-graph__stage\" [style.width.px]=\"graph.width\" [style.height.px]=\"graph.height\">\n <svg\n class=\"wr-graph__edges\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.width]=\"graph.width\"\n [attr.height]=\"graph.height\"\n >\n <defs>\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"10\"\n refY=\"5\"\n markerUnits=\"userSpaceOnUse\"\n [attr.markerWidth]=\"arrowSize\"\n [attr.markerHeight]=\"arrowSize\"\n orient=\"auto\"\n >\n <polygon points=\"0,1 10,5 0,9\" />\n </marker>\n </defs>\n @for (edge of graph.edges; track edge.id) {\n <path\n class=\"wr-graph__edge\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"markerUrl\"\n />\n }\n </svg>\n <!-- Items are DIRECT children of the list: a wrapper carrying ARIA or a tabindex would break ownership. -->\n <div class=\"wr-graph__nodes\" [attr.role]=\"graph.nodes.length ? 'list' : null\">\n @for (entry of graph.nodes; track entry.node.id) {\n @let relation = relations().get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n @if (nodeTemplate(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"{ $implicit: entry.node }\" />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n @if (relation) {\n <span class=\"wr-graph__sr-only\">{{ relation }}</span>\n }\n </div>\n }\n </div>\n </div>\n</div>\n"],"mappings":";;;;;;;;;;;;AA+BA,IAAa,sBAAb,MAAa,oBAAmB;CACrB,WAAW,OAAwC,WAAW;CAD5D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAmB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAnB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAmB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAH/B,MAAA;EAAU,MAAA,CAAA,EACT,UAAU,2BACX,CAAA;;;;;;;;;ACpBD,MAAM,aAAa;AACnB,MAAM,mBAAmB;AAczB,SAAS,aAAa,OAAmB;CACvC,MAAM,SAAqB,MAAM,KAAK,EAAE,QAAQ,MAAM,UAAS,SAAU,CAAA,CAAE;CAC3E,MAAM,SAAqB,MAAM,KAAK,EAAE,QAAQ,MAAM,UAAS,SAAU,CAAA,CAAE;CAC3E,MAAM,KAAK,SAAS,MAAM,SAAS,OAAO,KAAK,CAAC,KAAK,IAAI,CAAC;CAC1D,MAAM,UAAU,MAAM,KAAK,UAAU,KAAK;CAE1C,KAAK,MAAM,UAAU,QACnB,KAAK,MAAM,SAAS,QAAQ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A;CAAA,CAAA;;AAMf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EATnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SAEX,CAAC,gBAAgB;GAAC,eACZ,kBAAkB;GAAI,MAC/B,EACJ,OAAO,WACR;GAAA,UAAA;EAAA,CAAA;CAyC8C,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-graph.mjs","names":[],"sources":["../../../projects/lib/graph/graph-node-template.ts","../../../projects/lib/graph/internal/layout/order.ts","../../../projects/lib/graph/internal/layout/position.ts","../../../projects/lib/graph/internal/layout/prepare.ts","../../../projects/lib/graph/internal/layout/rank.ts","../../../projects/lib/graph/internal/layout/route.ts","../../../projects/lib/graph/internal/layout/types.ts","../../../projects/lib/graph/internal/layout/layered-layout.ts","../../../projects/lib/graph/internal/view.ts","../../../projects/lib/graph/graph.ts","../../../projects/lib/graph/graph.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directive, TemplateRef, inject } from '@angular/core';\n\nimport type { WrGraphNodeContext } from './types';\n\n/**\n * Replace the default card. The node is the implicit context; its box — the\n * size the layout reserved, its position and the relation text read to a screen\n * reader — stays with the graph, so a template cannot break the geometry.\n *\n * Render `node.label` somewhere in it: the relation text of every neighbour\n * names this node by its label.\n *\n * @example\n * ```html\n * <wr-graph [nodes]=\"nodes\" [edges]=\"edges\">\n * <ng-template wrGraphNode let-node>\n * <strong>{{ node.label }}</strong> {{ node.data.role }}\n * </ng-template>\n * </wr-graph>\n * ```\n */\n@Directive({\n selector: 'ng-template[wrGraphNode]',\n})\nexport class WrGraphNodeTemplate {\n readonly template = inject<TemplateRef<WrGraphNodeContext>>(TemplateRef);\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { LayeredGraph } from './rank';\n\n/** Gansner's cap. Counted in sweeps, never in time, so a slow machine draws the same picture. */\nconst MAX_SWEEPS = 24;\nconst MAX_STALE_SWEEPS = 4;\n\ninterface Candidate {\n readonly item: number;\n readonly sum: number;\n readonly count: number;\n readonly slot: number;\n}\n\n/**\n * Depth-first from every item in rank order, placing each item as it is first\n * reached. A tree comes out with no crossings before a single sweep runs, and\n * the sweeps only ever keep a strictly better order, so a tree stays that way.\n */\nfunction initialOrder(graph: LayeredGraph): number[][] {\n const layers: number[][] = Array.from({ length: graph.rankCount }, () => []);\n const byRank: number[][] = Array.from({ length: graph.rankCount }, () => []);\n graph.rank.forEach((rank, item) => byRank[rank].push(item));\n const visited = graph.rank.map(() => false);\n\n for (const bucket of byRank) {\n for (const start of bucket) {\n const stack = [start];\n for (let item = stack.pop(); item !== undefined; item = stack.pop()) {\n if (visited[item]) continue;\n visited[item] = true;\n layers[graph.rank[item]].push(item);\n // Pushed in reverse so the first child is visited first, as a recursive DFS would.\n const below = graph.down[item];\n for (let i = below.length - 1; i >= 0; i--) if (!visited[below[i]]) stack.push(below[i]);\n }\n }\n }\n return layers;\n}\n\n/**\n * Re-sorts one layer by the barycenter of each item's neighbours on the\n * reference layer. Items with no such neighbour are lifted out BEFORE the sort\n * and keep their slot: a comparator asked to rank \"no barycenter\" against a\n * number has no consistent answer, and an inconsistent comparator sorts\n * differently in different engines.\n *\n * Barycenters are compared exactly. They are means of integer slot indices, so\n * `sumA / countA < sumB / countB` becomes `sumA * countB < sumB * countA`, which\n * stays in exact integer arithmetic at any size this component draws. Ties fall\n * back to the current slot, so the comparator is total.\n */\nfunction reorder(layer: number[], neighbours: LayeredGraph['up'], slotOf: number[]): void {\n const candidates: Candidate[] = [];\n layer.forEach((item, slot) => {\n const adjacent = neighbours[item];\n if (adjacent.length === 0) return;\n let sum = 0;\n for (const other of adjacent) sum += slotOf[other];\n candidates.push({ item, sum, count: adjacent.length, slot });\n });\n const slots = candidates.map(candidate => candidate.slot);\n candidates.sort((a, b) => a.sum * b.count - b.sum * a.count || a.slot - b.slot);\n candidates.forEach((candidate, k) => {\n layer[slots[k]] = candidate.item;\n slotOf[candidate.item] = slots[k];\n });\n}\n\n/**\n * Crossings between adjacent layers, counted pairwise. Quadratic in the\n * segments between one pair of layers, which at the few hundred edges this\n * component is meant for is cheaper to trust than an accumulator tree.\n * Two segments sharing an end never count: their product is zero.\n */\nexport function countCrossings(layers: readonly (readonly number[])[], down: readonly (readonly number[])[]): number {\n const slotOf: number[] = down.map(() => 0);\n for (const layer of layers) layer.forEach((item, slot) => (slotOf[item] = slot));\n\n let crossings = 0;\n for (let r = 0; r + 1 < layers.length; r++) {\n const top: number[] = [];\n const bottom: number[] = [];\n for (const item of layers[r]) {\n for (const next of down[item]) {\n top.push(slotOf[item]);\n bottom.push(slotOf[next]);\n }\n }\n for (let i = 0; i < top.length; i++) {\n for (let j = i + 1; j < top.length; j++) {\n if ((top[i] - top[j]) * (bottom[i] - bottom[j]) < 0) crossings++;\n }\n }\n }\n return crossings;\n}\n\n/**\n * Stage 5. Alternating down and up barycenter sweeps, keeping the best order\n * seen. \"Best\" moves only on a strict improvement, so an equally good later\n * order never displaces an earlier one.\n */\nexport function orderLayers(graph: LayeredGraph): number[][] {\n const layers = initialOrder(graph);\n const slotOf: number[] = graph.rank.map(() => 0);\n for (const layer of layers) layer.forEach((item, slot) => (slotOf[item] = slot));\n\n let best = layers.map(layer => layer.slice());\n let fewest = countCrossings(layers, graph.down);\n for (let sweep = 0, stale = 0; sweep < MAX_SWEEPS && stale < MAX_STALE_SWEEPS && fewest > 0; sweep++) {\n if (sweep % 2 === 0) {\n for (let r = 1; r < layers.length; r++) reorder(layers[r], graph.up, slotOf);\n } else {\n for (let r = layers.length - 2; r >= 0; r--) reorder(layers[r], graph.down, slotOf);\n }\n const crossings = countCrossings(layers, graph.down);\n if (crossings < fewest) {\n fewest = crossings;\n best = layers.map(layer => layer.slice());\n stale = 0;\n } else {\n stale++;\n }\n }\n return best;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { LayeredGraph } from './rank';\n\n/** Four down passes and four up passes, alternating, ending on up so parents settle over their children. */\nconst COORDINATE_PASSES = 8;\n\nfunction separation(extents: ItemExtents, a: number, b: number): number {\n return extents.right[a] + extents.halfGap[a] + extents.halfGap[b] + extents.left[b];\n}\n\n/**\n * Moves one layer toward the mean x of each item's neighbours on the reference\n * layer, without reordering it and without letting two items come closer than\n * their separation.\n *\n * Why the result never overlaps: F is built left to right as\n * `F[i] = max(desired[i], F[i-1] + sep[i])`, so `F[i] - F[i-1] >= sep[i]`; B is\n * built right to left as `B[i] = min(desired[i], B[i+1] - sep[i+1])`, so\n * `B[i+1] - B[i] >= sep[i+1]`. Both are feasible on their own, and the average\n * of two feasible placements is feasible, because\n * `(F[i] + B[i]) / 2 - (F[i-1] + B[i-1]) / 2` is half of a sum of two terms that\n * are each at least `sep[i]`. That holds whatever the desired positions are,\n * which is why no pass needs to repair a previous one. Averaging the two is also\n * what keeps a crowded layer centred on what it wants instead of piled to one\n * side.\n */\nfunction align(layer: readonly number[], neighbours: LayeredGraph['up'], x: number[], extents: ItemExtents): void {\n const desired = layer.map(item => {\n const adjacent = neighbours[item];\n if (adjacent.length === 0) return x[item];\n let sum = 0;\n for (const other of adjacent) sum += x[other];\n return sum / adjacent.length;\n });\n const forward = desired.slice();\n for (let i = 1; i < layer.length; i++) {\n forward[i] = Math.max(desired[i], forward[i - 1] + separation(extents, layer[i - 1], layer[i]));\n }\n const backward = desired.slice();\n for (let i = layer.length - 2; i >= 0; i--) {\n backward[i] = Math.min(desired[i], backward[i + 1] - separation(extents, layer[i], layer[i + 1]));\n }\n layer.forEach((item, i) => (x[item] = (forward[i] + backward[i]) / 2));\n}\n\n/**\n * Per item, the room it needs around its anchor x. The two sides differ for a\n * node with a self-loop, whose right side also holds the loop.\n */\nexport interface ItemExtents {\n readonly left: readonly number[];\n readonly right: readonly number[];\n /** Half the gap the item keeps to a neighbour: half of `nodeGap` for a node, half of `edgeGap` for a dummy. */\n readonly halfGap: readonly number[];\n /** What the item contributes to its layer's height — zero for a dummy. */\n readonly height: readonly number[];\n}\n\n/** Stage 6, horizontal: the anchor x of every item, starting packed and relaxing toward neighbours. */\nexport function placeItems(\n layers: readonly (readonly number[])[],\n graph: LayeredGraph,\n extents: ItemExtents\n): number[] {\n const x: number[] = graph.rank.map(() => 0);\n for (const layer of layers) {\n layer.forEach((item, i) => {\n x[item] = i === 0 ? extents.left[item] : x[layer[i - 1]] + separation(extents, layer[i - 1], item);\n });\n }\n for (let pass = 0; pass < COORDINATE_PASSES; pass++) {\n if (pass % 2 === 0) {\n for (let r = 1; r < layers.length; r++) align(layers[r], graph.up, x, extents);\n } else {\n for (let r = layers.length - 2; r >= 0; r--) align(layers[r], graph.down, x, extents);\n }\n }\n return x;\n}\n\n/**\n * Stage 6, vertical: a layer is as tall as its tallest node, layers are\n * `layerGap` apart, and every item is centred in its layer — so a short node\n * beside a tall one still lines up with it. The layer's band is\n * `centre ± half`, written the way a node's border is (`centre ± height / 2`),\n * so the tallest node's border and the band's edge are the same number.\n */\nexport function layerCentres(\n layers: readonly (readonly number[])[],\n extents: ItemExtents,\n layerGap: number\n): { readonly centre: readonly number[]; readonly half: readonly number[]; readonly height: number } {\n const centre: number[] = [];\n const half: number[] = [];\n let top = 0;\n layers.forEach((layer, r) => {\n let tallest = 0;\n for (const item of layer) tallest = Math.max(tallest, extents.height[item]);\n if (r > 0) top += layerGap;\n half.push(tallest / 2);\n centre.push(top + tallest / 2);\n top += tallest;\n });\n return { centre, half, height: top };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrGraphLayoutEdge, WrGraphLayoutInput, WrGraphLayoutNode } from './types';\n\n/** An edge inside one component, its ends as LOCAL node indices. `slot` is its place in the result. */\nexport interface ComponentEdge {\n readonly slot: number;\n readonly from: number;\n readonly to: number;\n}\n\n/** One weakly connected component. A node's position in `nodes` is its local index. */\nexport interface GraphComponent {\n /** Indices into `PreparedGraph.nodes`, ascending — so local order is still input order. */\n readonly nodes: readonly number[];\n /** Edges between two different nodes, in input order. Parallel edges are kept. */\n readonly edges: readonly ComponentEdge[];\n /** Self-loops, in input order. They take no part in ranking or ordering. */\n readonly loops: readonly ComponentEdge[];\n}\n\nexport interface PreparedGraph {\n /** Unique nodes in input order. */\n readonly nodes: readonly WrGraphLayoutNode[];\n /** Kept edges in input order; an edge's index here is its `slot`. */\n readonly edges: readonly WrGraphLayoutEdge[];\n /** Ordered by each component's smallest node index. */\n readonly components: readonly GraphComponent[];\n}\n\n/**\n * Stage 1. Ids become integer indices in input order and everything after this\n * works on arrays: a plain object keyed by id would enumerate `'2'` before\n * `'10'` whatever order the consumer gave, which is exactly the trap that makes\n * one graph draw two ways.\n *\n * A duplicate id keeps its first occurrence and an edge naming a missing node is\n * dropped. Both are the component's to warn about; the layout only has to\n * survive them.\n */\nexport function prepareGraph(input: WrGraphLayoutInput): PreparedGraph {\n const index = new Map<string, number>();\n const nodes: WrGraphLayoutNode[] = [];\n for (const node of input.nodes) {\n if (index.has(node.id)) continue;\n index.set(node.id, nodes.length);\n nodes.push(node);\n }\n\n const edges: WrGraphLayoutEdge[] = [];\n const ends: (readonly [number, number])[] = [];\n for (const edge of input.edges) {\n const from = index.get(edge.from);\n const to = index.get(edge.to);\n if (from === undefined || to === undefined) continue;\n edges.push(edge);\n ends.push([from, to]);\n }\n\n // Weakly connected components by BFS, started from each unassigned node in\n // input order — so component numbers already follow the smallest index.\n const neighbours: number[][] = nodes.map(() => []);\n for (const [from, to] of ends) {\n neighbours[from].push(to);\n neighbours[to].push(from);\n }\n const componentOf: number[] = nodes.map(() => -1);\n const components: { nodes: number[]; edges: ComponentEdge[]; loops: ComponentEdge[] }[] = [];\n for (let start = 0; start < nodes.length; start++) {\n if (componentOf[start] !== -1) continue;\n componentOf[start] = components.length;\n const queue = [start];\n // `for...of` over an array that grows while it is read visits the appended nodes too.\n for (const current of queue) {\n for (const next of neighbours[current]) {\n if (componentOf[next] !== -1) continue;\n componentOf[next] = components.length;\n queue.push(next);\n }\n }\n components.push({ nodes: [], edges: [], loops: [] });\n }\n\n const local: number[] = [];\n nodes.forEach((_, node) => {\n const component = components[componentOf[node]];\n local.push(component.nodes.length);\n component.nodes.push(node);\n });\n ends.forEach(([from, to], slot) => {\n const component = components[componentOf[from]];\n const edge = { slot, from: local[from], to: local[to] };\n (from === to ? component.loops : component.edges).push(edge);\n });\n\n return { nodes, edges, components };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ComponentEdge } from './prepare';\n\ninterface Frame {\n readonly node: number;\n next: number;\n}\n\n/**\n * Stage 2. Depth-first search from the sources in input order, then from\n * whatever is left; an edge into the current stack closes a cycle and is\n * reversed. A back edge points at an ancestor on the current path, so both of\n * its ends are in one strongly connected component by construction — no SCC\n * pass is needed here. The stack is explicit because a long chain would\n * otherwise recurse once per node.\n */\nfunction findBackEdges(count: number, edges: readonly ComponentEdge[]): boolean[] {\n const out: number[][] = Array.from({ length: count }, () => []);\n const indegree: number[] = new Array<number>(count).fill(0);\n edges.forEach((edge, k) => {\n out[edge.from].push(k);\n indegree[edge.to]++;\n });\n\n const reversed = edges.map(() => false);\n const visited: boolean[] = new Array<boolean>(count).fill(false);\n const onStack: boolean[] = new Array<boolean>(count).fill(false);\n const nodes = Array.from({ length: count }, (_, node) => node);\n const starts = [...nodes.filter(node => indegree[node] === 0), ...nodes.filter(node => indegree[node] !== 0)];\n\n for (const start of starts) {\n if (visited[start]) continue;\n visited[start] = onStack[start] = true;\n const stack: Frame[] = [{ node: start, next: 0 }];\n while (stack.length > 0) {\n const frame = stack[stack.length - 1];\n if (frame.next === out[frame.node].length) {\n onStack[frame.node] = false;\n stack.pop();\n continue;\n }\n const k = out[frame.node][frame.next++];\n const to = edges[k].to;\n if (onStack[to]) {\n reversed[k] = true;\n } else if (!visited[to]) {\n visited[to] = onStack[to] = true;\n stack.push({ node: to, next: 0 });\n }\n }\n }\n return reversed;\n}\n\n/**\n * Stage 3. Longest path from the sources: a node sits one rank below its\n * deepest parent, so an org chart keeps a leaf directly under its manager\n * rather than sinking every leaf to the bottom rank the way a sink-based\n * longest path does. Network simplex would be more compact and is several\n * times the code; this is the simplest ranking that reads well.\n *\n * The one tightening pass fixes the cost this ranking is known for: a root\n * whose only child is deep would otherwise sit on rank 0 and draw a long edge\n * through every rank in between. Only a node with no incoming edge moves, and it\n * moves to just above its highest child — so no other node's rank changes and\n * every rank stays occupied.\n */\nfunction assignRanks(count: number, from: readonly number[], to: readonly number[]): number[] {\n const out: number[][] = Array.from({ length: count }, () => []);\n const indegree: number[] = new Array<number>(count).fill(0);\n from.forEach((node, k) => {\n out[node].push(to[k]);\n indegree[to[k]]++;\n });\n\n // Kahn's algorithm with a FIFO queue seeded in input order.\n const rank: number[] = new Array<number>(count).fill(0);\n const remaining = indegree.slice();\n const order: number[] = [];\n for (let node = 0; node < count; node++) if (indegree[node] === 0) order.push(node);\n // `for...of` over an array that grows while it is read visits the appended nodes too.\n for (const node of order) {\n for (const child of out[node]) {\n rank[child] = Math.max(rank[child], rank[node] + 1);\n if (--remaining[child] === 0) order.push(child);\n }\n }\n\n for (let i = order.length - 1; i >= 0; i--) {\n const node = order[i];\n if (indegree[node] !== 0 || out[node].length === 0) continue;\n let highest = rank[out[node][0]];\n for (const child of out[node]) highest = Math.min(highest, rank[child]);\n if (highest - 1 > rank[node]) rank[node] = highest - 1;\n }\n\n let lowest = rank[0];\n for (const value of rank) lowest = Math.min(lowest, value);\n return rank.map(value => value - lowest);\n}\n\n/** An edge after cycle removal and dummy insertion. */\nexport interface LayeredEdge {\n readonly slot: number;\n /** Whether the edge runs child-to-parent in the layout. Its route is reversed at the end. */\n readonly reversed: boolean;\n /** Items from the upper end to the lower end, one per rank: real node, dummies, real node. */\n readonly chain: readonly number[];\n}\n\n/**\n * A proper layered graph: every edge segment spans exactly one rank. Items\n * `0..n-1` are the real nodes in local input order, dummies are appended after\n * them — integer indices rather than generated names, so nothing depends on a\n * counter that outlives the call.\n */\nexport interface LayeredGraph {\n readonly rank: readonly number[];\n readonly rankCount: number;\n /** Per item, its neighbours one rank up, in edge order (a parallel edge appears twice). */\n readonly up: readonly (readonly number[])[];\n /** Per item, its neighbours one rank down, in edge order. */\n readonly down: readonly (readonly number[])[];\n readonly edges: readonly LayeredEdge[];\n}\n\n/**\n * Stages 2–4 for one connected component: break cycles, rank, and give every\n * edge that spans k ranks its own chain of k − 1 zero-size dummies, so parallel\n * long edges stay apart instead of sharing one.\n */\nexport function layerGraph(count: number, edges: readonly ComponentEdge[]): LayeredGraph {\n const reversed = findBackEdges(count, edges);\n const upper = edges.map((edge, k) => (reversed[k] ? edge.to : edge.from));\n const lower = edges.map((edge, k) => (reversed[k] ? edge.from : edge.to));\n const rank = assignRanks(count, upper, lower);\n\n const up: number[][] = Array.from({ length: count }, () => []);\n const down: number[][] = Array.from({ length: count }, () => []);\n const layered = edges.map((edge, k): LayeredEdge => {\n const chain = [upper[k]];\n for (let r = rank[upper[k]] + 1; r < rank[lower[k]]; r++) {\n chain.push(rank.length);\n rank.push(r);\n up.push([]);\n down.push([]);\n }\n chain.push(lower[k]);\n for (let i = 1; i < chain.length; i++) {\n down[chain[i - 1]].push(chain[i]);\n up[chain[i]].push(chain[i - 1]);\n }\n return { slot: edge.slot, reversed: reversed[k], chain };\n });\n\n let rankCount = 0;\n for (const value of rank) rankCount = Math.max(rankCount, value + 1);\n return { rank, rankCount, up, down, edges: layered };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { ComponentEdge } from './prepare';\nimport type { LayeredGraph } from './rank';\nimport type { WrGraphPoint } from './types';\n\n/** Room between a node's right border and the ends of its self-loops, where the arrowhead lands. */\nconst LOOP_CLEARANCE = 4;\n\ninterface Port {\n readonly edge: number;\n /** The item at the other end of the first or last segment — a dummy or a node. */\n readonly toward: number;\n}\n\n/**\n * Spreads k ports along one side of each node, ordered by where each edge\n * heads next so that ports on one side never cross each other; ties go to the\n * earlier edge. Without the spread, parallel edges between adjacent layers\n * would draw as one line. The inset shrinks to a quarter of the width on a\n * narrow node, so any node wider than zero keeps half its side for the spread\n * instead of stacking every port on its centre.\n */\nfunction assignPorts(\n sides: readonly (readonly Port[])[],\n geometry: RouteGeometry,\n portGap: number,\n inset: number,\n into: number[]\n): void {\n sides.forEach((ports, node) => {\n const sorted = ports.slice().sort((a, b) => {\n const ax = geometry.x[a.toward];\n const bx = geometry.x[b.toward];\n return ax < bx ? -1 : ax > bx ? 1 : a.edge - b.edge;\n });\n const room = geometry.width[node] - 2 * Math.min(inset, geometry.width[node] / 4);\n const spread = Math.max(0, Math.min(room, (sorted.length - 1) * portGap));\n const step = sorted.length > 1 ? spread / (sorted.length - 1) : 0;\n sorted.forEach((port, j) => (into[port.edge] = geometry.x[node] - spread / 2 + j * step));\n });\n}\n\n/** Everything routing reads: anchors per item, centres and band half-heights per rank, real sizes per node. */\nexport interface RouteGeometry {\n readonly x: readonly number[];\n readonly centreY: readonly number[];\n /** Half of each rank's tallest node: the rank's band spans `centreY ± halfBand`. */\n readonly halfBand: readonly number[];\n readonly width: readonly number[];\n readonly height: readonly number[];\n}\n\n/** How far right a node's layout box grows to hold its self-loops. */\nexport function loopReserve(loops: number, step: number): number {\n return loops === 0 ? 0 : LOOP_CLEARANCE + loops * step;\n}\n\n/**\n * Stage 8. Out of the bottom side, through each dummy, into the top side — as\n * vertical stretches inside the layer bands joined by exactly one stretch per\n * inter-layer gap: straight down from the port to the bottom of its node's band,\n * straight through every intermediate band at the dummy's x (a point on the\n * band's top and one on its bottom), and straight down from the top of the\n * child's band to its port.\n *\n * Why bands and not a bend at each dummy's centre: the component draws a\n * stretch as a cubic whose control points sit at the stretch's middle height,\n * so a stretch that ended inside a band swept sideways at card height and cut\n * straight through whatever unrelated card stood between its ends. Now every\n * stretch that moves sideways starts and ends on the two boundaries of one gap,\n * so its y never leaves the gap, where no node lives; and every vertical one\n * keeps the x of a port (inside its own node's width) or of a dummy (half an\n * edge gap plus half a node gap clear of any neighbour).\n *\n * A reversed edge is routed the way the layout sees it and then turned around,\n * so its points still start at the real parent: it leaves the parent's top and\n * enters the child's bottom, which is itself the visual cue that the edge\n * closes a cycle.\n */\nexport function routeEdges(\n graph: LayeredGraph,\n geometry: RouteGeometry,\n portGap: number,\n inset: number\n): WrGraphPoint[][] {\n const outgoing: Port[][] = geometry.width.map(() => []);\n const incoming: Port[][] = geometry.width.map(() => []);\n graph.edges.forEach(({ chain }, edge) => {\n outgoing[chain[0]].push({ edge, toward: chain[1] });\n incoming[chain[chain.length - 1]].push({ edge, toward: chain[chain.length - 2] });\n });\n const start = graph.edges.map(() => 0);\n const end = graph.edges.map(() => 0);\n assignPorts(outgoing, geometry, portGap, inset, start);\n assignPorts(incoming, geometry, portGap, inset, end);\n\n const centre = (item: number): number => geometry.centreY[graph.rank[item]];\n const half = (item: number): number => geometry.halfBand[graph.rank[item]];\n return graph.edges.map(({ chain, reversed }, edge) => {\n const upper = chain[0];\n const lower = chain[chain.length - 1];\n const points: WrGraphPoint[] = [];\n // A node as tall as its band, or a band with no height, would repeat a point.\n const add = (x: number, y: number): void => {\n const last = points[points.length - 1];\n if (last?.x !== x || last.y !== y) points.push({ x, y });\n };\n add(start[edge], centre(upper) + geometry.height[upper] / 2);\n add(start[edge], centre(upper) + half(upper));\n for (let i = 1; i < chain.length - 1; i++) {\n add(geometry.x[chain[i]], centre(chain[i]) - half(chain[i]));\n add(geometry.x[chain[i]], centre(chain[i]) + half(chain[i]));\n }\n add(end[edge], centre(lower) - half(lower));\n add(end[edge], centre(lower) - geometry.height[lower] / 2);\n return reversed ? points.reverse() : points;\n });\n}\n\n/**\n * Self-loops as fixed rectangles beside the node's right side, nested outward\n * one `step` apart, each a little taller than the one inside it. Every point is\n * strictly outside the node, and the space is already reserved in the node's\n * layout box, so a loop can never run into a neighbour. The side is a layout\n * side: under RTL the whole drawing mirrors, loop included.\n */\nexport function routeLoops(\n loops: readonly ComponentEdge[],\n geometry: RouteGeometry,\n rank: readonly number[],\n step: number\n): WrGraphPoint[][] {\n const total = geometry.width.map(() => 0);\n for (const loop of loops) total[loop.from]++;\n const drawn = geometry.width.map(() => 0);\n\n return loops.map(({ from }) => {\n const nth = drawn[from]++;\n const inner = geometry.x[from] + geometry.width[from] / 2 + LOOP_CLEARANCE;\n const outer = inner + (nth + 1) * step;\n const centre = geometry.centreY[rank[from]];\n const reach = ((geometry.height[from] / 2) * (nth + 1)) / (total[from] + 1);\n return [\n { x: inner, y: centre - reach },\n { x: outer, y: centre - reach },\n { x: outer, y: centre + reach },\n { x: inner, y: centre + reach },\n ];\n });\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/** A point in graph space: origin top-left, y grows downward. */\nexport interface WrGraphPoint {\n readonly x: number;\n readonly y: number;\n}\n\n/**\n * What a layout reads about a node: resolved, plain and serialisable. The\n * consumer's `data` never reaches a layout, and neither does the DOM — sizes\n * arrive as finite numbers the component already resolved.\n */\nexport interface WrGraphLayoutNode {\n readonly id: string;\n readonly width: number;\n readonly height: number;\n}\n\n/** A layout edge. `from` is the parent, `to` the child; `id` is unique per edge. */\nexport interface WrGraphLayoutEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n}\n\n/**\n * The whole graph a layout works on. Input order IS the tie-break order, so the\n * same arrays always produce the same picture. Parallel edges and self-loops\n * are legal here; an edge naming a missing node is dropped silently, because\n * the component has already warned about it.\n */\nexport interface WrGraphLayoutInput {\n readonly nodes: readonly WrGraphLayoutNode[];\n readonly edges: readonly WrGraphLayoutEdge[];\n}\n\n/**\n * Per-call context. An object from day one so later fields are additive. The\n * signal aborts when the input changes, or the graph is destroyed, before an\n * asynchronous layout settles. An engine that cannot stop its work can leave it\n * running: the graph drops the late result.\n */\nexport interface WrGraphLayoutContext {\n readonly signal: AbortSignal;\n}\n\n/** Where a node goes: its TOP-LEFT corner in graph space, which maps straight onto a CSS translate. */\nexport interface WrGraphNodePlacement {\n readonly id: string;\n readonly x: number;\n readonly y: number;\n}\n\n/** The polyline of one edge, from the `from` end to the `to` end — at least two points. */\nexport interface WrGraphEdgeRoute {\n readonly id: string;\n readonly points: readonly WrGraphPoint[];\n}\n\n/**\n * A finished layout. The bounding box starts at (0, 0) and measures\n * `width` × `height`. Direction-free: RTL is applied after the layout, so these\n * numbers never depend on `dir`.\n */\nexport interface WrGraphLayoutResult {\n readonly nodes: readonly WrGraphNodePlacement[];\n readonly edges: readonly WrGraphEdgeRoute[];\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * The seam a layout engine plugs into. Used as both the type and the DI token,\n * the way `WrDateAdapter` is.\n *\n * A synchronous result is drawn in the same pass. A Promise is for an engine\n * that works in a worker or on a server: the graph keeps its last picture until\n * the Promise resolves, and reports a rejection through `layoutError`.\n *\n * @example\n * ```ts\n * providers: [{ provide: WrGraphLayout, useClass: WorkerLayout }]\n * ```\n */\nexport abstract class WrGraphLayout {\n abstract layout(\n input: WrGraphLayoutInput,\n context: WrGraphLayoutContext\n ): WrGraphLayoutResult | Promise<WrGraphLayoutResult>;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { orderLayers } from './order';\nimport { layerCentres, placeItems } from './position';\nimport type { ItemExtents } from './position';\nimport { prepareGraph } from './prepare';\nimport type { GraphComponent, PreparedGraph } from './prepare';\nimport { layerGraph } from './rank';\nimport { loopReserve, routeEdges, routeLoops } from './route';\nimport { WrGraphLayout } from './types';\nimport type { WrGraphLayoutInput, WrGraphLayoutResult, WrGraphPoint } from './types';\n\ninterface Gaps {\n readonly nodeGap: number;\n readonly layerGap: number;\n readonly edgeGap: number;\n readonly componentGap: number;\n}\n\n/** One component in its own coordinates: top-left per local node, routes by result slot. */\ninterface ComponentDrawing {\n readonly left: readonly number[];\n readonly top: readonly number[];\n readonly routes: readonly { readonly slot: number; readonly points: readonly WrGraphPoint[] }[];\n readonly minX: number;\n readonly width: number;\n readonly height: number;\n}\n\nfunction drawComponent(graph: PreparedGraph, component: GraphComponent, gaps: Gaps): ComponentDrawing {\n const width = component.nodes.map(node => graph.nodes[node].width);\n const height = component.nodes.map(node => graph.nodes[node].height);\n const loops = width.map(() => 0);\n for (const loop of component.loops) loops[loop.from]++;\n\n const layered = layerGraph(width.length, component.edges);\n const layers = orderLayers(layered);\n const real = (item: number): boolean => item < width.length;\n const extents: ItemExtents = {\n left: layered.rank.map((_, item) => (real(item) ? width[item] / 2 : 0)),\n right: layered.rank.map((_, item) => (real(item) ? width[item] / 2 + loopReserve(loops[item], gaps.edgeGap) : 0)),\n halfGap: layered.rank.map((_, item) => (real(item) ? gaps.nodeGap : gaps.edgeGap) / 2),\n height: layered.rank.map((_, item) => (real(item) ? height[item] : 0)),\n };\n\n const x = placeItems(layers, layered, extents);\n const { centre, half, height: total } = layerCentres(layers, extents, gaps.layerGap);\n const geometry = { x, centreY: centre, halfBand: half, width, height };\n const edges = routeEdges(layered, geometry, gaps.edgeGap, gaps.edgeGap / 2);\n const selfLoops = routeLoops(component.loops, geometry, layered.rank, gaps.edgeGap);\n\n // Every route point lies horizontally within some item's box — ports and the\n // band points straight above or below them inside a node's width, bends on\n // dummies, loops inside the reserve — so the items alone bound it.\n let minX = x[0] - extents.left[0];\n let maxX = x[0] + extents.right[0];\n x.forEach((anchor, item) => {\n minX = Math.min(minX, anchor - extents.left[item]);\n maxX = Math.max(maxX, anchor + extents.right[item]);\n });\n\n return {\n left: width.map((w, node) => x[node] - extents.left[node]),\n top: height.map((h, node) => centre[layered.rank[node]] - h / 2),\n routes: [\n ...layered.edges.map((edge, k) => ({ slot: edge.slot, points: edges[k] })),\n ...component.loops.map((loop, k) => ({ slot: loop.slot, points: selfLoops[k] })),\n ],\n minX,\n width: maxX - minX,\n height: total,\n };\n}\n\n/** Options for {@link WrLayeredGraphLayout}. Spacing lives here, not on the component: the names are engine-specific. */\nexport interface WrLayeredGraphLayoutOptions {\n /** Horizontal gap between two nodes in one layer. Default `24`. */\n readonly nodeGap?: number;\n /** Vertical gap between two layers. Default `48`. */\n readonly layerGap?: number;\n /** Gap between an edge's bend and its neighbours, and between ports on one side. Default `12`. */\n readonly edgeGap?: number;\n /** Horizontal gap between two unconnected parts of the graph. Default `48`. */\n readonly componentGap?: number;\n}\n\n/**\n * The built-in layered layout: parents above children, pure TypeScript, no DOM\n * and no dependency, so it runs the same under prerender as in the browser.\n *\n * It is deliberately the light version of the pipeline: DFS cycle breaking,\n * source-based longest-path ranking with one tightening pass, barycenter sweeps\n * with a pairwise crossing count, and averaged forward/backward compaction for\n * coordinates. Network simplex and Brandes–Köpf would draw some graphs more\n * compactly at several times the code.\n *\n * Deterministic by construction rather than by luck: ids are turned into indices\n * in input order before anything else, every loop is capped by a count, every\n * comparator is total with an integer tie-break, and the arithmetic is limited\n * to operations the language specifies exactly — so the server and the browser\n * agree to the last bit. Nothing is kept between calls and the input is never\n * written to.\n */\nexport class WrLayeredGraphLayout extends WrGraphLayout {\n private readonly gaps: Gaps;\n\n constructor(options: WrLayeredGraphLayoutOptions = {}) {\n super();\n this.gaps = {\n nodeGap: options.nodeGap ?? 24,\n layerGap: options.layerGap ?? 48,\n edgeGap: options.edgeGap ?? 12,\n componentGap: options.componentGap ?? 48,\n };\n }\n\n /** Synchronous — a narrowing of the base signature, so a caller holding this class needs no `await`. */\n override layout(input: WrGraphLayoutInput): WrGraphLayoutResult {\n const graph = prepareGraph(input);\n const placed: WrGraphPoint[] = graph.nodes.map(() => ({ x: 0, y: 0 }));\n const routes: (readonly WrGraphPoint[])[] = graph.edges.map(() => []);\n let width = 0;\n let height = 0;\n\n // Components go in one row, top-aligned, in the order of their first node.\n // `+ 0` turns a negative zero into a positive one: the two compare equal with\n // `===` and unequal everywhere a result is compared structurally.\n graph.components.forEach((component, c) => {\n const drawing = drawComponent(graph, component, this.gaps);\n const offset = c === 0 ? 0 : width + this.gaps.componentGap;\n const shift = offset - drawing.minX;\n component.nodes.forEach((node, local) => {\n placed[node] = { x: drawing.left[local] + shift + 0, y: drawing.top[local] + 0 };\n });\n for (const { slot, points } of drawing.routes) {\n routes[slot] = points.map(point => ({ x: point.x + shift + 0, y: point.y + 0 }));\n }\n width = offset + drawing.width;\n height = Math.max(height, drawing.height);\n });\n\n return {\n nodes: graph.nodes.map((node, i) => ({ id: node.id, x: placed[i].x, y: placed[i].y })),\n edges: graph.edges.map((edge, slot) => ({ id: edge.id, points: routes[slot] })),\n width: width + 0,\n height: height + 0,\n };\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The arithmetic of zooming and panning, with no DOM in it.\n *\n * A point `p` of the drawing lands at `origin + (x, y) + k * p` in the viewport,\n * where `origin` is where the stage sits before any transform. Everything here\n * works in viewport pixels, so nothing depends on the reading direction.\n */\n\n/** How much of the drawing a pan always leaves inside the viewport, in pixels. */\nconst KEEP_VISIBLE = 48;\n\nfunction clampAxis(offset: number, origin: number, extent: number, room: number): number {\n const keep = Math.min(KEEP_VISIBLE, extent, room);\n const min = keep - extent - origin;\n const max = room - keep - origin;\n return Math.min(max, Math.max(min, offset));\n}\n\n/** Where the drawing is: an offset in pixels from its natural place, and a scale. */\nexport interface GraphTransform {\n readonly x: number;\n readonly y: number;\n readonly k: number;\n}\n\n/** The viewport's box, and where the untransformed stage starts inside it. */\nexport interface GraphFrame {\n readonly width: number;\n readonly height: number;\n readonly originX: number;\n readonly originY: number;\n}\n\n/** The viewport's padding, which a fitted drawing stays clear of. */\nexport interface GraphInsets {\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n readonly left: number;\n}\n\nexport const IDENTITY: GraphTransform = { x: 0, y: 0, k: 1 };\n\n/** Four decimals: below anything a screen shows, and no float tail in the bound value. */\nexport function roundZoom(value: number): number {\n return Math.round(value * 10000) / 10000;\n}\n\n/** A zoom inside the bounds. Anything that is not a positive finite number reads as 100%. */\nexport function clampZoom(value: number, min: number, max: number): number {\n const zoom = Number.isFinite(value) && value > 0 ? value : 1;\n return roundZoom(Math.min(max, Math.max(min, zoom)));\n}\n\n/** The same picture at zoom `k`, with the drawing point under viewport point (`px`, `py`) left where it is. */\nexport function zoomAround(from: GraphTransform, k: number, px: number, py: number, frame: GraphFrame): GraphTransform {\n const ratio = k / from.k;\n const dx = px - frame.originX;\n const dy = py - frame.originY;\n return { k, x: dx - (dx - from.x) * ratio, y: dy - (dy - from.y) * ratio };\n}\n\n/** The transform with its pan pulled back until part of the drawing is inside the viewport. */\nexport function clampPan(at: GraphTransform, frame: GraphFrame, width: number, height: number): GraphTransform {\n if (frame.width <= 0 || frame.height <= 0) return at;\n return {\n k: at.k,\n x: clampAxis(at.x, frame.originX, width * at.k, frame.width),\n y: clampAxis(at.y, frame.originY, height * at.k, frame.height),\n };\n}\n\n/**\n * The whole drawing, centred, at the largest zoom that fits inside the padding.\n * Never above 100%: a small graph is not blown up to fill a large box.\n */\nexport function fitTransform(\n frame: GraphFrame,\n insets: GraphInsets,\n width: number,\n height: number,\n min: number,\n max: number\n): GraphTransform {\n const roomX = Math.max(0, frame.width - insets.left - insets.right);\n const roomY = Math.max(0, frame.height - insets.top - insets.bottom);\n const k = clampZoom(Math.min(1, width > 0 ? roomX / width : 1, height > 0 ? roomY / height : 1), min, max);\n return {\n k,\n x: insets.left + (roomX - width * k) / 2 - frame.originX,\n y: insets.top + (roomY - height * k) / 2 - frame.originY,\n };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n type ElementRef,\n LOCALE_ID,\n PLATFORM_ID,\n type Signal,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\n\nimport { WrI18n, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrPlatform } from 'ngwr/platform';\nimport { wrNumAttr, wrCheckStyles } from 'ngwr/utils';\n\nimport { WrGraphNodeTemplate } from './graph-node-template';\nimport { WrLayeredGraphLayout } from './internal/layout/layered-layout';\nimport { WrGraphLayout } from './internal/layout/types';\nimport type { WrGraphLayoutInput, WrGraphLayoutResult, WrGraphPoint } from './internal/layout/types';\nimport {\n type GraphFrame,\n type GraphTransform,\n IDENTITY,\n clampPan,\n clampZoom,\n fitTransform,\n zoomAround,\n} from './internal/view';\nimport type { WrGraphEdge, WrGraphNode } from './types';\n\n/** What a size falls back to when neither the node nor the graph supplies a usable one. */\nconst DEFAULT_NODE_WIDTH = 160;\nconst DEFAULT_NODE_HEIGHT = 48;\n\n/**\n * The arrowhead's size in pixels, and the length of the straight lead-in under it.\n * A fixed user-space size rather than a multiple of the stroke, so a thinner or\n * thicker `--wr-graph-edge-width` never shrinks the arrow off its lead-in.\n */\nconst ARROW_SIZE = 6;\n\nconst DEFAULT_MIN_ZOOM = 0.25;\nconst DEFAULT_MAX_ZOOM = 4;\n/** One press of a zoom button or key. */\nconst ZOOM_STEP = 1.25;\n/** One press of an arrow key, in pixels. */\nconst PAN_STEP = 40;\n/** How far a pointer travels before a press becomes a drag, so a click on a node stays a click. */\nconst DRAG_THRESHOLD = 3;\n/** Zoom per wheel pixel, as an exponent, and the most one wheel event may count for. */\nconst WHEEL_RATE = 0.01;\nconst WHEEL_MAX = 24;\n/** Pixels in one line of a wheel that reports lines. */\nconst WHEEL_LINE = 16;\n\n/**\n * What a press must not start a pan on: anything that takes a click or focus of\n * its own inside a node. The viewport matches too, and is told apart at the call.\n */\nconst INTERACTIVE =\n 'a[href], button, input, select, textarea, summary, [tabindex], [contenteditable], [draggable=\"true\"]';\n\n/**\n * Instance counter for the arrowhead marker id. Several graphs share one page\n * under `ViewEncapsulation.None`, so the id has to be per instance — and\n * counted rather than `wrRandomId()`, so the prerendered id is the one the\n * browser renders again.\n */\nlet graphUid = 0;\n\n/** A node the component keeps: the consumer's object, where it came in, and its resolved size. */\ninterface PreparedNode<TData> {\n readonly node: WrGraphNode<TData>;\n readonly index: number;\n readonly width: number;\n readonly height: number;\n}\n\n/** A kept edge. `id` is `e${inputIndex}`, so it never shifts when an earlier edge is dropped. */\ninterface PreparedEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n}\n\n/** The inputs, cleaned: everything the layout reads, plus what dev mode reports. */\ninterface PreparedGraph<TData> {\n readonly nodes: readonly PreparedNode<TData>[];\n readonly edges: readonly PreparedEdge[];\n readonly input: WrGraphLayoutInput;\n readonly duplicates: readonly string[];\n readonly dangling: readonly string[];\n readonly badSizes: readonly string[];\n}\n\n/** One call to the engine: the graph it was given, its answer as returned, and what aborts it. */\ninterface LayoutRun<TData> {\n readonly graph: PreparedGraph<TData>;\n readonly raw: WrGraphLayoutResult | PromiseLike<WrGraphLayoutResult>;\n readonly controller: AbortController;\n}\n\n/** An asynchronous run that settled, and its result: `null` for a rejection. */\ninterface SettledRun<TData> {\n readonly run: LayoutRun<TData>;\n readonly result: WrGraphLayoutResult | null;\n}\n\n/**\n * A result with the graph it was computed for. The two travel together, so the\n * picture left on screen while a newer layout is pending is whole: its own\n * nodes, its own edges, its own sentences.\n */\ninterface Drawing<TData> {\n readonly graph: PreparedGraph<TData>;\n readonly result: WrGraphLayoutResult;\n}\n\n/** A placed node in layout coordinates, before any mirroring. */\ninterface PlacedNode<TData> extends PreparedNode<TData> {\n readonly x: number;\n readonly y: number;\n}\n\n/** The finished layout joined back to the consumer's data, nodes in READING order. */\ninterface PlacedGraph<TData> {\n readonly width: number;\n readonly height: number;\n readonly nodes: readonly PlacedNode<TData>[];\n readonly edges: readonly { readonly edge: PreparedEdge; readonly points: readonly WrGraphPoint[] }[];\n}\n\ninterface DrawnNode<TData> {\n readonly node: WrGraphNode<TData>;\n readonly width: number;\n readonly height: number;\n readonly transform: string;\n}\n\ninterface DrawnEdge {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n readonly d: string;\n}\n\n/** What the template binds: physical pixels, already mirrored for RTL. */\ninterface GraphView<TData> {\n readonly width: number;\n readonly height: number;\n readonly nodes: readonly DrawnNode<TData>[];\n readonly edges: readonly DrawnEdge[];\n}\n\n/** The viewport as measured: its box on screen, and where the stage starts inside it. */\ninterface MeasuredFrame extends GraphFrame {\n readonly left: number;\n readonly top: number;\n}\n\nconst NO_FRAME: MeasuredFrame = { left: 0, top: 0, width: 0, height: 0, originX: 0, originY: 0 };\n\nfunction sameTransform(a: GraphTransform, b: GraphTransform): boolean {\n return a.x === b.x && a.y === b.y && a.k === b.k;\n}\n\nfunction isSize(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0;\n}\n\nfunction isThenable(value: unknown): value is PromiseLike<unknown> {\n return typeof (value as { then?: unknown }).then === 'function';\n}\n\n/** Two decimals are below anything a screen can show, and keep a 5 000-bend path short. `+ 0` drops a `-0`. */\nfunction px(value: number): number {\n return Math.round(value * 100) / 100 + 0;\n}\n\nfunction prepare<TData>(\n nodes: readonly WrGraphNode<TData>[],\n edges: readonly WrGraphEdge[],\n nodeWidth: number,\n nodeHeight: number\n): PreparedGraph<TData> {\n // A `Map` built in input order, never an object keyed by id: an object lists\n // index-like keys (`'2'`, `'10'`) first, so the order would depend on the ids.\n const kept = new Map<string, PreparedNode<TData>>();\n const duplicates: string[] = [];\n const badSizes: string[] = [];\n nodes.forEach((node, index) => {\n if (kept.has(node.id)) {\n duplicates.push(node.id);\n return;\n }\n if ((node.width != null && !isSize(node.width)) || (node.height != null && !isSize(node.height))) {\n badSizes.push(node.id);\n }\n kept.set(node.id, {\n node,\n index,\n width: isSize(node.width) ? node.width : nodeWidth,\n height: isSize(node.height) ? node.height : nodeHeight,\n });\n });\n\n const keptEdges: PreparedEdge[] = [];\n const dangling: string[] = [];\n edges.forEach((edge, index) => {\n if (kept.has(edge.from) && kept.has(edge.to)) keptEdges.push({ id: `e${index}`, from: edge.from, to: edge.to });\n else dangling.push(`#${index} (from \"${edge.from}\" to \"${edge.to}\")`);\n });\n\n const list = [...kept.values()];\n return {\n nodes: list,\n edges: keptEdges,\n input: { nodes: list.map(({ node, width, height }) => ({ id: node.id, width, height })), edges: keptEdges },\n duplicates,\n dangling,\n badSizes,\n };\n}\n\n/**\n * Names joined the way the locale joins a list, or the way `'en'` does when the\n * runtime has no list data for that locale — never the host default.\n *\n * `new Intl.ListFormat('zz')` does not throw: a well-formed tag the runtime\n * cannot serve silently resolves to whatever locale the machine runs in, which\n * is one thing on the prerendering server and another in the browser. So the\n * support is asked first, and only a malformed tag reaches the `catch`\n * (`supportedLocalesOf` throws a `RangeError` for it).\n */\nfunction listFormat(locale: string): Intl.ListFormat {\n try {\n if (Intl.ListFormat.supportedLocalesOf(locale).length) return new Intl.ListFormat(locale, { type: 'conjunction' });\n } catch {\n // Not a valid language tag at all; handled by the fallback below.\n }\n return new Intl.ListFormat('en', { type: 'conjunction' });\n}\n\nfunction warn(message: string, ...detail: unknown[]): void {\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(`[NGWR] <wr-graph>: ${message}`, ...detail);\n}\n\n/** What a layout returned that the component cannot draw faithfully. */\nfunction layoutProblems(graph: PreparedGraph<unknown>, result: WrGraphLayoutResult): string[] {\n const problems: string[] = [];\n const placed = new Set(result.nodes.map(node => node.id));\n const unplaced = graph.nodes.filter(({ node }) => !placed.has(node.id)).map(({ node }) => `\"${node.id}\"`);\n if (unplaced.length) problems.push(`no position for ${unplaced.join(', ')}`);\n\n const numbers = [\n result.width,\n result.height,\n ...result.nodes.flatMap(node => [node.x, node.y]),\n ...result.edges.flatMap(edge => edge.points.flatMap(point => [point.x, point.y])),\n ];\n if (!numbers.every(Number.isFinite)) problems.push('a coordinate or the size is not a finite number');\n return problems;\n}\n\n/**\n * A graph of blocks joined by parent-child links, laid out in layers from top to\n * bottom. Display only: nothing is selectable, and the graph scrolls inside its\n * own viewport rather than the page. With `zoomable` the viewport zooms and pans\n * instead of scrolling.\n *\n * The layout runs in a `computed` with no DOM and no measuring, so the sizes are\n * the consumer's: `nodeWidth` / `nodeHeight` for every node, or `width` /\n * `height` on one. A prerender therefore ships the finished picture.\n *\n * A provided `WrGraphLayout` may answer with a Promise. The last picture stays\n * on screen until it resolves, `layoutPending` is true meanwhile, and a newer\n * run or the graph's destruction aborts it through the `AbortSignal` it was\n * given. The server does not wait for it: a prerender ships an empty, pending\n * graph and the browser draws it.\n *\n * What the lines show is also written out: every node carries visually hidden\n * text naming its parents and children, and the lines themselves are hidden\n * from assistive technology.\n *\n * @example\n * ```html\n * <wr-graph [nodes]=\"nodes\" [edges]=\"edges\" ariaLabel=\"Team structure\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/graph\n */\n@Component({\n selector: 'wr-graph',\n templateUrl: './graph.html',\n imports: [NgTemplateOutlet],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-graph',\n '[class.wr-graph--pending]': 'layoutPending()',\n '[class.wr-graph--zoomable]': 'zoomable()',\n '[class.wr-graph--panning]': 'panning()',\n },\n})\nexport class WrGraph<TData = unknown> {\n /**\n * The nodes, in any order. Input order breaks layout ties, so the same arrays\n * always produce the same picture. Never mutated.\n *\n * @default []\n */\n readonly nodes = input<readonly WrGraphNode<TData>[]>([]);\n\n /**\n * Parent-child links, `from` the parent and `to` the child. Never mutated.\n *\n * @default []\n */\n readonly edges = input<readonly WrGraphEdge[]>([]);\n\n /**\n * Width in pixels of a node that sets none of its own.\n *\n * @default 160\n */\n readonly nodeWidth = input(160, { transform: wrNumAttr(160) });\n\n /**\n * Height in pixels of a node that sets none of its own.\n *\n * @default 48\n */\n readonly nodeHeight = input(48, { transform: wrNumAttr(48) });\n\n /** Accessible name of the scrolling viewport. Falls back to `graph.label`, then `'Graph'`. */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Lets the viewport zoom and pan instead of scrolling: `Ctrl` or `⌘` with the\n * wheel, a pinch, a drag on the field, the keyboard and three buttons. The\n * drawing is fitted on first draw and whenever the layout changes its size,\n * until the view is moved by hand. A touch drag on the graph then pans it\n * rather than scrolling the page.\n *\n * @default false\n */\n readonly zoomable = input(false, { transform: booleanAttribute });\n\n /**\n * Lets a plain wheel zoom, with no modifier key. The page then no longer\n * scrolls while the pointer is over the graph.\n *\n * @default false\n */\n readonly wheelZoom = input(false, { transform: booleanAttribute });\n\n /**\n * The zoom, where `1` is 100%. Two-way: it follows every gesture, and a value\n * written to it zooms around the middle of the viewport, kept inside\n * `minZoom` and `maxZoom`. Ignored unless `zoomable`.\n *\n * @default 1\n */\n readonly zoom = model(1);\n\n /**\n * The smallest zoom.\n *\n * @default 0.25\n */\n readonly minZoom = input(DEFAULT_MIN_ZOOM, { transform: wrNumAttr(DEFAULT_MIN_ZOOM) });\n\n /**\n * The largest zoom. Never below `minZoom`.\n *\n * @default 4\n */\n readonly maxZoom = input(DEFAULT_MAX_ZOOM, { transform: wrNumAttr(DEFAULT_MAX_ZOOM) });\n\n /** Accessible name of the zoom-in button. Falls back to `graph.zoomIn`, then `'Zoom in'`. */\n readonly zoomInLabel = input<string | null>(null);\n\n /** Accessible name of the zoom-out button. Falls back to `graph.zoomOut`, then `'Zoom out'`. */\n readonly zoomOutLabel = input<string | null>(null);\n\n /** Accessible name of the fit button. Falls back to `graph.fit`, then `'Fit to view'`. */\n readonly fitLabel = input<string | null>(null);\n\n /**\n * An asynchronous layout rejected. Carries the rejection as thrown. The last\n * picture stays on screen, and a run that was aborted never reports here.\n */\n readonly layoutError = output<unknown>();\n\n protected readonly label = useI18nText(this.ariaLabel, 'graph.label', 'Graph');\n // Each value is a whole sentence, terminator included, so the punctuation is the\n // catalog's to choose — `。` in Japanese, `।` in Hindi.\n private readonly parentsText = useI18nFormatter('graph.parents', 'Parents: {{names}}.');\n private readonly childrenText = useI18nFormatter('graph.children', 'Children: {{names}}.');\n\n protected readonly zoomInText = useI18nText(this.zoomInLabel, 'graph.zoomIn', 'Zoom in');\n protected readonly zoomOutText = useI18nText(this.zoomOutLabel, 'graph.zoomOut', 'Zoom out');\n protected readonly fitText = useI18nText(this.fitLabel, 'graph.fit', 'Fit to view');\n\n protected readonly nodeTemplate = contentChild(WrGraphNodeTemplate);\n private readonly viewportRef = viewChild<ElementRef<HTMLElement>>('viewport');\n private readonly stageRef = viewChild<ElementRef<HTMLElement>>('stage');\n\n /** `url(#…)` for every edge's `marker-end`. */\n protected readonly markerId = `wr-graph-${graphUid++}-arrow`;\n protected readonly markerUrl = `url(#${this.markerId})`;\n protected readonly arrowSize = ARROW_SIZE;\n\n private readonly engine: WrGraphLayout = inject(WrGraphLayout, { optional: true }) ?? new WrLayeredGraphLayout();\n // Optional on purpose: `Directionality` is root-provided, so a consumer never has\n // to supply it — and a bare `TestBed` does not either.\n private readonly dir = inject(Directionality, { optional: true });\n private readonly i18n = inject(WrI18n, { optional: true });\n private readonly localeId = inject(LOCALE_ID);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly reducedMotion = inject(WrPlatform).prefersReducedMotion;\n\n private readonly isRtl = computed(() => this.dir?.valueSignal() === 'rtl');\n private readonly locale = computed(() => this.i18n?.locale() ?? this.localeId);\n\n /**\n * The size of a node that sets none of its own. Each dimension falls back on its\n * own, and the dev warning reads this same value, so it cannot name a size the\n * layout did not use.\n */\n private readonly defaultSize = computed(() => {\n const width = this.nodeWidth();\n const height = this.nodeHeight();\n return {\n width: isSize(width) ? width : DEFAULT_NODE_WIDTH,\n height: isSize(height) ? height : DEFAULT_NODE_HEIGHT,\n };\n });\n\n private readonly prepared = computed(() => {\n const { width, height } = this.defaultSize();\n return prepare(this.nodes(), this.edges(), width, height);\n });\n\n /** One run per cleaned input. A controller of its own, so aborting a run never touches another. */\n private readonly run = computed((): LayoutRun<TData> => {\n const graph = this.prepared();\n const controller = new AbortController();\n return { graph, controller, raw: this.engine.layout(graph.input, { signal: controller.signal }) };\n });\n\n /** The asynchronous run that last settled. */\n private readonly settled = signal<SettledRun<TData> | null>(null);\n\n /**\n * What is drawn. A synchronous answer is drawn in the pass that computed it. A\n * Promise keeps the previous drawing until it resolves, and a rejected one\n * keeps it for good.\n */\n private readonly drawing = linkedSignal<\n { readonly run: LayoutRun<TData>; readonly settled: SettledRun<TData> | null },\n Drawing<TData> | null\n >({\n source: () => ({ run: this.run(), settled: this.settled() }),\n computation: ({ run, settled }, previous) => {\n if (!isThenable(run.raw)) return { graph: run.graph, result: run.raw };\n if (settled?.run === run && settled.result) return { graph: run.graph, result: settled.result };\n return previous?.value ?? null;\n },\n });\n\n /**\n * Whether an asynchronous layout is running for the current inputs. The host\n * carries `wr-graph--pending` and the viewport `aria-busy` while it is. Always\n * `false` with a synchronous layout.\n */\n readonly layoutPending = computed(() => {\n const run = this.run();\n return isThenable(run.raw) && this.settled()?.run !== run;\n });\n\n /** Layout joined to the nodes and edges, direction-free, nodes in reading order. */\n private readonly placed = computed((): PlacedGraph<TData> => {\n const drawing = this.drawing();\n if (!drawing) return { width: 0, height: 0, nodes: [], edges: [] };\n const { graph, result } = drawing;\n\n const positions = new Map(result.nodes.map(placement => [placement.id, placement]));\n const nodes = graph.nodes.flatMap(prepared => {\n const at = positions.get(prepared.node.id);\n return at ? [{ ...prepared, x: at.x, y: at.y }] : [];\n });\n // Reading order is layer, then inline position. A layer centres nodes of\n // different heights on one line, so the layer is the vertical CENTRE, taken to\n // two decimals so float noise cannot split one layer in two.\n const layer = (node: PlacedNode<TData>): number => Math.round((node.y + node.height / 2) * 100);\n nodes.sort((a, b) => layer(a) - layer(b) || a.x - b.x || a.index - b.index);\n\n const routes = new Map(result.edges.map(route => [route.id, route.points]));\n const edges = graph.edges.flatMap(edge => {\n const points = routes.get(edge.id);\n return points && points.length >= 2 ? [{ edge, points }] : [];\n });\n\n return { width: result.width, height: result.height, nodes, edges };\n });\n\n /**\n * Physical pixels. Mirrored here rather than in CSS so nodes and lines get the\n * same numbers and cannot drift apart — and kept apart from the layout so a\n * direction change does not lay the graph out again.\n */\n protected readonly view = computed((): GraphView<TData> => {\n const { width, height, nodes, edges } = this.placed();\n const rtl = this.isRtl();\n const x = (value: number, size = 0): number => px(rtl ? width - value - size : value);\n const at = (point: WrGraphPoint): string => `${x(point.x)} ${px(point.y)}`;\n\n // A route as a smooth path. Every stretch between two route points is one cubic\n // Bézier with both control points at the stretch's middle height, so a line\n // leaves a parent vertically and runs through a bend without a corner — a\n // reversed edge too, whose stretches simply climb.\n //\n // The last `ARROW_SIZE` pixels are a straight lead-in. A marker takes its angle\n // from the tangent at the very end, but it covers several pixels of line, and on\n // a curve those already point elsewhere — the line came out of the side of the\n // arrowhead. On a straight piece the triangle and the line agree. A self-loop is\n // one cubic out to its reserved side with the same lead-in coming back level.\n //\n // Only `+`, `-`, `/`, `abs`, `min` and `max`, so the server and the browser\n // write the same numbers.\n const curve = (points: readonly WrGraphPoint[], loop: boolean): string => {\n const start = points[0];\n const end = points[points.length - 1];\n if (loop) {\n const right = Math.max(...points.map(point => point.x));\n const lead = Math.min(ARROW_SIZE, (right - end.x) / 2);\n const outer = x(right);\n return `M${at(start)} C${outer} ${px(start.y)} ${outer} ${px(end.y)} ${x(end.x + lead)} ${px(end.y)} L${at(end)}`;\n }\n const stretches = points.slice(1).map((to, i) => {\n const from = points[i];\n const last = i === points.length - 2;\n const lead = last ? Math.min(ARROW_SIZE, Math.abs(to.y - from.y) / 2) : 0;\n const toY = to.y < from.y ? to.y + lead : to.y - lead;\n const middle = px((from.y + toY) / 2);\n const bend = `C${x(from.x)} ${middle} ${x(to.x)} ${middle} ${x(to.x)} ${px(toY)}`;\n return last ? `${bend} L${at(to)}` : bend;\n });\n return [`M${at(start)}`, ...stretches].join(' ');\n };\n\n return {\n width: px(width),\n height: px(height),\n nodes: nodes.map(placed => ({\n node: placed.node,\n width: placed.width,\n height: placed.height,\n transform: `translate(${x(placed.x, placed.width)}px, ${px(placed.y)}px)`,\n })),\n edges: edges.map(({ edge, points }) => ({\n id: edge.id,\n from: edge.from,\n to: edge.to,\n d: curve(points, edge.from === edge.to),\n })),\n };\n });\n\n /** The zoom bounds, cleaned: a positive minimum, and a maximum never under it. */\n private readonly bounds = computed(() => {\n const min = isSize(this.minZoom()) ? this.minZoom() : DEFAULT_MIN_ZOOM;\n const max = isSize(this.maxZoom()) ? this.maxZoom() : DEFAULT_MAX_ZOOM;\n return { min, max: Math.max(min, max) };\n });\n\n /** Where the drawing is. The one write per frame that moves it. */\n private readonly at = signal<GraphTransform>(IDENTITY);\n\n /**\n * How far the drawing sits from its natural place, in pixels. Moves with every\n * pan and with a zoom around a point. `{ x: 0, y: 0 }` until the view is fitted\n * or moved.\n */\n readonly pan: Signal<WrGraphPoint> = computed(\n () => {\n const { x, y } = this.at();\n return { x, y };\n },\n { equal: (a, b) => a.x === b.x && a.y === b.y }\n );\n\n /** The size of the drawing, which a fit answers to. Equal sizes are one value. */\n private readonly size = computed(\n () => {\n const { width, height } = this.view();\n return { width, height };\n },\n { equal: (a, b) => a.width === b.width && a.height === b.height }\n );\n\n /** One `transform` on the stage. Absent at 100% in its natural place, which is also what a prerender ships. */\n protected readonly stageTransform = computed(() => {\n const at = this.at();\n if (!this.zoomable() || sameTransform(at, IDENTITY)) return null;\n return `translate(${px(at.x)}px, ${px(at.y)}px) scale(${at.k})`;\n });\n\n protected readonly atMinZoom = computed(() => this.at().k <= this.bounds().min);\n protected readonly atMaxZoom = computed(() => this.at().k >= this.bounds().max);\n\n /** A drag or a pinch is under way: the host carries `wr-graph--panning`. */\n protected readonly panning = signal(false);\n /** The move in flight came from a button or a key, so the stage eases to it. */\n protected readonly animated = signal(false);\n\n /** The view was moved by hand, so a new layout no longer fits it. */\n private moved = false;\n /** Pointer and wheel moves wait here for the next frame. */\n private queued: GraphTransform | null = null;\n private frameId: number | null = null;\n private readonly pointers = new Map<number, { x: number; y: number }>();\n private dragging = false;\n\n /**\n * The visually hidden sentence per node id: its parents, then its children, as\n * name lists. Never a count — the catalogs have no plural forms. A neighbour\n * linked by several edges is named once, and names follow reading order.\n */\n protected readonly relations = computed(() => {\n const { nodes } = this.placed();\n const list = listFormat(this.locale());\n const order = new Map(nodes.map((placed, i) => [placed.node.id, i]));\n const parents = new Map<string, Set<string>>();\n const children = new Map<string, Set<string>>();\n const link = (map: Map<string, Set<string>>, id: string, neighbour: string): void => {\n const set = map.get(id) ?? new Set<string>();\n set.add(neighbour);\n map.set(id, set);\n };\n for (const { from, to } of this.drawing()?.graph.edges ?? []) {\n if (!order.has(from) || !order.has(to)) continue;\n link(parents, to, from);\n link(children, from, to);\n }\n\n const names = (ids: Set<string> | undefined): string | null => {\n if (!ids?.size) return null;\n const sorted = [...ids].sort((a, b) => (order.get(a) ?? 0) - (order.get(b) ?? 0));\n return list.format(sorted.map(id => nodes[order.get(id) ?? 0].node.label));\n };\n\n const text = new Map<string, string>();\n for (const { node } of nodes) {\n const sentences: string[] = [];\n const parentNames = names(parents.get(node.id));\n const childNames = names(children.get(node.id));\n if (parentNames) sentences.push(this.parentsText({ names: parentNames }));\n if (childNames) sentences.push(this.childrenText({ names: childNames }));\n // Every mark of punctuation comes from the catalog. The one character the\n // component adds is the space between two sentences — a word boundary to a\n // screen reader, and silent in a script that sets none.\n if (sentences.length) text.set(node.id, sentences.join(' '));\n }\n return text;\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('graph');\n // Settles each asynchronous run. The cleanup runs when the inputs change and\n // when the graph is destroyed, so either one aborts the run in flight, and a\n // result that lands after it is dropped.\n effect(onCleanup => {\n const run = this.run();\n const { raw } = run;\n if (!isThenable(raw)) return;\n const { signal: aborted } = run.controller;\n onCleanup(() => run.controller.abort());\n raw.then(\n result => {\n if (!aborted.aborted) this.settled.set({ run, result });\n },\n (error: unknown) => {\n if (aborted.aborted) return;\n this.settled.set({ run, result: null });\n if (isDevMode()) warn('the layout rejected, so the last drawn result stays.', error);\n this.layoutError.emit(error);\n }\n );\n });\n\n // A zoom written from outside. The component's own moves write `zoom` and the\n // transform together, so they read as equal here and pass through.\n effect(() => {\n const zoom = this.zoom();\n const { min, max } = this.bounds();\n if (!this.zoomable()) return;\n untracked(() => {\n const from = this.current();\n const k = clampZoom(zoom, min, max);\n if (k !== from.k) {\n const frame = this.frame();\n this.moved = true;\n this.commit(this.bounded(zoomAround(from, k, frame.width / 2, frame.height / 2, frame), frame));\n } else if (k !== zoom) {\n this.zoom.set(k);\n }\n });\n });\n\n // Wheel, pointers and keys, bound by hand: only in a browser and only while\n // `zoomable`, so a graph that does not zoom carries no wheel listener to\n // hold up the page's scrolling.\n effect(onCleanup => {\n const viewport = this.viewportRef()?.nativeElement;\n if (!this.isBrowser || !viewport || !this.zoomable()) return;\n const controller = new AbortController();\n const { signal: stop } = controller;\n viewport.addEventListener('wheel', event => this.onWheel(event), { signal: stop, passive: false });\n viewport.addEventListener('keydown', event => this.onKeydown(event), { signal: stop });\n viewport.addEventListener('pointerdown', event => this.onPointerDown(event, viewport), { signal: stop });\n viewport.addEventListener('pointermove', event => this.onPointerMove(event, viewport), { signal: stop });\n viewport.addEventListener('pointerup', event => this.onPointerEnd(event, viewport), { signal: stop });\n viewport.addEventListener('pointercancel', event => this.onPointerEnd(event, viewport), { signal: stop });\n onCleanup(() => {\n controller.abort();\n this.pointers.clear();\n this.dragging = false;\n untracked(() => this.panning.set(false));\n });\n });\n\n // Fits the first drawing and every one of another size, the result of an\n // asynchronous layout included. Once the view was moved by hand it is kept,\n // and only pulled back if the new drawing would leave it empty.\n afterRenderEffect(() => {\n this.size();\n if (!this.zoomable()) return;\n untracked(() => this.settle());\n });\n\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n const viewport = this.viewportRef()?.nativeElement;\n if (!viewport || typeof ResizeObserver === 'undefined') return;\n // A viewport that was hidden or resized: the fit is for the box it has now.\n const observer = new ResizeObserver(() => {\n if (this.zoomable()) this.settle();\n });\n observer.observe(viewport);\n destroyRef.onDestroy(() => observer.disconnect());\n });\n destroyRef.onDestroy(() => this.cancelFrame());\n\n if (isDevMode()) {\n effect(() => {\n const graph = this.prepared();\n if (graph.duplicates.length) {\n warn(\n `node id(s) ${graph.duplicates.map(id => `\"${id}\"`).join(', ')} appear more than once. ` +\n `The first occurrence of each is drawn and the rest are skipped.`\n );\n }\n if (graph.dangling.length) {\n warn(`edge(s) ${graph.dangling.join(', ')} name a node that does not exist and were skipped.`);\n }\n if (graph.badSizes.length) {\n warn(\n `node(s) ${graph.badSizes.map(id => `\"${id}\"`).join(', ')} have a width or height that is not a ` +\n `positive finite number, so nodeWidth / nodeHeight is used instead.`\n );\n }\n const width = this.nodeWidth();\n const height = this.nodeHeight();\n const invalid = [\n ...(isSize(width) ? [] : [`nodeWidth (${String(width)})`]),\n ...(isSize(height) ? [] : [`nodeHeight (${String(height)})`]),\n ];\n if (invalid.length) {\n const used = this.defaultSize();\n warn(\n `${invalid.join(' and ')} must be a positive finite number, so a node with no size of its own is ` +\n `drawn ${used.width} × ${used.height}.`\n );\n }\n });\n effect(() => {\n const drawing = this.drawing();\n const problems = drawing ? layoutProblems(drawing.graph, drawing.result) : [];\n if (problems.length) warn(`the layout result cannot be drawn faithfully: ${problems.join('; ')}.`);\n });\n }\n }\n\n /**\n * Shows the whole drawing, centred, at the largest zoom that fits and never\n * above 100%. The view follows the layout again afterwards: a result of\n * another size is fitted too. Does nothing unless `zoomable`.\n */\n fit(): void {\n this.fitView(false);\n }\n\n /**\n * Puts the drawing back in its natural place at 100%. Counts as moving the\n * view, so a later layout does not fit it. Does nothing unless `zoomable`.\n */\n resetView(): void {\n if (!this.zoomable()) return;\n this.moved = true;\n this.commit(IDENTITY);\n }\n\n protected zoomIn(): void {\n this.zoomBy(ZOOM_STEP);\n }\n\n protected zoomOut(): void {\n this.zoomBy(1 / ZOOM_STEP);\n }\n\n protected fitView(animate: boolean): void {\n if (!this.zoomable()) return;\n this.moved = false;\n const fitted = this.fitted();\n if (fitted) this.commit(fitted, animate);\n }\n\n /** The viewport's box and where the stage starts in it. All zeros before the first render and on the server. */\n private frame(): MeasuredFrame {\n const viewport = this.viewportRef()?.nativeElement;\n const stage = this.stageRef()?.nativeElement;\n if (!this.isBrowser || !viewport || !stage) return NO_FRAME;\n const rect = viewport.getBoundingClientRect();\n return {\n left: rect.left,\n top: rect.top,\n width: rect.width,\n height: rect.height,\n // `offsetLeft` ignores the transform, and is where a stage wider than the\n // viewport starts under RTL: left of it.\n originX: viewport.clientLeft + stage.offsetLeft,\n originY: viewport.clientTop + stage.offsetTop,\n };\n }\n\n /** The fitted transform, or `null` while there is nothing to fit or no box to fit it in. */\n private fitted(): GraphTransform | null {\n const viewport = this.viewportRef()?.nativeElement;\n const frame = this.frame();\n const { width, height } = this.size();\n if (!viewport || !frame.width || !frame.height || !width || !height) return null;\n const style = getComputedStyle(viewport);\n const inset = (value: string): number => Number.parseFloat(value) || 0;\n const { min, max } = this.bounds();\n return fitTransform(\n frame,\n {\n top: inset(style.paddingTop),\n right: inset(style.paddingRight),\n bottom: inset(style.paddingBottom),\n left: inset(style.paddingLeft),\n },\n width,\n height,\n min,\n max\n );\n }\n\n /** After a new drawing or a new box: fit it, or keep a view moved by hand within reach. */\n private settle(): void {\n if (!this.moved) {\n const fitted = this.fitted();\n if (fitted) this.commit(fitted);\n return;\n }\n this.commit(this.bounded(this.current(), this.frame()));\n }\n\n /** The transform the next frame will show. */\n private current(): GraphTransform {\n return this.queued ?? this.at();\n }\n\n private bounded(at: GraphTransform, frame: GraphFrame): GraphTransform {\n const { width, height } = this.size();\n return clampPan(at, frame, width, height);\n }\n\n private commit(next: GraphTransform, animate = false): void {\n this.cancelFrame();\n if (sameTransform(next, this.at())) return;\n this.animated.set(animate && !this.reducedMotion());\n this.at.set(next);\n this.zoom.set(next.k);\n }\n\n /** A move from a pointer or the wheel: many may arrive in one frame, and one is drawn. */\n private schedule(next: GraphTransform): void {\n if (sameTransform(next, this.current())) return;\n this.moved = true;\n this.queued = next;\n this.frameId ??= requestAnimationFrame(() => {\n this.frameId = null;\n const queued = this.queued;\n if (queued) this.commit(queued);\n });\n }\n\n private cancelFrame(): void {\n if (this.frameId !== null) cancelAnimationFrame(this.frameId);\n this.frameId = null;\n this.queued = null;\n }\n\n /** A step from a button or a key, around the middle of the viewport. */\n private zoomBy(factor: number): void {\n const frame = this.frame();\n const from = this.current();\n const { min, max } = this.bounds();\n const k = clampZoom(from.k * factor, min, max);\n if (k === from.k) return;\n this.moved = true;\n this.commit(this.bounded(zoomAround(from, k, frame.width / 2, frame.height / 2, frame), frame), true);\n }\n\n private panBy(dx: number, dy: number): void {\n const from = this.current();\n const next = this.bounded({ k: from.k, x: from.x + dx, y: from.y + dy }, this.frame());\n if (sameTransform(next, from)) return;\n this.moved = true;\n this.commit(next, true);\n }\n\n private onWheel(event: WheelEvent): void {\n if (!event.ctrlKey && !event.metaKey && !this.wheelZoom()) return;\n // Taken even at a bound, or the browser would zoom the page instead.\n event.preventDefault();\n const frame = this.frame();\n const unit = event.deltaMode === 1 ? WHEEL_LINE : event.deltaMode === 2 ? frame.height : 1;\n const delta = Math.min(WHEEL_MAX, Math.max(-WHEEL_MAX, event.deltaY * unit));\n const from = this.current();\n const { min, max } = this.bounds();\n const k = clampZoom(from.k * Math.exp(-delta * WHEEL_RATE), min, max);\n if (k === from.k) return;\n this.schedule(\n this.bounded(zoomAround(from, k, event.clientX - frame.left, event.clientY - frame.top, frame), frame)\n );\n }\n\n private onKeydown(event: KeyboardEvent): void {\n // Only the viewport's own keys: a field inside a node keeps its arrows, and\n // `Ctrl` with `+` stays the browser's.\n if (event.target !== event.currentTarget || event.ctrlKey || event.metaKey || event.altKey) return;\n // An arrow moves the view, as it scrolls a page: the drawing goes the other\n // way, and left is left under RTL too.\n switch (event.key) {\n case '+':\n case '=':\n this.zoomIn();\n break;\n case '-':\n case '_':\n this.zoomOut();\n break;\n case '0':\n this.fitView(true);\n break;\n case 'ArrowLeft':\n this.panBy(PAN_STEP, 0);\n break;\n case 'ArrowRight':\n this.panBy(-PAN_STEP, 0);\n break;\n case 'ArrowUp':\n this.panBy(0, PAN_STEP);\n break;\n case 'ArrowDown':\n this.panBy(0, -PAN_STEP);\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n private onPointerDown(event: PointerEvent, viewport: HTMLElement): void {\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target instanceof Element ? event.target.closest(INTERACTIVE) : null;\n if (target && target !== viewport) return;\n this.pointers.set(event.pointerId, { x: event.clientX, y: event.clientY });\n // A second finger makes it a pinch at once; one pointer waits for the threshold.\n if (this.pointers.size === 2) this.startDrag(viewport);\n else if (this.pointers.size > 2) this.pointers.delete(event.pointerId);\n }\n\n private onPointerMove(event: PointerEvent, viewport: HTMLElement): void {\n const last = this.pointers.get(event.pointerId);\n if (!last) return;\n // A mouse released outside the viewport before the drag began sends no `pointerup` here.\n if (event.pointerType === 'mouse' && event.buttons === 0) {\n this.onPointerEnd(event, viewport);\n return;\n }\n const dx = event.clientX - last.x;\n const dy = event.clientY - last.y;\n if (!this.dragging) {\n if (Math.abs(dx) < DRAG_THRESHOLD && Math.abs(dy) < DRAG_THRESHOLD) return;\n this.startDrag(viewport);\n }\n\n const frame = this.frame();\n const from = this.current();\n const point = { x: event.clientX, y: event.clientY };\n const other = [...this.pointers].find(([id]) => id !== event.pointerId)?.[1];\n this.pointers.set(event.pointerId, point);\n if (!other) {\n this.schedule(this.bounded({ k: from.k, x: from.x + dx, y: from.y + dy }, frame));\n return;\n }\n\n // A pinch: the zoom follows the distance between the two fingers, around\n // where their middle was, and the drawing then follows the middle.\n const before = Math.hypot(last.x - other.x, last.y - other.y);\n const after = Math.hypot(point.x - other.x, point.y - other.y);\n const { min, max } = this.bounds();\n const k = before > 0 ? clampZoom((from.k * after) / before, min, max) : from.k;\n const midX = (last.x + other.x) / 2;\n const midY = (last.y + other.y) / 2;\n const zoomed = zoomAround(from, k, midX - frame.left, midY - frame.top, frame);\n this.schedule(this.bounded({ k, x: zoomed.x + dx / 2, y: zoomed.y + dy / 2 }, frame));\n }\n\n private onPointerEnd(event: PointerEvent, viewport: HTMLElement): void {\n if (!this.pointers.delete(event.pointerId)) return;\n if (this.dragging && viewport.hasPointerCapture?.(event.pointerId)) viewport.releasePointerCapture(event.pointerId);\n if (this.pointers.size) return;\n this.dragging = false;\n this.panning.set(false);\n }\n\n /** Capture goes to the viewport only now, so a press that never moved still clicks what it pressed. */\n private startDrag(viewport: HTMLElement): void {\n this.dragging = true;\n this.panning.set(true);\n this.animated.set(false);\n for (const id of this.pointers.keys()) viewport.setPointerCapture?.(id);\n }\n}\n","@let graph = view();\n<!-- The scroller is the one tab stop: a named group, so its label is allowed, and focusable so a keyboard can scroll it — or, when zoomable, zoom and pan it. -->\n<div\n #viewport\n class=\"wr-graph__viewport\"\n role=\"group\"\n tabindex=\"0\"\n [attr.aria-label]=\"label()\"\n [attr.aria-busy]=\"layoutPending() ? 'true' : null\"\n>\n <div\n #stage\n class=\"wr-graph__stage\"\n [class.wr-graph__stage--animated]=\"animated()\"\n [style.width.px]=\"graph.width\"\n [style.height.px]=\"graph.height\"\n [style.transform]=\"stageTransform()\"\n (transitionend)=\"animated.set(false)\"\n >\n <svg\n class=\"wr-graph__edges\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.width]=\"graph.width\"\n [attr.height]=\"graph.height\"\n >\n <defs>\n <marker\n [attr.id]=\"markerId\"\n viewBox=\"0 0 10 10\"\n refX=\"10\"\n refY=\"5\"\n markerUnits=\"userSpaceOnUse\"\n [attr.markerWidth]=\"arrowSize\"\n [attr.markerHeight]=\"arrowSize\"\n orient=\"auto\"\n >\n <polygon points=\"0,1 10,5 0,9\" />\n </marker>\n </defs>\n @for (edge of graph.edges; track edge.id) {\n <path\n class=\"wr-graph__edge\"\n [attr.d]=\"edge.d\"\n [attr.data-from]=\"edge.from\"\n [attr.data-to]=\"edge.to\"\n [attr.marker-end]=\"markerUrl\"\n />\n }\n </svg>\n <!-- Items are DIRECT children of the list: a wrapper carrying ARIA or a tabindex would break ownership. -->\n <div class=\"wr-graph__nodes\" [attr.role]=\"graph.nodes.length ? 'list' : null\">\n @for (entry of graph.nodes; track entry.node.id) {\n @let relation = relations().get(entry.node.id);\n <div\n class=\"wr-graph__node\"\n role=\"listitem\"\n [style.width.px]=\"entry.width\"\n [style.height.px]=\"entry.height\"\n [style.transform]=\"entry.transform\"\n >\n @if (nodeTemplate(); as custom) {\n <ng-container [ngTemplateOutlet]=\"custom.template\" [ngTemplateOutletContext]=\"{ $implicit: entry.node }\" />\n } @else {\n <div class=\"wr-graph__card\">{{ entry.node.label }}</div>\n }\n @if (relation) {\n <span class=\"wr-graph__sr-only\">{{ relation }}</span>\n }\n </div>\n }\n </div>\n </div>\n</div>\n<!-- After the viewport, never inside it: the buttons stay put while the drawing moves, and follow it in the tab order. -->\n@if (zoomable()) {\n <div class=\"wr-graph__controls\">\n <!-- `aria-disabled`, not `disabled`: a button that reached its bound under the keyboard keeps the focus. -->\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-in\"\n [attr.aria-label]=\"zoomInText()\"\n [attr.aria-disabled]=\"atMaxZoom() ? 'true' : null\"\n (click)=\"zoomIn()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n <path d=\"M12 5v14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--zoom-out\"\n [attr.aria-label]=\"zoomOutText()\"\n [attr.aria-disabled]=\"atMinZoom() ? 'true' : null\"\n (click)=\"zoomOut()\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-graph__control wr-graph__control--fit\"\n [attr.aria-label]=\"fitText()\"\n (click)=\"fitView(true)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M8 3H5a2 2 0 0 0-2 2v3\" />\n <path d=\"M21 8V5a2 2 0 0 0-2-2h-3\" />\n <path d=\"M3 16v3a2 2 0 0 0 2 2h3\" />\n <path d=\"M16 21h3a2 2 0 0 0 2-2v-3\" />\n </svg>\n </button>\n </div>\n}\n"],"mappings":";;;;;;;;;;;;;AA+BA,IAAa,sBAAb,MAAa,oBAAmB;CACrB,WAAW,OAAwC,WAAW;CAD5D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAmB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAnB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAmB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAH/B,MAAA;EAAU,MAAA,CAAA,EACT,UAAU,2BACX,CAAA;;;;;;;;;ACpBD,MAAM,aAAa;AACnB,MAAM,mBAAmB;AAczB,SAAS,aAAa,OAAmB;CACvC,MAAM,SAAqB,MAAM,KAAK,EAAE,QAAQ,MAAM,UAAS,SAAU,CAAA,CAAE;CAC3E,MAAM,SAAqB,MAAM,KAAK,EAAE,QAAQ,MAAM,UAAS,SAAU,CAAA,CAAE;CAC3E,MAAM,KAAK,SAAS,MAAM,SAAS,OAAO,KAAK,CAAC,KAAK,IAAI,CAAC;CAC1D,MAAM,UAAU,MAAM,KAAK,UA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|
250
250
|
minVersion: "12.0.0",
|
|
251
|
-
version: "22.2.
|
|
251
|
+
version: "22.2.6",
|
|
252
252
|
ngImport: i0,
|
|
253
253
|
type: WrHotkey,
|
|
254
254
|
deps: [],
|
|
@@ -256,14 +256,14 @@ var WrHotkey = class WrHotkey {
|
|
|
256
256
|
});
|
|
257
257
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
258
258
|
minVersion: "22.0.0",
|
|
259
|
-
version: "22.2.
|
|
259
|
+
version: "22.2.6",
|
|
260
260
|
ngImport: i0,
|
|
261
261
|
type: WrHotkey
|
|
262
262
|
});
|
|
263
263
|
};
|
|
264
264
|
i0.ɵɵngDeclareClassMetadata({
|
|
265
265
|
minVersion: "12.0.0",
|
|
266
|
-
version: "22.2.
|
|
266
|
+
version: "22.2.6",
|
|
267
267
|
ngImport: i0,
|
|
268
268
|
type: WrHotkey,
|
|
269
269
|
decorators: [{ type: Service }],
|
|
@@ -308,7 +308,7 @@ var WrHotkeyBinding = class WrHotkeyBinding {
|
|
|
308
308
|
}
|
|
309
309
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
310
310
|
minVersion: "12.0.0",
|
|
311
|
-
version: "22.2.
|
|
311
|
+
version: "22.2.6",
|
|
312
312
|
ngImport: i0,
|
|
313
313
|
type: WrHotkeyBinding,
|
|
314
314
|
deps: [],
|
|
@@ -316,7 +316,7 @@ var WrHotkeyBinding = class WrHotkeyBinding {
|
|
|
316
316
|
});
|
|
317
317
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
318
318
|
minVersion: "17.1.0",
|
|
319
|
-
version: "22.2.
|
|
319
|
+
version: "22.2.6",
|
|
320
320
|
type: WrHotkeyBinding,
|
|
321
321
|
isStandalone: true,
|
|
322
322
|
selector: "[wrHotkey]",
|
|
@@ -363,7 +363,7 @@ var WrHotkeyBinding = class WrHotkeyBinding {
|
|
|
363
363
|
};
|
|
364
364
|
i0.ɵɵngDeclareClassMetadata({
|
|
365
365
|
minVersion: "12.0.0",
|
|
366
|
-
version: "22.2.
|
|
366
|
+
version: "22.2.6",
|
|
367
367
|
ngImport: i0,
|
|
368
368
|
type: WrHotkeyBinding,
|
|
369
369
|
decorators: [{
|