@ngstarter-ui/components 22.3.5 → 22.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/ai/component-registry.json +186 -101
- package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
- package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
- package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
- package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
- package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
- package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
- package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
- package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
- package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
- package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
- package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
- package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
- package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
- package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
- package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
- package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
- package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
- package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
- package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
- package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
- package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
- package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
- package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
- package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
- package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
- package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
- package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
- package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
- package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
- package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
- package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
- package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
- package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
- package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
- package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
- package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
- package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
- package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
- package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
- package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
- package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
- package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
- package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
- package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
- package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
- package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
- package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
- package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
- package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
- package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
- package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
- package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
- package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
- package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
- package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
- package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
- package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
- package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
- package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
- package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
- package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components.mjs +3 -5
- package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
- package/package.json +11 -10
- package/styles/_tokens.scss +1 -0
- package/types/ngstarter-ui-components-action-required.d.ts +34 -14
- package/types/ngstarter-ui-components-alert.d.ts +53 -44
- package/types/ngstarter-ui-components-announcement.d.ts +74 -53
- package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
- package/types/ngstarter-ui-components-avatar.d.ts +113 -66
- package/types/ngstarter-ui-components-badge.d.ts +73 -37
- package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
- package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
- package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
- package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
- package/types/ngstarter-ui-components-button.d.ts +69 -27
- package/types/ngstarter-ui-components-calendar.d.ts +123 -71
- package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
- package/types/ngstarter-ui-components-card.d.ts +75 -71
- package/types/ngstarter-ui-components-carousel.d.ts +115 -69
- package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
- package/types/ngstarter-ui-components-chips.d.ts +288 -195
- package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
- package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
- package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
- package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
- package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
- package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
- package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
- package/types/ngstarter-ui-components-confirm.d.ts +24 -29
- package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
- package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
- package/types/ngstarter-ui-components-core.d.ts +513 -467
- package/types/ngstarter-ui-components-country-select.d.ts +170 -97
- package/types/ngstarter-ui-components-crop.d.ts +67 -52
- package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
- package/types/ngstarter-ui-components-data-view.d.ts +811 -567
- package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
- package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
- package/types/ngstarter-ui-components-dialog.d.ts +138 -116
- package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
- package/types/ngstarter-ui-components-divider.d.ts +29 -17
- package/types/ngstarter-ui-components-drawer.d.ts +39 -30
- package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
- package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
- package/types/ngstarter-ui-components-events.d.ts +73 -57
- package/types/ngstarter-ui-components-expand.d.ts +55 -25
- package/types/ngstarter-ui-components-expansion.d.ts +93 -64
- package/types/ngstarter-ui-components-file-type.d.ts +53 -27
- package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
- package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
- package/types/ngstarter-ui-components-form-field.d.ts +116 -105
- package/types/ngstarter-ui-components-gauge.d.ts +32 -20
- package/types/ngstarter-ui-components-grid.d.ts +66 -50
- package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
- package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
- package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
- package/types/ngstarter-ui-components-icon.d.ts +39 -38
- package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
- package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
- package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
- package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
- package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
- package/types/ngstarter-ui-components-incidents.d.ts +97 -104
- package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
- package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
- package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
- package/types/ngstarter-ui-components-input.d.ts +82 -54
- package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
- package/types/ngstarter-ui-components-kbd.d.ts +8 -12
- package/types/ngstarter-ui-components-layout.d.ts +131 -87
- package/types/ngstarter-ui-components-list.d.ts +123 -88
- package/types/ngstarter-ui-components-logo.d.ts +21 -21
- package/types/ngstarter-ui-components-marquee.d.ts +41 -34
- package/types/ngstarter-ui-components-menu.d.ts +329 -221
- package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
- package/types/ngstarter-ui-components-navigation.d.ts +186 -125
- package/types/ngstarter-ui-components-notifications.d.ts +104 -89
- package/types/ngstarter-ui-components-number-input.d.ts +138 -96
- package/types/ngstarter-ui-components-option.d.ts +102 -68
- package/types/ngstarter-ui-components-overlay.d.ts +7 -12
- package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
- package/types/ngstarter-ui-components-paginator.d.ts +171 -129
- package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
- package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
- package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
- package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
- package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
- package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
- package/types/ngstarter-ui-components-popover.d.ts +128 -89
- package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
- package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
- package/types/ngstarter-ui-components-radio.d.ts +100 -47
- package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
- package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
- package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
- package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
- package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
- package/types/ngstarter-ui-components-segmented.d.ts +93 -61
- package/types/ngstarter-ui-components-select.d.ts +366 -266
- package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
- package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
- package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
- package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
- package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
- package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
- package/types/ngstarter-ui-components-slider.d.ts +123 -82
- package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
- package/types/ngstarter-ui-components-sort.d.ts +99 -63
- package/types/ngstarter-ui-components-spinner.d.ts +49 -27
- package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
- package/types/ngstarter-ui-components-split.d.ts +276 -195
- package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
- package/types/ngstarter-ui-components-stepper.d.ts +57 -43
- package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
- package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
- package/types/ngstarter-ui-components-table.d.ts +256 -228
- package/types/ngstarter-ui-components-tabs.d.ts +231 -138
- package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
- package/types/ngstarter-ui-components-tiles.d.ts +166 -104
- package/types/ngstarter-ui-components-timeline.d.ts +45 -57
- package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
- package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
- package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
- package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
- package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
- package/types/ngstarter-ui-components-tree.d.ts +355 -229
- package/types/ngstarter-ui-components-upload.d.ts +216 -131
- package/types/ngstarter-ui-components-video-player.d.ts +130 -67
- package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
- package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
- package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
- package/types/ngstarter-ui-components.d.ts +2 -2
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-editor-content-editable.directive-WzD9_71s.mjs","names":["DOCUMENT"],"sources":["../../../projects/components/content-editor/src/html/to-html.ts","../../../projects/components/content-editor/src/html/html-serializer.ts","../../../projects/components/content-editor/src/config.ts","../../../projects/components/content-editor/src/import/types.ts","../../../projects/components/content-editor/src/import/from-json.ts","../../../projects/components/content-editor/src/import/from-html.ts","../../../projects/components/content-editor/src/import/content-importer.ts","../../../projects/components/content-editor/src/import/inline-content.ts","../../../projects/components/content-editor/src/content-editor-content-editable.directive.ts"],"sourcesContent":["import {\n isNgsHeadlessEditorTextContent, normalizeNgsHeadlessEditorColor, NgsHeadlessEditorMark\n} from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorBlock, ContentEditorDocument, ContentEditorText } from '../types';\nimport { ContentEditorConfig } from '../config';\nimport { CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS } from './default-converters';\nimport { ContentEditorHtmlContext } from './types';\nimport { escapeContentEditorHtml, safeContentEditorHtmlUrl } from './html-utils';\n\nconst MARK_TAGS: Readonly<Record<string, string>> = {\n bold: 'strong', italic: 'em', strike: 's', underline: 'u', code: 'code', superscript: 'sup', subscript: 'sub'\n};\n\n/** Pure document export: works without DOM, Angular DI, or a mounted editor. */\nexport function contentEditorToHtml(document: ContentEditorDocument, config: ContentEditorConfig = {}): string {\n return serialize(document.blocks, config);\n}\nexport function contentEditorBlockToHtml(block: ContentEditorBlock, config: ContentEditorConfig = {}): string {\n return serialize([block], config);\n}\n\nfunction serialize(blocks: readonly ContentEditorBlock[], config: ContentEditorConfig): string {\n const styles = new Set<string>();\n const context: ContentEditorHtmlContext = {\n escape: escapeContentEditorHtml,\n safeUrl: safeContentEditorHtmlUrl,\n addStyles: css => { if (config.includeStyles !== false) styles.add(css); },\n renderBlock: block => {\n const converter = config.blocks?.[block.type]?.toHtml ?? defaultConverter(block.type) ?? config.unknownBlockToHtml;\n if (!converter) throw new Error(`No HTML converter for Content Editor block \"${block.type}\".`);\n return converter(block, context);\n },\n renderBlocks: children => children.map(context.renderBlock).join(''),\n defaultToHtml: block => {\n const converter = defaultConverter(block.type);\n if (!converter) throw new Error(`No default HTML converter for Content Editor block \"${block.type}\".`);\n return converter(block, context);\n },\n renderText: text => renderText(text, context, config)\n };\n const html = context.renderBlocks(blocks);\n return [...styles].map(css => `<style>${css}</style>`).join('') + html;\n}\n\nfunction renderText(text: ContentEditorText, ctx: ContentEditorHtmlContext, config: ContentEditorConfig): string {\n if (!isNgsHeadlessEditorTextContent(text)) return '';\n return text.map(run => run.marks.reduce((html, mark) => {\n const override = config.marks && Object.hasOwn(config.marks, mark.type) ? config.marks[mark.type] : undefined;\n return override ? override(html, mark, ctx) : renderMark(html, mark, ctx);\n }, ctx.escape(run.text).replace(/\\r\\n|\\r|\\n/g, '<br>'))).join('');\n}\n\nfunction renderMark(html: string, mark: NgsHeadlessEditorMark, ctx: ContentEditorHtmlContext): string {\n const tag = Object.hasOwn(MARK_TAGS, mark.type) ? MARK_TAGS[mark.type] : undefined;\n if (tag) return `<${tag}>${html}</${tag}>`;\n if (mark.type === 'link') {\n const href = ctx.safeUrl(mark.attrs?.['href']);\n if (!href) return html;\n const target = mark.attrs?.['target'] === '_blank' ? '_blank' : '_self';\n return `<a href=\"${ctx.escape(href)}\" target=\"${target}\" rel=\"noopener noreferrer\">${html}</a>`;\n }\n if (mark.type === 'textColor' || mark.type === 'backgroundColor') {\n const color = normalizeNgsHeadlessEditorColor(String(mark.attrs?.['color'] ?? ''));\n return color ? `<span style=\"${mark.type === 'textColor' ? 'color' : 'background-color'}:${ctx.escape(color)}\">${html}</span>` : html;\n }\n return html;\n}\n\nfunction defaultConverter(type: string) {\n return Object.hasOwn(CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS, type) ? CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS[type] : undefined;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { CONTENT_EDITOR_CONFIG, ContentEditorConfig, mergeContentEditorConfig } from '../config';\nimport { ContentEditorBlock, ContentEditorDocument } from '../types';\nimport { contentEditorBlockToHtml, contentEditorToHtml } from './to-html';\n\n/** Export saved documents with the current environment's shared configuration. */\n@Injectable({ providedIn: 'root' })\nexport class ContentEditorHtmlSerializer {\n private readonly config = inject(CONTENT_EDITOR_CONFIG);\n toHtml(document: ContentEditorDocument, config: ContentEditorConfig = {}): string {\n return contentEditorToHtml(document, mergeContentEditorConfig(this.config, config));\n }\n blockToHtml(block: ContentEditorBlock, config: ContentEditorConfig = {}): string {\n return contentEditorBlockToHtml(block, mergeContentEditorConfig(this.config, config));\n }\n}\n","import type { ContentEditorBlock } from './types';\nimport type { ContentEditorDraftConfig } from './draft';\nimport { EnvironmentProviders, InjectionToken, inject, makeEnvironmentProviders, Signal, Type } from '@angular/core';\nimport { ContentEditorBlockHtmlConverter, ContentEditorMarkHtmlConverter } from './html/types';\nimport { ContentEditorHtmlSerializer } from './html/html-serializer';\nimport { ContentEditorImporter } from './import/content-importer';\nimport type { ContentEditorBlockHtmlImporter, ContentEditorBlockImportValidator, ContentEditorImportMarkDefinition } from './import/types';\n\nexport interface ContentEditorBlockConfig {\n /** Eager component, or loadEditor for lazy loading; the lazy loader takes precedence. */\n editor?: Type<unknown>;\n loadEditor?: () => Promise<Type<unknown>>;\n renderer?: Type<unknown>;\n /** Native initial data. The editor supplies a fresh id and the configured type. */\n create?: () => Pick<ContentEditorBlock, 'content' | 'attrs'>;\n /** Adds the block to the global insertion menu. */\n menu?: { title: string; description?: string; iconName?: string; settings?: Readonly<Record<string, unknown>> };\n toHtml?: ContentEditorBlockHtmlConverter;\n fromHtml?: ContentEditorBlockHtmlImporter;\n validateImport?: ContentEditorBlockImportValidator;\n options?: Readonly<Record<string, unknown>>;\n}\n\nexport interface ContentEditorConfig {\n blocks?: Readonly<Record<string, ContentEditorBlockConfig>>;\n marks?: Readonly<Record<string, ContentEditorMarkHtmlConverter>>;\n includeStyles?: boolean;\n draft?: ContentEditorDraftConfig;\n /** Additional or overridden mark definitions used when importing HTML. */\n importMarks?: readonly ContentEditorImportMarkDefinition[];\n /** Unknown blocks throw by default to avoid silently losing saved content. */\n unknownBlockToHtml?: ContentEditorBlockHtmlConverter;\n}\n\n/** Nested renderers inherit per-instance configuration through their parent. */\nexport const CONTENT_EDITOR_RENDER_CONFIG = new InjectionToken<Signal<ContentEditorConfig>>('CONTENT_EDITOR_RENDER_CONFIG');\n\nexport const CONTENT_EDITOR_CONFIG = new InjectionToken<ContentEditorConfig>('CONTENT_EDITOR_CONFIG', {\n providedIn: 'root', factory: () => ({})\n});\n\n/** Later configurations override individual block fields, preserving unrelated options. */\nexport function mergeContentEditorConfig(...configs: readonly ContentEditorConfig[]): ContentEditorConfig {\n const result: ContentEditorConfig = { blocks: Object.create(null), marks: {} };\n for (const config of configs) {\n for (const [type, block] of Object.entries(config.blocks ?? {})) {\n const previous = result.blocks![type];\n (result.blocks as Record<string, ContentEditorBlockConfig>)[type] = {\n ...previous, ...block, options: { ...previous?.options, ...block.options }\n };\n }\n result.marks = { ...result.marks, ...config.marks };\n if (config.draft !== undefined) result.draft = { ...result.draft, ...config.draft };\n if (config.includeStyles !== undefined) result.includeStyles = config.includeStyles;\n if (config.importMarks !== undefined) result.importMarks = config.importMarks;\n if (config.unknownBlockToHtml !== undefined) result.unknownBlockToHtml = config.unknownBlockToHtml;\n }\n return result;\n}\n\n/** Application or route environment configuration. Child environments inherit parent settings. */\nexport function provideContentEditorConfig(config: ContentEditorConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CONTENT_EDITOR_CONFIG,\n useFactory: () => mergeContentEditorConfig(inject(CONTENT_EDITOR_CONFIG, { skipSelf: true, optional: true }) ?? {}, config)\n },\n ContentEditorHtmlSerializer,\n ContentEditorImporter\n ]);\n}\n","import type { NgsHeadlessEditorMarkDefinition } from '@ngstarter-ui/components/headless-editor';\nimport type { ContentEditorBlock, ContentEditorText, ContentEditorBlockInsertionTarget } from '../types';\nimport type { ContentEditorHtmlUrlKind } from '../html/types';\n\nexport interface ContentEditorImportOptions {\n /** Maximum JSON/HTML nesting depth. Default: 64. */\n maxDepth?: number;\n /** Maximum number of document blocks, including nested blocks. Default: 10000. */\n maxBlocks?: number;\n /** Preserve application-defined JSON block types. Default: false. */\n allowUnknownBlocks?: boolean;\n}\n\nexport interface ContentEditorImportPlacement {\n /** Replace the document (default), or insert into a block collection. */\n mode?: 'replace' | 'insert';\n /** Defaults to the active collection and block when inserting. */\n target?: ContentEditorBlockInsertionTarget;\n}\n\nexport interface ContentEditorHtmlImportOptions extends ContentEditorImportOptions {\n /** A DOM document supplied by the application, useful for server-side parsers. */\n document?: Document;\n}\n\nexport interface ContentEditorHtmlImportContext {\n createBlock(type: string, content: unknown, attrs?: Readonly<Record<string, unknown>>): ContentEditorBlock;\n createId(prefix?: string): string;\n parseBlocks(element: Element): readonly ContentEditorBlock[];\n parseText(element: Element): ContentEditorText;\n /** Uses the built-in parser for this element without invoking the override again. */\n defaultFromHtml(element: Element): readonly ContentEditorBlock[];\n safeUrl(value: unknown, kind?: ContentEditorHtmlUrlKind): string | null;\n}\n\nexport interface ContentEditorBlockHtmlImporter {\n /** CSS selector matched against the source element. Overrides run before built-ins. */\n selector: string;\n parse(element: Element, context: ContentEditorHtmlImportContext): ContentEditorBlock | readonly ContentEditorBlock[] | null;\n}\n\n/** Return an error message to reject a block, or undefined to accept it. */\nexport type ContentEditorBlockImportValidator = (block: ContentEditorBlock) => string | undefined;\n\n/** Structured failure. The editor is never modified when parsing fails. */\nexport class ContentEditorImportError extends Error {\n constructor(readonly path: string, message: string) {\n super(`${path}: ${message}`);\n this.name = 'ContentEditorImportError';\n }\n}\n\nexport type ContentEditorImportMarkDefinition = NgsHeadlessEditorMarkDefinition;\n","import type { ContentEditorConfig } from '../config';\nimport type { ContentEditorBlock, ContentEditorDocument } from '../types';\nimport { safeContentEditorHtmlUrl } from '../html/html-utils';\nimport { normalizeNgsHeadlessEditorColor } from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorImportError, ContentEditorImportOptions } from './types';\n\n/** Parses and validates the native version-1 format without changing the caller's objects. */\nexport function contentEditorFromJson(source: unknown, config: ContentEditorConfig = {}, options: ContentEditorImportOptions = {}): ContentEditorDocument {\n const maxDepth = options.maxDepth ?? 64;\n const maxBlocks = options.maxBlocks ?? 10000;\n if (!Number.isInteger(maxDepth) || maxDepth < 1 || !Number.isInteger(maxBlocks) || maxBlocks < 1) {\n throw new ContentEditorImportError('$options', 'maxDepth and maxBlocks must be positive integers');\n }\n let value: unknown = source;\n if (typeof source === 'string') {\n try { value = JSON.parse(source); }\n catch { throw new ContentEditorImportError('$', 'Invalid JSON'); }\n }\n const fail = (path: string, message: string): never => { throw new ContentEditorImportError(path, message); };\n const ancestors = new Set<object>();\n const copy = (input: unknown, path: string, depth: number): any => {\n if (depth > maxDepth) fail(path, `Maximum nesting depth (${maxDepth}) exceeded`);\n if (input === null || typeof input === 'string' || typeof input === 'boolean') return input;\n if (typeof input === 'number' && Number.isFinite(input)) return input;\n if (!input || typeof input !== 'object') return fail(path, 'Expected a JSON-compatible value');\n if (ancestors.has(input)) fail(path, 'Cyclic data is not supported');\n if (!Array.isArray(input) && ![Object.prototype, null].includes(Object.getPrototypeOf(input))) fail(path, 'Expected a plain JSON object');\n ancestors.add(input);\n const output = Array.isArray(input)\n ? Array.from(input, (item, i) => copy(item, `${path}[${i}]`, depth + 1))\n : Object.fromEntries(Object.entries(input).filter(([, item]) => item !== undefined).map(([key, item]) => [key, copy(item, `${path}.${key}`, depth + 1)]));\n ancestors.delete(input);\n return output;\n };\n const object = (input: any, path: string): Record<string, any> => {\n if (input === null || typeof input !== 'object' || Array.isArray(input)) fail(path, 'Expected an object');\n return input;\n };\n const array = (input: any, path: string): any[] => { if (!Array.isArray(input)) fail(path, 'Expected an array'); return input; };\n const string = (input: any, path: string, nonempty = false): void => {\n if (typeof input !== 'string' || (nonempty && !input.trim())) fail(path, nonempty ? 'Expected a non-empty string' : 'Expected a string');\n };\n const props = (input: any, path: string): void => {\n if (input === undefined) return;\n array(input, path).forEach((prop, i) => {\n object(prop, `${path}[${i}]`); string(prop.name, `${path}[${i}].name`, true); string(prop.value, `${path}[${i}].value`);\n });\n };\n const runs = (input: any, path: string): void => {\n array(input, path).forEach((run, i) => {\n const p = `${path}[${i}]`; object(run, p);\n if (run.type !== 'text') fail(`${p}.type`, 'Expected \"text\"');\n string(run.text, `${p}.text`);\n array(run.marks, `${p}.marks`).forEach((mark, j) => {\n const m = `${p}.marks[${j}]`; object(mark, m); string(mark.type, `${m}.type`, true);\n if (mark.attrs !== undefined) {\n for (const [key, attr] of Object.entries(object(mark.attrs, `${m}.attrs`))) {\n if (attr !== null && !['string', 'number', 'boolean'].includes(typeof attr)) fail(`${m}.attrs.${key}`, 'Expected a scalar mark attribute');\n }\n }\n if (mark.type === 'link' && !safeContentEditorHtmlUrl(mark.attrs?.href)) fail(`${m}.attrs.href`, 'Expected a supported non-empty link URL');\n if (mark.type === 'link') enumValue(mark.attrs?.target, ['_blank', '_self'], `${m}.attrs.target`);\n if (['textColor', 'backgroundColor'].includes(mark.type) && (typeof mark.attrs?.color !== 'string' || !normalizeNgsHeadlessEditorColor(mark.attrs.color))) fail(`${m}.attrs.color`, 'Expected a supported CSS color');\n });\n });\n };\n const enumValue = (input: any, allowed: readonly any[], path: string): void => {\n if (input !== undefined && !allowed.includes(input)) fail(path, `Expected one of: ${allowed.join(', ')}`);\n };\n const dimension = (input: any, path: string): void => {\n if (input !== undefined && input !== null && input !== 'auto' && !(typeof input === 'number' && Number.isFinite(input) && input > 0)) fail(path, 'Expected a positive pixel dimension, \"auto\", or null');\n };\n const usedIds = new Set<string>();\n let count = 0;\n const list = (input: any, path: string): void => {\n array(input, path).forEach((item, i) => {\n const p = `${path}[${i}]`; object(item, p); runs(item.content, `${p}.content`); props(item.props, `${p}.props`); list(item.children, `${p}.children`);\n });\n };\n const blocks = (input: any, path: string): void => {\n array(input, path).forEach((block, i) => {\n const p = `${path}[${i}]`; object(block, p);\n if (++count > maxBlocks) fail(p, `Maximum block count (${maxBlocks}) exceeded`);\n string(block.id, `${p}.id`, true); string(block.type, `${p}.type`, true);\n if (usedIds.has(block.id)) fail(`${p}.id`, `Duplicate block ID \"${block.id}\"`);\n usedIds.add(block.id);\n if (!Object.hasOwn(block, 'content')) fail(`${p}.content`, 'Required field');\n const attrs = block.attrs === undefined ? {} : object(block.attrs, `${p}.attrs`);\n const settings = attrs['settings'] === undefined ? {} : object(attrs['settings'], `${p}.attrs.settings`);\n props(attrs['props'], `${p}.attrs.props`);\n const c = block.content;\n const cp = `${p}.content`;\n const sp = `${p}.attrs.settings`;\n switch (block.type) {\n case 'paragraph': case 'heading': case 'code': case 'callout':\n runs(c, cp);\n if (block.type === 'heading') enumValue(settings['level'], [1, 2, 3, 4, 5, 6], `${sp}.level`);\n if (block.type === 'code' && settings['language'] !== undefined) string(settings['language'], `${sp}.language`);\n if (block.type === 'callout') enumValue(settings['variant'], ['note', 'tip', 'warning', 'danger'], `${sp}.variant`);\n break;\n case 'divider': if (c !== null) fail(cp, 'Divider content must be null'); break;\n case 'bulletList': case 'orderedList':\n list(c, cp); enumValue(settings['listStyle'], ['bullet', 'ordered'], `${sp}.listStyle`); break;\n case 'quote':\n object(c, cp);\n for (const name of ['cite', 'caption']) {\n object(c[name], `${cp}.${name}`); runs(c[name].content, `${cp}.${name}.content`); props(c[name].props, `${cp}.${name}.props`);\n }\n break;\n case 'table':\n if (c !== null) fail(cp, 'Native table content must be null; use attrs.rows');\n if (array(attrs['rows'], `${p}.attrs.rows`).length > 500) fail(`${p}.attrs.rows`, 'Tables support at most 500 rows');\n attrs['rows'].forEach((row: any, r: number) => {\n if (array(row, `${p}.attrs.rows[${r}]`).length > 50) fail(`${p}.attrs.rows[${r}]`, 'Tables support at most 50 columns');\n row.forEach((cell: any, col: number) => runs(cell, `${p}.attrs.rows[${r}][${col}]`));\n });\n enumValue(attrs['header'], [true, false], `${p}.attrs.header`);\n enumValue(settings['fullWidth'], [true, false], `${sp}.fullWidth`);\n if (attrs['cellMetadata'] !== undefined) array(attrs['cellMetadata'], `${p}.attrs.cellMetadata`).forEach((row, r) => array(row, `${p}.attrs.cellMetadata[${r}]`).forEach((cell, col) => {\n const mp = `${p}.attrs.cellMetadata[${r}][${col}]`; object(cell, mp); props(cell.props, `${mp}.props`);\n if (cell.options !== undefined) {\n const opts = object(cell.options, `${mp}.options`);\n for (const key of ['colspan', 'rowspan']) if (opts[key] !== undefined && !(Number.isInteger(opts[key]) && opts[key] > 0)) fail(`${mp}.options.${key}`, 'Expected a positive integer');\n dimension(opts['width'], `${mp}.options.width`);\n }\n }));\n break;\n case 'image': case 'video': case 'embed': case 'attachment':\n object(c, cp);\n for (const key of block.type === 'image' ? ['src', 'alt'] : block.type === 'video' ? ['src', 'caption'] : block.type === 'embed' ? ['url', 'type'] : ['url', 'name', 'mimeType']) string(c[key], `${cp}.${key}`);\n {\n const key = ['image', 'video'].includes(block.type) ? 'src' : 'url';\n const kind = block.type === 'video' ? 'media' : block.type === 'image' ? 'image' : block.type === 'embed' ? 'embed' : 'attachment';\n if (c[key] && !safeContentEditorHtmlUrl(c[key], kind)) fail(`${cp}.${key}`, 'Unsupported resource URL');\n }\n if (block.type === 'attachment' && !(Number.isInteger(c.size) && c.size >= 0)) fail(`${cp}.size`, 'Expected a non-negative integer byte count');\n if (block.type === 'video') enumValue(c.orientation, ['portrait', 'landscape'], `${cp}.orientation`);\n for (const key of ['width', 'height', 'actualWidth', 'actualHeight']) dimension(settings[key], `${sp}.${key}`);\n break;\n case 'gallery': {\n object(c, cp); const ids = new Set<string>();\n array(c.images, `${cp}.images`).forEach((image, j) => {\n const ip = `${cp}.images[${j}]`; object(image, ip); string(image.id, `${ip}.id`, true);\n if (ids.has(image.id)) fail(`${ip}.id`, 'Duplicate image ID'); ids.add(image.id);\n string(image.src, `${ip}.src`); string(image.alt, `${ip}.alt`); runs(image.caption, `${ip}.caption`);\n if (image.src && !safeContentEditorHtmlUrl(image.src, 'image')) fail(`${ip}.src`, 'Unsupported image URL');\n }); break;\n }\n case 'toggle':\n object(c, cp); runs(c.title, `${cp}.title`); blocks(c.blocks, `${cp}.blocks`); enumValue(settings['expanded'], [true, false], `${sp}.expanded`); break;\n case 'grid': {\n object(c, cp); const ids = new Set<string>();\n array(c.cells, `${cp}.cells`).forEach((cell, j) => {\n const gp = `${cp}.cells[${j}]`; object(cell, gp); string(cell.id, `${gp}.id`, true);\n if (ids.has(cell.id)) fail(`${gp}.id`, 'Duplicate grid cell ID'); ids.add(cell.id); blocks(cell.blocks, `${gp}.blocks`);\n });\n enumValue(settings['columns'], [2, 3, 4], `${sp}.columns`); enumValue(settings['gap'], ['small', 'medium', 'large'], `${sp}.gap`); enumValue(settings['stackOnMobile'], [true, false], `${sp}.stackOnMobile`); break;\n }\n default:\n if (!options.allowUnknownBlocks && !Object.hasOwn(config.blocks ?? {}, block.type)) fail(`${p}.type`, `Unknown block type \"${block.type}\"`);\n }\n const validation = config.blocks?.[block.type]?.validateImport?.(block as ContentEditorBlock);\n if (validation !== undefined) fail(p, validation);\n });\n };\n const document = object(copy(value, '$', 0), '$');\n if (document['version'] !== 1) fail('$.version', 'Only document version 1 is supported');\n blocks(document['blocks'], '$.blocks');\n return { version: 1, blocks: document['blocks'] };\n}\n","import {\n basicTextEditorPlugin, colorEditorPlugin, linkEditorPlugin, createNgsHeadlessEditorId,\n createNgsHeadlessEditorText, normalizeNgsHeadlessEditorTextContent, NgsHeadlessEditorMark, NgsHeadlessEditorText\n} from '@ngstarter-ui/components/headless-editor';\nimport type { ContentEditorConfig } from '../config';\nimport type { ContentEditorBlock, ContentEditorDocument, ContentEditorListItem } from '../types';\nimport { safeContentEditorHtmlUrl } from '../html/html-utils';\nimport { ContentEditorHtmlImportContext, ContentEditorHtmlImportOptions, ContentEditorImportError } from './types';\nimport { contentEditorFromJson } from './from-json';\n\nconst ignoredTags = new Set(['script', 'style', 'noscript', 'template', 'object', 'embed', 'head', 'meta', 'link']);\nconst blockTags = new Set(['p', 'div', 'section', 'article', 'header', 'footer', 'main', 'aside', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', 'blockquote', 'figure', 'ul', 'ol', 'table', 'details', 'hr']);\n\n/** Imports semantic HTML into native blocks. Scripts, event handlers and arbitrary CSS are never stored. */\nexport function contentEditorFromHtml(html: string, config: ContentEditorConfig = {}, options: ContentEditorHtmlImportOptions = {}): ContentEditorDocument {\n if (typeof html !== 'string') throw new ContentEditorImportError('$html', 'Expected an HTML string');\n const owner = options.document ?? globalThis.document;\n if (!owner?.implementation?.createHTMLDocument) {\n throw new ContentEditorImportError('$html', 'HTML import requires a DOM document; supply options.document when running on the server');\n }\n const inert = owner.implementation.createHTMLDocument('');\n inert.body.innerHTML = html;\n const maxDepth = options.maxDepth ?? 64;\n const maxBlocks = options.maxBlocks ?? 10000;\n if (!Number.isInteger(maxDepth) || maxDepth < 1 || !Number.isInteger(maxBlocks) || maxBlocks < 1) throw new ContentEditorImportError('$options', 'maxDepth and maxBlocks must be positive integers');\n const definitions = [...new Map([...basicTextEditorPlugin().marks!, ...colorEditorPlugin().marks!, ...linkEditorPlugin().marks!, ...(config.importMarks ?? [])].map(mark => [mark.type, mark])).values()];\n const overrides = Object.values(config.blocks ?? {}).flatMap(block => block.fromHtml ? [block.fromHtml] : []);\n let depth = 0;\n let count = 0;\n const guarded = <T>(read: () => T): T => {\n if (++depth > maxDepth) throw new ContentEditorImportError('$html', `Maximum nesting depth (${maxDepth}) exceeded`);\n try { return read(); } finally { depth--; }\n };\n const tag = (element: Element) => element.tagName.toLowerCase();\n const children = (element: Element) => Array.from(element.children);\n const direct = (element: Element, selector: string) => children(element).find(child => child.matches(selector));\n const alignment = (element: Element) => {\n const value = (element as HTMLElement).style?.textAlign || element.getAttribute('align');\n return value && ['left', 'center', 'right', 'justify'].includes(value) ? [{ name: 'text-alignment', value }] : [];\n };\n const dimension = (element: Element, name: string): number | null => {\n const raw = element.getAttribute(name);\n if (!raw || !/^\\d+(?:\\.\\d+)?$/.test(raw)) return null;\n const value = Number(raw); return value > 0 && Number.isFinite(value) ? value : null;\n };\n const createBlock: ContentEditorHtmlImportContext['createBlock'] = (type, content, attrs) => {\n if (++count > maxBlocks) throw new ContentEditorImportError('$html', `Maximum block count (${maxBlocks}) exceeded`);\n return { id: createNgsHeadlessEditorId(type), type, content, ...(attrs ? { attrs } : {}) };\n };\n const parseText = (element: Element): NgsHeadlessEditorText[] => {\n const runs: NgsHeadlessEditorText[] = [];\n const newline = () => { if (runs.length && !runs.at(-1)!.text.endsWith('\\n')) runs.push(createNgsHeadlessEditorText('\\n')); };\n const visit = (node: Node, marks: readonly NgsHeadlessEditorMark[]): void => guarded(() => {\n if (node.nodeType === 3) {\n const text = (node.textContent ?? '').replace(/[\\t\\r\\n ]+/g, ' ');\n if (text) runs.push(createNgsHeadlessEditorText(text, marks));\n return;\n }\n if (node.nodeType !== 1) return;\n const el = node as HTMLElement;\n const name = tag(el);\n if (ignoredTags.has(name) || ['iframe', 'img', 'video', 'audio', 'ul', 'ol'].includes(name)) return;\n if (name === 'br') { runs.push(createNgsHeadlessEditorText('\\n', marks)); return; }\n const next = [...marks];\n for (const definition of definitions) {\n const explicit = el.getAttribute('data-ngs-headless-editor-mark');\n const styleMark = ['textColor', 'backgroundColor'].includes(definition.type) && !!el.style;\n if (explicit ? explicit !== definition.type : name !== definition.tagName && !definition.parseTags?.includes(name) && !styleMark) continue;\n const attrs = definition.readAttributes?.(el);\n if (!definition.readAttributes || attrs) next.push({ type: definition.type, ...(attrs ? { attrs } : {}) });\n }\n // Common HTML produced by external WYSIWYG editors also expresses marks as inline styles.\n const css = el.style;\n if (css?.fontWeight === 'bold' || Number(css?.fontWeight) >= 600) next.push({ type: 'bold' });\n if (css?.fontStyle === 'italic') next.push({ type: 'italic' });\n if (css?.textDecoration.includes('underline')) next.push({ type: 'underline' });\n if (css?.textDecoration.includes('line-through')) next.push({ type: 'strike' });\n if (blockTags.has(name)) newline();\n Array.from(node.childNodes).forEach(child => visit(child, next));\n if (blockTags.has(name)) newline();\n });\n visit(element, []);\n while (runs.length && !runs[0].text.trim()) runs.shift();\n while (runs.length && !runs.at(-1)!.text.trim()) runs.pop();\n if (runs.length) {\n runs[0] = { ...runs[0], text: runs[0].text.replace(/^\\s+/, '') };\n const last = runs.length - 1;\n runs[last] = { ...runs[last], text: runs[last].text.replace(/\\s+$/, '') };\n }\n return [...normalizeNgsHeadlessEditorTextContent(runs)];\n };\n const listItems = (element: Element): ContentEditorListItem[] => guarded(() => children(element).filter(el => tag(el) === 'li').map(li => {\n const text = li.cloneNode(true) as Element;\n children(text).filter(el => ['ul', 'ol'].includes(tag(el))).forEach(el => el.remove());\n return { content: parseText(text), props: alignment(li), children: children(li).filter(el => ['ul', 'ol'].includes(tag(el))).flatMap(listItems) };\n }));\n const media = (element: Element, figure?: Element): ContentEditorBlock[] => {\n const name = tag(element);\n const kind = name === 'img' ? 'image' : name === 'video' ? 'media' : 'embed';\n const src = safeContentEditorHtmlUrl(element.getAttribute('src') || element.querySelector('source')?.getAttribute('src'), kind);\n if (!src) return [];\n const caption = figure ? direct(figure, 'figcaption') : undefined;\n const settings = Object.fromEntries(['width', 'height'].flatMap(key => { const n = dimension(element, key); return n ? [[key, n]] : []; }));\n const content = name === 'img' ? { src, alt: element.getAttribute('alt') ?? '' }\n : name === 'video' ? { src, caption: caption?.textContent ?? '', orientation: 'landscape' }\n : { url: src, type: element.getAttribute('title') ?? '' };\n return [createBlock(name === 'img' ? 'image' : name === 'video' ? 'video' : 'embed', content, { settings })];\n };\n const builtin = (element: Element): ContentEditorBlock[] => {\n const name = tag(element);\n const attrs = { props: alignment(element) };\n if (ignoredTags.has(name)) return [];\n if (element.matches('[data-content-editor=\"gallery\"], .ngs-content-editor-html-gallery')) {\n const images = children(element).flatMap(figure => {\n const image = tag(figure) === 'img' ? figure : direct(figure, 'img');\n const src = safeContentEditorHtmlUrl(image?.getAttribute('src'), 'image');\n if (!image || !src) return [];\n const caption = direct(figure, 'figcaption');\n return [{ id: createNgsHeadlessEditorId('image'), src, alt: image.getAttribute('alt') ?? '', caption: caption ? parseText(caption) : [] }];\n });\n return [createBlock('gallery', { images })];\n }\n if (element.matches('.ngs-content-editor-html-grid')) {\n const container = direct(element, '.ngs-content-editor-html-grid-cells') ?? element;\n const css = (element as HTMLElement).style;\n const columnValue = Number(element.getAttribute('data-columns') || css?.getPropertyValue('--ngs-html-grid-columns'));\n const gapValue = css?.getPropertyValue('--ngs-html-grid-gap').trim();\n const settings = { columns: [2, 3, 4].includes(columnValue) ? columnValue : 2, gap: gapValue === '12px' ? 'small' : gapValue === '36px' ? 'large' : 'medium', stackOnMobile: container.classList.contains('ngs-content-editor-html-grid-stack') };\n const cells = children(container).filter(cell => cell.matches('.ngs-content-editor-html-grid-cell')).map(cell => ({ id: createNgsHeadlessEditorId('cell'), blocks: parseBlocks(cell) }));\n return [createBlock('grid', { cells }, { settings })];\n }\n if (name === 'p' || /^h[1-6]$/.test(name)) {\n if (element.querySelector('img, video, iframe, a[download]')) return parseBlocks(element);\n return [createBlock(name === 'p' ? 'paragraph' : 'heading', parseText(element), { ...attrs, ...(name !== 'p' ? { settings: { level: Number(name[1]) } } : {}) })];\n }\n if (name === 'hr') return [createBlock('divider', null)];\n if (name === 'pre') {\n const code = direct(element, 'code') ?? element;\n const language = code.getAttribute('data-language') ?? Array.from(code.classList).find(cls => cls.startsWith('language-'))?.slice(9) ?? 'none';\n return [createBlock('code', [createNgsHeadlessEditorText(code.textContent ?? '')], { settings: { language } })];\n }\n if (name === 'ul' || name === 'ol') return [createBlock(name === 'ol' ? 'orderedList' : 'bulletList', listItems(element), { settings: { listStyle: name === 'ol' ? 'ordered' : 'bullet' } })];\n if (name === 'details') {\n const summary = direct(element, 'summary');\n const body = element.cloneNode(true) as Element;\n direct(body, 'summary')?.remove();\n return [createBlock('toggle', { title: summary ? parseText(summary) : [], blocks: parseBlocks(body) }, { settings: { expanded: element.hasAttribute('open') } })];\n }\n if (name === 'aside' && (element.hasAttribute('data-callout') || element.classList.contains('ngs-content-editor-html-callout'))) {\n const value = element.getAttribute('data-callout');\n return [createBlock('callout', parseText(element), { ...attrs, settings: { variant: ['note', 'tip', 'warning', 'danger'].includes(value ?? '') ? value : 'note' } })];\n }\n if (name === 'blockquote' || (name === 'figure' && direct(element, 'blockquote'))) {\n const quote = name === 'blockquote' ? element : direct(element, 'blockquote')!;\n const caption = name === 'figure' ? direct(element, 'figcaption') : undefined;\n return [createBlock('quote', { cite: { content: parseText(quote), props: alignment(quote) }, caption: { content: caption ? parseText(caption) : [], props: caption ? alignment(caption) : [] } })];\n }\n if (name === 'table') {\n const rows = Array.from(element.querySelectorAll('tr')).filter(row => row.closest('table') === element);\n const cells = rows.map(row => children(row).filter(cell => ['td', 'th'].includes(tag(cell))));\n const manualWidth = element.getAttribute('data-content-editor-table-width') === 'manual';\n return [createBlock('table', null, {\n rows: cells.map(row => row.map(parseText)), header: !!cells[0]?.some(cell => tag(cell) === 'th'),\n ...(manualWidth ? { settings: { fullWidth: false } } : {}),\n cellMetadata: cells.map(row => row.map(cell => {\n const width = dimension(cell, 'width') ?? dimension(cell, 'data-content-editor-cell-width');\n return { props: alignment(cell), options: {\n colspan: Math.max(1, Math.floor(dimension(cell, 'colspan') ?? 1)), rowspan: Math.max(1, Math.floor(dimension(cell, 'rowspan') ?? 1)),\n ...(width !== null ? { width } : {})\n } };\n }))\n })];\n }\n if (name === 'figure') {\n const child = direct(element, 'img, video, iframe');\n if (child) return media(child, element);\n }\n if (['img', 'video', 'iframe'].includes(name)) return media(element);\n if (name === 'a' && element.hasAttribute('download')) {\n const url = safeContentEditorHtmlUrl(element.getAttribute('href'), 'attachment');\n return url ? [createBlock('attachment', { url, name: element.getAttribute('download') || element.textContent?.trim() || 'Download', size: 0, mimeType: '' })] : [];\n }\n return parseBlocks(element);\n };\n const context: ContentEditorHtmlImportContext = {\n createBlock, createId: createNgsHeadlessEditorId, parseText, parseBlocks: element => parseBlocks(element),\n defaultFromHtml: builtin, safeUrl: safeContentEditorHtmlUrl\n };\n const parseElement = (element: Element): ContentEditorBlock[] => guarded(() => {\n if (ignoredTags.has(tag(element))) return [];\n for (const override of overrides) {\n if (element.matches(override.selector)) {\n const result = override.parse(element, context);\n return result === null ? [] : Array.isArray(result) ? [...result] : [result as ContentEditorBlock];\n }\n }\n return builtin(element);\n });\n const parseBlocks = (element: Element): ContentEditorBlock[] => guarded(() => {\n const output: ContentEditorBlock[] = [];\n let inline = inert.createElement('div');\n const flush = () => {\n const runs = parseText(inline);\n if (runs.some(run => run.text.trim())) output.push(createBlock('paragraph', runs, { props: alignment(element) }));\n inline = inert.createElement('div');\n };\n for (const node of Array.from(element.childNodes)) {\n if (node.nodeType === 1) {\n const child = node as Element;\n if (ignoredTags.has(tag(child))) continue;\n if (blockTags.has(tag(child)) || ['img', 'video', 'iframe'].includes(tag(child)) || child.matches('a[download]') || overrides.some(override => child.matches(override.selector))) {\n flush(); output.push(...parseElement(child)); continue;\n }\n // Unknown inline wrappers may contain block elements; keep those structures.\n if (child.querySelector([...blockTags, 'img', 'video', 'iframe', 'a[download]'].join(',')) || overrides.some(override => child.querySelector(override.selector))) { flush(); output.push(...parseElement(child)); continue; }\n }\n inline.appendChild(node.cloneNode(true));\n }\n flush();\n return output;\n });\n return contentEditorFromJson({ version: 1, blocks: parseBlocks(inert.body) }, config, options);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\nimport { CONTENT_EDITOR_CONFIG, ContentEditorConfig, mergeContentEditorConfig } from '../config';\nimport { contentEditorFromJson } from './from-json';\nimport { contentEditorFromHtml } from './from-html';\nimport { ContentEditorHtmlImportOptions, ContentEditorImportOptions } from './types';\n\n/** Parsing only: applications decide when to replace their current document. */\n@Injectable({ providedIn: 'root' })\nexport class ContentEditorImporter {\n private readonly config = inject(CONTENT_EDITOR_CONFIG);\n private readonly document = inject(DOCUMENT);\n\n fromJson(source: unknown, config: ContentEditorConfig = {}, options: ContentEditorImportOptions = {}) {\n return contentEditorFromJson(source, mergeContentEditorConfig(this.config, config), options);\n }\n\n fromHtml(html: string, config: ContentEditorConfig = {}, options: ContentEditorHtmlImportOptions = {}) {\n return contentEditorFromHtml(html, mergeContentEditorConfig(this.config, config), { document: this.document, ...options });\n }\n}\n","import { createNgsHeadlessEditorText, isNgsHeadlessEditorTextContent, normalizeNgsHeadlessEditorTextContent } from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorBlock, ContentEditorText } from '../types';\n\n/** Text fields use the same HTML parser as documents, flattening structure to lines. */\nexport function contentEditorImportedText(blocks: readonly ContentEditorBlock[]): ContentEditorText {\n const parts: ContentEditorText[] = [];\n const read = (block: ContentEditorBlock): void => {\n const content: any = block.content;\n if (isNgsHeadlessEditorTextContent(content)) parts.push(content);\n else if (block.type === 'quote') { parts.push(content.cite.content, content.caption.content); }\n else if (block.type === 'bulletList' || block.type === 'orderedList') {\n const item = (value: any) => { parts.push(value.content); value.children?.forEach(item); };\n content.forEach(item);\n } else if (block.type === 'table') {\n for (const row of (block.attrs?.['rows'] as ContentEditorText[][] ?? [])) parts.push(row.flatMap((cell, i) => i ? [createNgsHeadlessEditorText('\\t'), ...cell] : cell));\n } else if (block.type === 'toggle') { parts.push(content.title); content.blocks.forEach(read); }\n else if (block.type === 'grid') content.cells.forEach((cell: any) => cell.blocks.forEach(read));\n else if (block.type === 'image' || block.type === 'gallery') parts.push([createNgsHeadlessEditorText(content.alt ?? '')]);\n };\n blocks.forEach(read);\n return normalizeNgsHeadlessEditorTextContent(parts.filter(part => part.some(run => run.text)).flatMap((part, i) => i ? [createNgsHeadlessEditorText('\\n'), ...part] : part));\n}\n","import {\n afterNextRender, afterRenderEffect, Directive, effect, ElementRef, inject, input, OnDestroy, output, untracked\n} from '@angular/core';\nimport {\n NgsHeadlessEditorInlineRegion, NgsHeadlessEditorSurface,\n NgsHeadlessEditorText, provideNgsHeadlessEditorInlineRegion\n} from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorImporter } from './import/content-importer';\nimport { contentEditorImportedText } from './import/inline-content';\nimport { CONTENT_BUILDER } from './types';\nimport type { ContentBuilderComponent } from './content-builder/content-builder.component';\nimport { ContentBuilderStore } from './content-builder.store';\nimport { createNgsHeadlessEditorId } from '@ngstarter-ui/components/headless-editor';\nimport { ContentEditorItemProperty, ContentEditorText } from './types';\n\nconst regions = new WeakMap<HTMLElement, ContentEditorContentEditableDirective>();\n\n/** A headless inline editor bound to a text field in a content block. */\n@Directive({\n selector: '[ngsContentEditorContentEditable]',\n exportAs: 'ngsContentEditorContentEditable',\n providers: [provideNgsHeadlessEditorInlineRegion()],\n hostDirectives: [NgsHeadlessEditorSurface],\n host: {\n 'class': 'ngs-content-editor-content-editable',\n '[class.align-left]': 'alignment() === \"left\"',\n '[class.align-center]': 'alignment() === \"center\"',\n '[class.align-right]': 'alignment() === \"right\"',\n '[class.align-justify]': 'alignment() === \"justify\"',\n '(focus)': 'activate()'\n }\n})\nexport class ContentEditorContentEditableDirective implements OnDestroy {\n readonly region = inject(NgsHeadlessEditorInlineRegion);\n private readonly surface = inject(NgsHeadlessEditorSurface);\n private readonly importer = inject(ContentEditorImporter);\n private readonly builder = inject<ContentBuilderComponent>(CONTENT_BUILDER, { optional: true });\n private readonly store = inject(ContentBuilderStore, { optional: true });\n private readonly historyGroup = createNgsHeadlessEditorId('content-region');\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n readonly content = input<ContentEditorText>([], { alias: 'ngsContentEditorContentEditable' });\n readonly settings = input<unknown>({});\n readonly props = input<ContentEditorItemProperty[]>([]);\n readonly singleLine = input(false);\n readonly contentChanged = output<readonly NgsHeadlessEditorText[]>();\n readonly propsChanged = output<ContentEditorItemProperty[]>();\n readonly pressedEnter = output<KeyboardEvent>();\n readonly initialized = output<void>();\n\n static forElement(element: HTMLElement | null): ContentEditorContentEditableDirective | undefined {\n return element ? regions.get(element) : undefined;\n }\n\n constructor() {\n regions.set(this.element, this);\n effect(() => {\n const content = this.content();\n untracked(() => this.region.load(content));\n });\n effect(() => {\n const content = this.region.content();\n const origin = this.region.editor.origin();\n if (origin !== 'external' && origin !== 'history') {\n untracked(() => {\n if (this.store) this.store.withTextEdit(origin, this.historyGroup, () => this.contentChanged.emit(content));\n else this.contentChanged.emit(content);\n });\n }\n });\n // Capture before the surface and the block's own listeners. Structural Enter\n // stays with the content builder; multiline fields use the headless surface.\n this.element.addEventListener('paste', this.onPaste, true);\n this.element.addEventListener('keydown', this.onKeydown, true);\n this.element.addEventListener('beforeinput', this.onBeforeInput, true);\n afterNextRender(() => this.initialized.emit());\n afterRenderEffect(() => {\n const pending = this.store?.restoreTextSelection();\n const wrapper = this.element.closest('[data-block-id]');\n if (pending && wrapper?.getAttribute('data-block-id') === pending.blockId &&\n wrapper.querySelector('.ngs-content-editor-content-editable') === this.element) {\n this.activate();\n this.region.editor.setSelection(pending.selection);\n this.surface.focus();\n this.store!.restoreTextSelection.set(null);\n }\n });\n }\n\n activate(): void {\n this.region.activate();\n const id = this.element.closest('[data-block-id]')?.getAttribute('data-block-id');\n if (id && this.store) {\n const scope = this.builder && 'scope' in this.builder ? (this.builder as any).scope() : {};\n this.store.insertionTarget.set({ scope, afterId: id });\n }\n }\n focus(): void { this.activate(); this.surface.focus(); }\n getContent(): readonly NgsHeadlessEditorText[] { return this.region.content(); }\n alignment(): string { return this.props().find(prop => prop.name === 'text-alignment')?.value ?? 'left'; }\n setAlignment(value: string): void {\n this.propsChanged.emit([\n ...this.props().filter(prop => prop.name !== 'text-alignment'),\n { name: 'text-alignment', value }\n ]);\n }\n private readonly onPaste = (event: ClipboardEvent) => {\n if (event.defaultPrevented || this.region.editor.readOnly()) return;\n const html = event.clipboardData?.getData('text/html');\n if (!html) return;\n try {\n const config = this.builder?.rootBuilder.config() ?? {};\n const parsed = this.importer.fromHtml(html, config);\n this.activate();\n this.surface.syncSelectionFromDom();\n const id = this.element.closest('[data-block-id]')?.getAttribute('data-block-id');\n const structural = parsed.blocks.length > 1 || parsed.blocks.some(block => block.type !== 'paragraph');\n const selection = this.region.editor.selection();\n if (structural && id && this.builder && selection) {\n const lines = this.region.editor.document().blocks;\n const offset = (point: { blockId: string; offset: number }) => lines.slice(0, lines.findIndex(line => line.id === point.blockId))\n .reduce((sum, line) => sum + (line.content as ContentEditorText).reduce((total, run) => total + run.text.length, 0) + 1, 0) + point.offset;\n if (this.builder.rootBuilder.pasteBlocksAtSelection(id, parsed, offset(selection.anchor), offset(selection.focus))) {\n event.preventDefault(); event.stopImmediatePropagation(); return;\n }\n }\n const content = contentEditorImportedText(parsed.blocks);\n if (!content.some(run => run.text)) return;\n this.activate();\n this.surface.syncSelectionFromDom();\n event.preventDefault();\n event.stopImmediatePropagation();\n this.region.editor.insertTextContent(content);\n } catch {\n // The surface can still paste the plain-text representation on parse failure.\n }\n };\n private readonly onKeydown = (event: KeyboardEvent) => {\n if (event.key === 'Enter' && this.singleLine() && !event.shiftKey && !event.isComposing) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.pressedEnter.emit(event);\n }\n };\n private readonly onBeforeInput = (event: InputEvent) => {\n if (event.inputType === 'insertParagraph' && this.singleLine() && !event.isComposing) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.pressedEnter.emit(new KeyboardEvent('keydown', { key: 'Enter' }));\n }\n };\n ngOnDestroy(): void {\n regions.delete(this.element);\n this.element.removeEventListener('paste', this.onPaste, true);\n this.element.removeEventListener('keydown', this.onKeydown, true);\n this.element.removeEventListener('beforeinput', this.onBeforeInput, true);\n }\n}\n"],"mappings":";;;;;;;;AASA,MAAM,YAA8C;CAClD,MAAM;CAAU,QAAQ;CAAM,QAAQ;CAAK,WAAW;CAAK,MAAM;CAAQ,aAAa;CAAO,WAAW;AACzG;AAGD,SAAgB,oBAAoB,UAAiC,SAA8B,CAAA,GAAE;CACnG,OAAO,UAAU,SAAS,QAAQ,MAAM;AAC1C;AACA,SAAgB,yBAAyB,OAA2B,SAA8B,CAAA,GAAE;CAClG,OAAO,UAAU,CAAC,KAAK,GAAG,MAAM;AAClC;AAEA,SAAS,UAAU,QAAuC,QAA2B;CACnF,MAAM,yBAAS,IAAI,IAAG;CACtB,MAAM,UAAoC;EACxC,QAAQ;EACR,SAAS;EACT,YAAW,QAAM;GAAG,IAAI,OAAO,kBAAkB,OAAO,OAAO,IAAI,GAAG;EAAG;EACzE,cAAa,UAAQ;GACnB,MAAM,YAAY,OAAO,SAAS,MAAM,KAAK,EAAE,UAAU,iBAAiB,MAAM,IAAI,KAAK,OAAO;GAChG,IAAI,CAAC,WAAW,MAAM,IAAI,MAAM,+CAA+C,MAAM,KAAI,GAAI;GAC7F,OAAO,UAAU,OAAO,OAAO;EACjC;EACA,eAAc,aAAY,SAAS,IAAI,QAAQ,WAAW,CAAC,CAAC,KAAK,EAAE;EACnE,gBAAe,UAAQ;GACrB,MAAM,YAAY,iBAAiB,MAAM,IAAI;GAC7C,IAAI,CAAC,WAAW,MAAM,IAAI,MAAM,uDAAuD,MAAM,KAAI,GAAI;GACrG,OAAO,UAAU,OAAO,OAAO;EACjC;EACA,aAAY,SAAQ,WAAW,MAAM,SAAS,MAAM;CACrD;CACD,MAAM,OAAO,QAAQ,aAAa,MAAM;CACxC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,KAA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sBAAsB;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,yBAAyB;IACzB,WAAW;GACZ;EACF,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var CursorController = class {
|
|
2
|
+
targetElement;
|
|
3
|
+
constructor(elementOrSelector) {
|
|
4
|
+
const element = typeof elementOrSelector === "string" ? document.querySelector(elementOrSelector) : elementOrSelector;
|
|
5
|
+
if (!element) throw new Error(`CursorController: Element not found for selector "${elementOrSelector}"`);
|
|
6
|
+
if (!(element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element.isContentEditable)) console.warn(`CursorController: Target element (${element.tagName}) is not an input, textarea, or contenteditable. Cursor positioning may not work as expected.`);
|
|
7
|
+
this.targetElement = element;
|
|
8
|
+
}
|
|
9
|
+
setToStart() {
|
|
10
|
+
this.targetElement.focus();
|
|
11
|
+
requestAnimationFrame(() => {
|
|
12
|
+
if (this.isInputOrTextAreaElement(this.targetElement)) {
|
|
13
|
+
this.targetElement.selectionStart = 0;
|
|
14
|
+
this.targetElement.selectionEnd = 0;
|
|
15
|
+
} else if (this.targetElement.isContentEditable) {
|
|
16
|
+
const selection = window.getSelection();
|
|
17
|
+
if (selection) {
|
|
18
|
+
const range = document.createRange();
|
|
19
|
+
range.selectNodeContents(this.targetElement);
|
|
20
|
+
range.collapse(true);
|
|
21
|
+
selection.removeAllRanges();
|
|
22
|
+
selection.addRange(range);
|
|
23
|
+
}
|
|
24
|
+
} else console.warn(`CursorController: Cannot set cursor start on a non-editable element (${this.targetElement.tagName}).`);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
setToEnd() {
|
|
28
|
+
this.targetElement.focus();
|
|
29
|
+
requestAnimationFrame(() => {
|
|
30
|
+
if (this.isInputOrTextAreaElement(this.targetElement)) {
|
|
31
|
+
const length = this.targetElement.value.length;
|
|
32
|
+
this.targetElement.selectionStart = length;
|
|
33
|
+
this.targetElement.selectionEnd = length;
|
|
34
|
+
} else if (this.targetElement.isContentEditable) {
|
|
35
|
+
const selection = window.getSelection();
|
|
36
|
+
if (selection) {
|
|
37
|
+
const range = document.createRange();
|
|
38
|
+
range.selectNodeContents(this.targetElement);
|
|
39
|
+
range.collapse(false);
|
|
40
|
+
selection.removeAllRanges();
|
|
41
|
+
selection.addRange(range);
|
|
42
|
+
}
|
|
43
|
+
} else console.warn(`CursorController: Cannot set cursor end on a non-editable element (${this.targetElement.tagName}).`);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
isInputOrTextAreaElement(element) {
|
|
47
|
+
return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement;
|
|
48
|
+
}
|
|
49
|
+
getElement() {
|
|
50
|
+
return this.targetElement;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export { CursorController as t };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=cursor-controller-DKfBII1n.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-controller-DKfBII1n.mjs","names":[],"sources":["../../../projects/components/content-editor/src/utils/cursor-controller.ts"],"sourcesContent":["export class CursorController {\n private targetElement: HTMLElement;\n\n /**\n * Creates an instance of CursorController.\n * @param {HTMLElement | string} elementOrSelector - The target HTML element or a CSS selector string to find it.\n * @throws {Error} If the element cannot be found using the selector.\n */\n constructor(elementOrSelector: HTMLElement | string) {\n const element = typeof elementOrSelector === 'string'\n ? document.querySelector<HTMLElement>(elementOrSelector)\n : elementOrSelector;\n\n if (!element) {\n throw new Error(`CursorController: Element not found for selector \"${elementOrSelector}\"`);\n }\n\n // Basic check if the element type might support cursor positioning\n if (!(element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element.isContentEditable)) {\n console.warn(`CursorController: Target element (${element.tagName}) is not an input, textarea, or contenteditable. Cursor positioning may not work as expected.`);\n }\n\n this.targetElement = element;\n }\n\n /**\n * Sets the cursor position to the beginning of the element's textContent.\n * Ensures the element is focused before attempting to set the position.\n */\n public setToStart(): void {\n this.targetElement.focus(); // Element must be focused to manipulate selection reliably\n\n // Short delay can sometimes help ensure focus is registered before selection change\n // Especially relevant in complex UI interactions or frameworks.\n // Use requestAnimationFrame for a slightly better timing than setTimeout(0)\n requestAnimationFrame(() => {\n if (this.isInputOrTextAreaElement(this.targetElement)) {\n // Handle <input> and <textarea> elements\n this.targetElement.selectionStart = 0;\n this.targetElement.selectionEnd = 0;\n } else if (this.targetElement.isContentEditable) {\n // Handle contenteditable elements using Selection API\n const selection = window.getSelection();\n if (selection) {\n const range = document.createRange();\n range.selectNodeContents(this.targetElement); // Select all textContent within the element\n range.collapse(true); // Collapse the range to its start point\n selection.removeAllRanges(); // Clear any existing selections\n selection.addRange(range); // Add the new collapsed range\n }\n } else {\n console.warn(`CursorController: Cannot set cursor start on a non-editable element (${this.targetElement.tagName}).`);\n }\n });\n }\n\n /**\n * Sets the cursor position to the end of the element's textContent.\n * Ensures the element is focused before attempting to set the position.\n */\n public setToEnd(): void {\n this.targetElement.focus(); // Element must be focused\n\n requestAnimationFrame(() => {\n if (this.isInputOrTextAreaElement(this.targetElement)) {\n // Handle <input> and <textarea> elements\n const length = this.targetElement.value.length;\n this.targetElement.selectionStart = length;\n this.targetElement.selectionEnd = length;\n } else if (this.targetElement.isContentEditable) {\n // Handle contenteditable elements using Selection API\n const selection = window.getSelection();\n if (selection) {\n const range = document.createRange();\n range.selectNodeContents(this.targetElement); // Select all textContent\n range.collapse(false); // Collapse the range to its end point\n selection.removeAllRanges(); // Clear existing selections\n selection.addRange(range); // Add the new collapsed range\n }\n } else {\n console.warn(`CursorController: Cannot set cursor end on a non-editable element (${this.targetElement.tagName}).`);\n }\n });\n }\n\n /**\n * Type guard to check if the element is an HTMLInputElement or HTMLTextAreaElement.\n * @param element The element to check.\n * @returns {boolean} True if the element is an input or textarea.\n */\n private isInputOrTextAreaElement(element: HTMLElement): element is HTMLInputElement | HTMLTextAreaElement {\n return element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement;\n }\n\n /**\n * Gets the underlying HTML element being controlled.\n * @returns {HTMLElement} The target element.\n */\n public getElement(): HTMLElement {\n return this.targetElement;\n }\n}\n"],"mappings":"AAAA,IAAa,mBAAb,MAA6B;CACnB;CAOR,YAAY,mBAAuC;EACjD,MAAM,UAAU,OAAO,sBAAsB,WACzC,SAAS,cAA2B,iBAAiB,IACrD;EAEJ,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD,kBAAiB,EAAG;EAI3F,IAAI,EAAE,mBAAmB,oBAAoB,mBAAmB,uBAAuB,QAAQ,oBAC7F,QAAQ,KAAK,qCAAqC,QAAQ,QAAO,8FAA+F;EAGlK,KAAK,gBAAgB;CACvB;CAMO,aAAU;EACf,KAAK,cAAc,MAAK;EAKxB,4BAA2B;GACzB,IAAI,KAAK,yBAAyB,KAAK,aAAa,GAAG;IAErD,KAAK,cAAc,iBAAiB;IACpC,KAAK,cAAc,eAAe;GACpC,OAAO,IAAI,KAAK,cAAc,mBAAmB;IAE/C,MAAM,YAAY,OAAO,aAAY;IACrC,IAAI,WAAW;KACb,MAAM,QAAQ,SAAS,YAAW;KAClC,MAAM,mBAAmB,KAAK,aAAa;KAC3C,MAAM,SAAS,IAAI;KACnB,UAAU,gBAAe;KACzB,UAAU,SAAS,KAAK;IAC1B;GACF,OACE,QAAQ,KAAK,wEAAwE,KAAK,cAAc,QAAO,GAAI;EAEvH,CAAC;CACH;CAMO,WAAQ;EACb,KAAK,cAAc,MAAK;EAExB,4BAA2B;GACzB,IAAI,KAAK,yBAAyB,KAAK,aAAa,GAAG;IAErD,MAAM,SAAS,KAAK,cAAc,MAAM;IACxC,KAAK,cAAc,iBAAiB;IACpC,KAAK,cAAc,eAAe;GACpC,OAAO,IAAI,KAAK,cAAc,mBAAmB;IAE/C,MAAM,YAAY,OAAO,aAAY;IACrC,IAAI,WAAW;KACb,MAAM,QAAQ,SAAS,YAAW;KAClC,MAAM,mBAAmB,KAAK,aAAa;KAC3C,MAAM,SAAS,KAAK;KACpB,UAAU,gBAAe;KACzB,UAAU,SAAS,KAAK;IAC1B;GACF,OACE,QAAQ,KAAK,sEAAsE,KAAK,cAAc,QAAO,GAAI;EAErH,CAAC;CACH;CAOQ,yBAAyB,SAAoB;EACnD,OAAO,mBAAmB,oBAAoB,mBAAmB;CACnE;CAMO,aAAU;EACf,OAAO,KAAK;CACd;AACD"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { f as contentEditorText } from "./content-builder.store-D622mHxt.mjs";
|
|
2
|
+
import { getNgsHeadlessEditorTableData } from "@ngstarter-ui/components/headless-editor";
|
|
3
|
+
function getTextAlignment(props) {
|
|
4
|
+
const value = props?.find((prop) => prop.name === "text-alignment")?.value;
|
|
5
|
+
if (value === "center" || value === "right" || value === "justify") return value;
|
|
6
|
+
return "left";
|
|
7
|
+
}
|
|
8
|
+
function getDimensionAttribute(value) {
|
|
9
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
10
|
+
if (typeof value === "string") {
|
|
11
|
+
const trimmed = value.trim();
|
|
12
|
+
if (!trimmed || trimmed === "auto") return null;
|
|
13
|
+
const parsed = Number.parseFloat(trimmed);
|
|
14
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function contentEditorGridSettings(settings) {
|
|
19
|
+
return {
|
|
20
|
+
columns: settings.columns === 3 || settings.columns === 4 ? settings.columns : 2,
|
|
21
|
+
gap: settings.gap === "small" || settings.gap === "large" ? settings.gap : "medium",
|
|
22
|
+
stackOnMobile: settings.stackOnMobile !== false
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const CONTENT_EDITOR_GRID_HTML_STYLES = `.ngs-content-editor-html-grid{container-type:inline-size}.ngs-content-editor-html-grid-cells{display:grid;grid-template-columns:repeat(var(--ngs-html-grid-columns),minmax(0,1fr));gap:var(--ngs-html-grid-gap)}.ngs-content-editor-html-grid-cell{min-width:0}@container(max-width:480px){.ngs-content-editor-html-grid-stack{grid-template-columns:minmax(0,1fr)}}`;
|
|
26
|
+
const CONTENT_EDITOR_CALLOUT_HTML_STYLES = `.ngs-content-editor-html-callout{padding:16px;border-radius:8px;background:var(--ngs-color-primary-container,#eef3ff);color:var(--ngs-color-on-surface,#172033)}.ngs-content-editor-html-callout[data-callout=tip]{background:var(--ngs-color-success-container,#e8f5ee)}.ngs-content-editor-html-callout[data-callout=warning]{background:var(--ngs-color-warning-container,#fff3dc)}.ngs-content-editor-html-callout[data-callout=danger]{background:var(--ngs-color-danger-container,#fdeaea)}`;
|
|
27
|
+
const CONTENT_EDITOR_GALLERY_HTML_STYLES = `.ngs-content-editor-html-gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:16px}.ngs-content-editor-html-gallery>figure{flex:0 0 100%;min-width:0;margin:0;scroll-snap-align:start}.ngs-content-editor-html-gallery img{display:block;width:100%}`;
|
|
28
|
+
function settings(block) {
|
|
29
|
+
return block.attrs?.["settings"] ?? {};
|
|
30
|
+
}
|
|
31
|
+
function alignment(props) {
|
|
32
|
+
const align = getTextAlignment(props);
|
|
33
|
+
return align === "left" ? "" : ` style="text-align:${align}"`;
|
|
34
|
+
}
|
|
35
|
+
function dimension(name, value) {
|
|
36
|
+
const number = getDimensionAttribute(value);
|
|
37
|
+
return number !== null && number > 0 ? ` ${name}="${Math.round(number)}"` : "";
|
|
38
|
+
}
|
|
39
|
+
const contentEditorParagraphToHtml = (block, ctx) => `<p${alignment(block.attrs?.["props"])}>${ctx.renderText(block.content)}</p>`;
|
|
40
|
+
const contentEditorHeadingToHtml = (block, ctx) => {
|
|
41
|
+
const value = settings(block)["level"];
|
|
42
|
+
const level = Number.isInteger(value) && value >= 1 && value <= 6 ? value : 2;
|
|
43
|
+
return `<h${level}${alignment(block.attrs?.["props"])}>${ctx.renderText(block.content)}</h${level}>`;
|
|
44
|
+
};
|
|
45
|
+
const contentEditorCodeToHtml = (block, ctx) => `<pre><code data-language="${ctx.escape(settings(block)["language"] ?? "none")}">${ctx.escape(contentEditorText(block.content))}</code></pre>`;
|
|
46
|
+
const contentEditorDividerToHtml = () => "<hr>";
|
|
47
|
+
const contentEditorListToHtml = (block, ctx) => {
|
|
48
|
+
const tag = block.type === "orderedList" ? "ol" : "ul";
|
|
49
|
+
const list = (items) => `<${tag}>${items.map((item) => `<li${alignment(item.props)}>${ctx.renderText(item.content)}${item.children?.length ? list(item.children) : ""}</li>`).join("")}</${tag}>`;
|
|
50
|
+
return list(block.content ?? []);
|
|
51
|
+
};
|
|
52
|
+
const contentEditorQuoteToHtml = (block, ctx) => {
|
|
53
|
+
const quote = block.content?.cite;
|
|
54
|
+
const caption = block.content?.caption;
|
|
55
|
+
return `<figure><blockquote${alignment(quote?.props)}>${ctx.renderText(quote?.content ?? [])}</blockquote>${contentEditorText(caption?.content).trim() ? `<figcaption${alignment(caption.props)}>${ctx.renderText(caption.content)}</figcaption>` : ""}</figure>`;
|
|
56
|
+
};
|
|
57
|
+
const contentEditorTableToHtml = (block, ctx) => {
|
|
58
|
+
const table = getNgsHeadlessEditorTableData(block);
|
|
59
|
+
const fullWidth = settings(block)["fullWidth"] !== false;
|
|
60
|
+
const widthAttribute = fullWidth ? "data-content-editor-cell-width" : "width";
|
|
61
|
+
const metadata = block.attrs?.["cellMetadata"];
|
|
62
|
+
const rows = table.rows.map((row, r) => `<tr>${row.map((runs, c) => {
|
|
63
|
+
const tag = r === 0 && table.header ? "th" : "td";
|
|
64
|
+
const cell = metadata?.[r]?.[c];
|
|
65
|
+
return `<${tag}${dimension("colspan", cell?.options?.["colspan"])}${dimension("rowspan", cell?.options?.["rowspan"])}${dimension(widthAttribute, cell?.options?.["width"])}${alignment(cell?.props)}>${ctx.renderText(runs)}</${tag}>`;
|
|
66
|
+
}).join("")}</tr>`).join("");
|
|
67
|
+
return `<table ${fullWidth ? "style=\"width:100%;table-layout:fixed\"" : "data-content-editor-table-width=\"manual\" style=\"width:auto\""}><tbody>${rows}</tbody></table>`;
|
|
68
|
+
};
|
|
69
|
+
const contentEditorImageToHtml = (block, ctx) => {
|
|
70
|
+
const src = ctx.safeUrl(block.content?.src, "image");
|
|
71
|
+
if (!src) return "";
|
|
72
|
+
const alt = block.content?.alt ?? "";
|
|
73
|
+
const config = settings(block);
|
|
74
|
+
return `<figure><img src="${ctx.escape(src)}" alt="${ctx.escape(alt)}"${dimension("width", config["width"])}${dimension("height", config["height"])} style="max-width:100%;height:auto">${alt ? `<figcaption>${ctx.escape(alt)}</figcaption>` : ""}</figure>`;
|
|
75
|
+
};
|
|
76
|
+
const contentEditorVideoToHtml = (block, ctx) => {
|
|
77
|
+
const src = ctx.safeUrl(block.content?.src, "media");
|
|
78
|
+
if (!src) return "";
|
|
79
|
+
const config = settings(block);
|
|
80
|
+
return `<figure><video src="${ctx.escape(src)}" controls${dimension("width", config["width"])}${dimension("height", config["height"])} style="max-width:100%"></video>${block.content?.caption ? `<figcaption>${ctx.escape(block.content.caption)}</figcaption>` : ""}</figure>`;
|
|
81
|
+
};
|
|
82
|
+
const contentEditorEmbedToHtml = (block, ctx) => {
|
|
83
|
+
const src = ctx.safeUrl(block.content?.url, "embed");
|
|
84
|
+
if (!src) return "";
|
|
85
|
+
const config = settings(block);
|
|
86
|
+
return `<figure><iframe src="${ctx.escape(src)}" title="${ctx.escape(block.content?.type || "Embedded content")}"${dimension("width", config["width"] ?? 700)}${dimension("height", config["height"] ?? 400)} style="max-width:100%" allowfullscreen></iframe></figure>`;
|
|
87
|
+
};
|
|
88
|
+
const contentEditorCalloutToHtml = (block, ctx) => {
|
|
89
|
+
ctx.addStyles(CONTENT_EDITOR_CALLOUT_HTML_STYLES);
|
|
90
|
+
const value = settings(block)["variant"];
|
|
91
|
+
return `<aside class="ngs-content-editor-html-callout" data-callout="${[
|
|
92
|
+
"note",
|
|
93
|
+
"tip",
|
|
94
|
+
"warning",
|
|
95
|
+
"danger"
|
|
96
|
+
].includes(value) ? value : "note"}"${alignment(block.attrs?.["props"])}>${ctx.renderText(block.content)}</aside>`;
|
|
97
|
+
};
|
|
98
|
+
const contentEditorToggleToHtml = (block, ctx) => `<details${settings(block)["expanded"] ? " open" : ""}><summary>${ctx.renderText(block.content?.title ?? [])}</summary>${ctx.renderBlocks(block.content?.blocks ?? [])}</details>`;
|
|
99
|
+
const contentEditorAttachmentToHtml = (block, ctx) => {
|
|
100
|
+
const url = ctx.safeUrl(block.content?.url, "attachment");
|
|
101
|
+
return url ? `<a href="${ctx.escape(url)}" download="${ctx.escape(block.content?.name)}">${ctx.escape(block.content?.name || "Download")}</a>` : "";
|
|
102
|
+
};
|
|
103
|
+
const contentEditorGalleryToHtml = (block, ctx) => {
|
|
104
|
+
ctx.addStyles(CONTENT_EDITOR_GALLERY_HTML_STYLES);
|
|
105
|
+
return `<div class="ngs-content-editor-html-gallery" data-content-editor="gallery">${(block.content?.images ?? []).map((image) => {
|
|
106
|
+
const src = ctx.safeUrl(image.src, "image");
|
|
107
|
+
return src ? `<figure><img src="${ctx.escape(src)}" alt="${ctx.escape(image.alt)}" style="max-width:100%;height:auto">${contentEditorText(image.caption).trim() ? `<figcaption>${ctx.renderText(image.caption)}</figcaption>` : ""}</figure>` : "";
|
|
108
|
+
}).join("")}</div>`;
|
|
109
|
+
};
|
|
110
|
+
const contentEditorGridToHtml = (block, ctx) => {
|
|
111
|
+
const layout = contentEditorGridSettings(settings(block));
|
|
112
|
+
ctx.addStyles(CONTENT_EDITOR_GRID_HTML_STYLES);
|
|
113
|
+
const gap = {
|
|
114
|
+
small: 12,
|
|
115
|
+
medium: 24,
|
|
116
|
+
large: 36
|
|
117
|
+
}[layout.gap];
|
|
118
|
+
return `<div class="ngs-content-editor-html-grid" style="--ngs-html-grid-columns:${layout.columns};--ngs-html-grid-gap:${gap}px"><div class="ngs-content-editor-html-grid-cells${layout.stackOnMobile ? " ngs-content-editor-html-grid-stack" : ""}">${(block.content?.cells ?? []).map((cell) => `<div class="ngs-content-editor-html-grid-cell">${ctx.renderBlocks(cell.blocks)}</div>`).join("")}</div></div>`;
|
|
119
|
+
};
|
|
120
|
+
const CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS = {
|
|
121
|
+
paragraph: contentEditorParagraphToHtml,
|
|
122
|
+
heading: contentEditorHeadingToHtml,
|
|
123
|
+
code: contentEditorCodeToHtml,
|
|
124
|
+
divider: contentEditorDividerToHtml,
|
|
125
|
+
bulletList: contentEditorListToHtml,
|
|
126
|
+
orderedList: contentEditorListToHtml,
|
|
127
|
+
quote: contentEditorQuoteToHtml,
|
|
128
|
+
table: contentEditorTableToHtml,
|
|
129
|
+
image: contentEditorImageToHtml,
|
|
130
|
+
video: contentEditorVideoToHtml,
|
|
131
|
+
embed: contentEditorEmbedToHtml,
|
|
132
|
+
callout: contentEditorCalloutToHtml,
|
|
133
|
+
toggle: contentEditorToggleToHtml,
|
|
134
|
+
attachment: contentEditorAttachmentToHtml,
|
|
135
|
+
gallery: contentEditorGalleryToHtml,
|
|
136
|
+
grid: contentEditorGridToHtml
|
|
137
|
+
};
|
|
138
|
+
export { getTextAlignment as S, contentEditorTableToHtml as _, contentEditorAttachmentToHtml as a, contentEditorGridSettings as b, contentEditorDividerToHtml as c, contentEditorGridToHtml as d, contentEditorHeadingToHtml as f, contentEditorQuoteToHtml as g, contentEditorParagraphToHtml as h, CONTENT_EDITOR_GRID_HTML_STYLES as i, contentEditorEmbedToHtml as l, contentEditorListToHtml as m, CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS as n, contentEditorCalloutToHtml as o, contentEditorImageToHtml as p, CONTENT_EDITOR_GALLERY_HTML_STYLES as r, contentEditorCodeToHtml as s, CONTENT_EDITOR_CALLOUT_HTML_STYLES as t, contentEditorGalleryToHtml as u, contentEditorToggleToHtml as v, getDimensionAttribute as x, contentEditorVideoToHtml as y };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=default-converters-9oSKDsXP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-converters-9oSKDsXP.mjs","names":[],"sources":["../../../projects/components/content-editor/src/_renderer/renderer-utils.ts","../../../projects/components/content-editor/src/grid-settings.ts","../../../projects/components/content-editor/src/html/default-converters.ts"],"sourcesContent":["import { ContentEditorItemProperty } from '../types';\n\nexport type ContentEditorTextAlignment = 'left' | 'center' | 'right' | 'justify';\n\nexport function getTextAlignment(\n props: ReadonlyArray<ContentEditorItemProperty> | null | undefined,\n): ContentEditorTextAlignment {\n const value = props?.find(prop => prop.name === 'text-alignment')?.value;\n\n if (value === 'center' || value === 'right' || value === 'justify') {\n return value;\n }\n\n return 'left';\n}\n\nexport function getDimensionAttribute(value: unknown): number | null {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n\n if (typeof value === 'string') {\n const trimmed = value.trim();\n\n if (!trimmed || trimmed === 'auto') {\n return null;\n }\n\n const parsed = Number.parseFloat(trimmed);\n return Number.isFinite(parsed) ? parsed : null;\n }\n\n return null;\n}\n","import { ContentEditorGridSettings } from './types';\n\n/** Defaults shared by editing and read-only layout. */\nexport function contentEditorGridSettings(settings: Partial<ContentEditorGridSettings>): ContentEditorGridSettings {\n return {\n columns: settings.columns === 3 || settings.columns === 4 ? settings.columns : 2,\n gap: settings.gap === 'small' || settings.gap === 'large' ? settings.gap : 'medium',\n stackOnMobile: settings.stackOnMobile !== false\n };\n}\n","import { getNgsHeadlessEditorTableData } from '@ngstarter-ui/components/headless-editor';\nimport {\n ContentEditorBlock, ContentEditorGalleryContent, ContentEditorGridContent,\n ContentEditorListItem, ContentEditorToggleContent\n} from '../types';\nimport { contentEditorText } from '../document';\nimport { getDimensionAttribute, getTextAlignment } from '../_renderer/renderer-utils';\nimport { contentEditorGridSettings } from '../grid-settings';\nimport { ContentEditorBlockHtmlConverter, ContentEditorHtmlContext } from './types';\n\n/** Plain HTML layout styles, independent of Angular and the component library's theme. */\nexport const CONTENT_EDITOR_GRID_HTML_STYLES = `.ngs-content-editor-html-grid{container-type:inline-size}.ngs-content-editor-html-grid-cells{display:grid;grid-template-columns:repeat(var(--ngs-html-grid-columns),minmax(0,1fr));gap:var(--ngs-html-grid-gap)}.ngs-content-editor-html-grid-cell{min-width:0}@container(max-width:480px){.ngs-content-editor-html-grid-stack{grid-template-columns:minmax(0,1fr)}}`;\nexport const CONTENT_EDITOR_CALLOUT_HTML_STYLES = `.ngs-content-editor-html-callout{padding:16px;border-radius:8px;background:var(--ngs-color-primary-container,#eef3ff);color:var(--ngs-color-on-surface,#172033)}.ngs-content-editor-html-callout[data-callout=tip]{background:var(--ngs-color-success-container,#e8f5ee)}.ngs-content-editor-html-callout[data-callout=warning]{background:var(--ngs-color-warning-container,#fff3dc)}.ngs-content-editor-html-callout[data-callout=danger]{background:var(--ngs-color-danger-container,#fdeaea)}`;\nexport const CONTENT_EDITOR_GALLERY_HTML_STYLES = `.ngs-content-editor-html-gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:16px}.ngs-content-editor-html-gallery>figure{flex:0 0 100%;min-width:0;margin:0;scroll-snap-align:start}.ngs-content-editor-html-gallery img{display:block;width:100%}`;\n\nfunction settings(block: ContentEditorBlock): Record<string, any> { return block.attrs?.['settings'] as Record<string, any> ?? {}; }\nfunction alignment(props: any): string {\n const align = getTextAlignment(props);\n return align === 'left' ? '' : ` style=\"text-align:${align}\"`;\n}\nfunction dimension(name: string, value: unknown): string {\n const number = getDimensionAttribute(value);\n return number !== null && number > 0 ? ` ${name}=\"${Math.round(number)}\"` : '';\n}\n\nexport const contentEditorParagraphToHtml: ContentEditorBlockHtmlConverter = (block, ctx) =>\n `<p${alignment(block.attrs?.['props'])}>${ctx.renderText(block.content)}</p>`;\nexport const contentEditorHeadingToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const value = settings(block)['level'];\n const level = Number.isInteger(value) && value >= 1 && value <= 6 ? value : 2;\n return `<h${level}${alignment(block.attrs?.['props'])}>${ctx.renderText(block.content)}</h${level}>`;\n};\nexport const contentEditorCodeToHtml: ContentEditorBlockHtmlConverter = (block, ctx) =>\n `<pre><code data-language=\"${ctx.escape(settings(block)['language'] ?? 'none')}\">${ctx.escape(contentEditorText(block.content))}</code></pre>`;\nexport const contentEditorDividerToHtml: ContentEditorBlockHtmlConverter = () => '<hr>';\nexport const contentEditorListToHtml: ContentEditorBlockHtmlConverter<readonly ContentEditorListItem[]> = (block, ctx) => {\n const tag = block.type === 'orderedList' ? 'ol' : 'ul';\n const list = (items: readonly ContentEditorListItem[]): string =>\n `<${tag}>${items.map(item => `<li${alignment(item.props)}>${ctx.renderText(item.content)}${item.children?.length ? list(item.children) : ''}</li>`).join('')}</${tag}>`;\n return list(block.content ?? []);\n};\nexport const contentEditorQuoteToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const quote = block.content?.cite;\n const caption = block.content?.caption;\n return `<figure><blockquote${alignment(quote?.props)}>${ctx.renderText(quote?.content ?? [])}</blockquote>${contentEditorText(caption?.content).trim() ? `<figcaption${alignment(caption.props)}>${ctx.renderText(caption.content)}</figcaption>` : ''}</figure>`;\n};\nexport const contentEditorTableToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const table = getNgsHeadlessEditorTableData(block);\n const fullWidth = settings(block)['fullWidth'] !== false;\n const widthAttribute = fullWidth ? 'data-content-editor-cell-width' : 'width';\n const metadata = block.attrs?.['cellMetadata'] as Array<Array<{ options?: Record<string, unknown>; props?: any }>> | undefined;\n const rows = table.rows.map((row, r) => `<tr>${row.map((runs, c) => {\n const tag = r === 0 && table.header ? 'th' : 'td';\n const cell = metadata?.[r]?.[c];\n return `<${tag}${dimension('colspan', cell?.options?.['colspan'])}${dimension('rowspan', cell?.options?.['rowspan'])}${dimension(widthAttribute, cell?.options?.['width'])}${alignment(cell?.props)}>${ctx.renderText(runs)}</${tag}>`;\n }).join('')}</tr>`).join('');\n const layout = fullWidth ? 'style=\"width:100%;table-layout:fixed\"' : 'data-content-editor-table-width=\"manual\" style=\"width:auto\"';\n return `<table ${layout}><tbody>${rows}</tbody></table>`;\n};\nexport const contentEditorImageToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const src = ctx.safeUrl(block.content?.src, 'image');\n if (!src) return '';\n const alt = block.content?.alt ?? '';\n const config = settings(block);\n return `<figure><img src=\"${ctx.escape(src)}\" alt=\"${ctx.escape(alt)}\"${dimension('width', config['width'])}${dimension('height', config['height'])} style=\"max-width:100%;height:auto\">${alt ? `<figcaption>${ctx.escape(alt)}</figcaption>` : ''}</figure>`;\n};\nexport const contentEditorVideoToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const src = ctx.safeUrl(block.content?.src, 'media');\n if (!src) return '';\n const config = settings(block);\n return `<figure><video src=\"${ctx.escape(src)}\" controls${dimension('width', config['width'])}${dimension('height', config['height'])} style=\"max-width:100%\"></video>${block.content?.caption ? `<figcaption>${ctx.escape(block.content.caption)}</figcaption>` : ''}</figure>`;\n};\nexport const contentEditorEmbedToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const src = ctx.safeUrl(block.content?.url, 'embed');\n if (!src) return '';\n const config = settings(block);\n return `<figure><iframe src=\"${ctx.escape(src)}\" title=\"${ctx.escape(block.content?.type || 'Embedded content')}\"${dimension('width', config['width'] ?? 700)}${dimension('height', config['height'] ?? 400)} style=\"max-width:100%\" allowfullscreen></iframe></figure>`;\n};\nexport const contentEditorCalloutToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n ctx.addStyles(CONTENT_EDITOR_CALLOUT_HTML_STYLES);\n const value = settings(block)['variant'];\n const variant = ['note', 'tip', 'warning', 'danger'].includes(value) ? value : 'note';\n return `<aside class=\"ngs-content-editor-html-callout\" data-callout=\"${variant}\"${alignment(block.attrs?.['props'])}>${ctx.renderText(block.content)}</aside>`;\n};\nexport const contentEditorToggleToHtml: ContentEditorBlockHtmlConverter<ContentEditorToggleContent> = (block, ctx) =>\n `<details${settings(block)['expanded'] ? ' open' : ''}><summary>${ctx.renderText(block.content?.title ?? [])}</summary>${ctx.renderBlocks(block.content?.blocks ?? [])}</details>`;\nexport const contentEditorAttachmentToHtml: ContentEditorBlockHtmlConverter = (block, ctx) => {\n const url = ctx.safeUrl(block.content?.url, 'attachment');\n return url ? `<a href=\"${ctx.escape(url)}\" download=\"${ctx.escape(block.content?.name)}\">${ctx.escape(block.content?.name || 'Download')}</a>` : '';\n};\nexport const contentEditorGalleryToHtml: ContentEditorBlockHtmlConverter<ContentEditorGalleryContent> = (block, ctx) => {\n ctx.addStyles(CONTENT_EDITOR_GALLERY_HTML_STYLES);\n return `<div class=\"ngs-content-editor-html-gallery\" data-content-editor=\"gallery\">${(block.content?.images ?? []).map(image => {\n const src = ctx.safeUrl(image.src, 'image');\n return src ? `<figure><img src=\"${ctx.escape(src)}\" alt=\"${ctx.escape(image.alt)}\" style=\"max-width:100%;height:auto\">${contentEditorText(image.caption).trim() ? `<figcaption>${ctx.renderText(image.caption)}</figcaption>` : ''}</figure>` : '';\n }).join('')}</div>`;\n};\nexport const contentEditorGridToHtml: ContentEditorBlockHtmlConverter<ContentEditorGridContent> = (block, ctx) => {\n const layout = contentEditorGridSettings(settings(block));\n ctx.addStyles(CONTENT_EDITOR_GRID_HTML_STYLES);\n const gap = { small: 12, medium: 24, large: 36 }[layout.gap];\n return `<div class=\"ngs-content-editor-html-grid\" style=\"--ngs-html-grid-columns:${layout.columns};--ngs-html-grid-gap:${gap}px\"><div class=\"ngs-content-editor-html-grid-cells${layout.stackOnMobile ? ' ngs-content-editor-html-grid-stack' : ''}\">${(block.content?.cells ?? []).map(cell => `<div class=\"ngs-content-editor-html-grid-cell\">${ctx.renderBlocks(cell.blocks)}</div>`).join('')}</div></div>`;\n};\n\nexport const CONTENT_EDITOR_DEFAULT_HTML_CONVERTERS: Readonly<Record<string, ContentEditorBlockHtmlConverter>> = {\n paragraph: contentEditorParagraphToHtml, heading: contentEditorHeadingToHtml,\n code: contentEditorCodeToHtml, divider: contentEditorDividerToHtml,\n bulletList: contentEditorListToHtml, orderedList: contentEditorListToHtml,\n quote: contentEditorQuoteToHtml, table: contentEditorTableToHtml,\n image: contentEditorImageToHtml, video: contentEditorVideoToHtml,\n embed: contentEditorEmbedToHtml, callout: contentEditorCalloutToHtml,\n toggle: contentEditorToggleToHtml, attachment: contentEditorAttachmentToHtml,\n gallery: contentEditorGalleryToHtml, grid: contentEditorGridToHtml\n};\n"],"mappings":";;AAIA,SAAgB,iBACd,OAAkE;CAElE,MAAM,QAAQ,OAAO,MAAK,SAAQ,KAAK,SAAS,gBAAgB,CAAC,EAAE;CAEnE,IAAI,UAAU,YAAY,UAAU,WAAW,UAAU,WACvD,OAAO;CAGT,OAAO;AACT;AAEA,SAAgB,sBAAsB,OAAc;CAClD,IAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GACpD,OAAO;CAGT,IAAI,OAAO,UAAU,UAAU;EAC7B,MAAM,UAAU,MAAM,KAAI;EAE1B,IAAI,CAAC,WAAW,YAAY,QAC1B,OAAO;EAGT,MAAM,SAAS,OAAO,WAAW,OAAO;EACxC,OAAO,OAAO,SAAS,MAAM,IAAI,SAAS;CAC5C;CAEA,OAAO;AACT;AC9BA,SAAgB,0BAA0B,UAA4C;CACpF,OAAO;EACL,SAAS,SAAS,YAAY,KAAK,SAAS,YAAY,IAAI,SAAS,UAAU;EAC/E,KAAK,SAAS,QAAQ,WAAW,SAAS,QAAQ,UAAU,SAAS,MAAM;EAC3E,eAAe,SAAS,kBAAkB;CAC3C;AACH;ACEA,MAAa,kCAAkC;AAC/C,MAAa,qCAAqC;AAClD,MAAa,qCAAqC;AAElD,SAAS,SAAS,OAAyB;CAAyB,OAAO,MAAM,QAAQ,eAAsC,CAAA;AAAI;AACnI,SAAS,UAAU,OAAU;CAC3B,MAAM,QAAQ,iBAAiB,KAAK;CACpC,OAAO,UAAU,SAAS,KAAK,sBAAsB,MAAK;AAC5D;AACA,SAAS,UAAU,MAAc,OAAc;CAC7C,MAAM,SAAS,sBAAsB,KAAK;CAC1C,OAAO,WAAW,QAAQ,SAAS,IAAI,IAAI,KAAI,IAAK,KAAK,MAAM,MAAM,EAAC,KAAM;AA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BAA4F,OAAO,QAAO;CACrH,IAAI,UAAU,kCAAkC;CAChD,OAAO,+EAA+E,MAAM,SAAS,UAAU,CAAA,EAAA,CAAI,KAAI,UAAQ;EAC7H,MAAM,MAAM,IAAI,QAAQ,MAAM,KAAK,OAAO;EAC1C,OAAO,MAAM,qBAAqB,IAAI,OAAO,GAAG,EAAC,SAAU,IAAI,OAAO,MAAM,GAAG,EAAC,uCAAwC,kBAAkB,MAAM,OAAO,CAAC,CAAC,KAAI,IAAK,eAAe,IAAI,WAAW,MAAM,OAAO,EAAC,iBAAkB,GAAE,aAAc;CAClP,CAAC,CAAC,CAAC,KAAK,EAAE,EAAC;AACb;AACA,MAAa,2BAAsF,OAAO,QAAO;CAC/G,MAAM,SAAS,0BAA0B,SAAS,KAAK,CAAC;CACxD,IAAI,UAAU,+BAA+B;CAC7C,MAAM,MAAM;EAAE,OAAO;EAAI,QAAQ;EAAI,OAAO;CAAE,EAAG,OAAO;CACxD,OAAO,4EAA4E,OAAO,QAAO,uBAAwB,IAAG,oDAAqD,OAAO,gBAAgB,wCAAwC,GAAE,KAAM,MAAM,SAAS,SAAS,CAAA,EAAA,CAAI,KAAI,SAAQ,kDAAkD,IAAI,aAAa,KAAK,MAAM,EAAC,OAAQ,CAAC,CAAC,KAAK,EAAE,EAAC;AACnY;AAEA,MAAa,yCAAoG;CAC/G,WAAW;CAA8B,SAAS;CAClD,MAAM;CAAyB,SAAS;CACxC,YAAY;CAAyB,aAAa;CAClD,OAAO;CAA0B,OAAO;CACxC,OAAO;CAA0B,OAAO;CACxC,OAAO;CAA0B,SAAS;CAC1C,QAAQ;CAA2B,YAAY;CAC/C,SAAS;CAA4B,MAAM;AAC5C"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input, signal } from "@angular/core";
|
|
3
|
+
import { Divider } from "@ngstarter-ui/components/divider";
|
|
4
|
+
var DividerBlockComponent = class DividerBlockComponent {
|
|
5
|
+
id = input.required(...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
6
|
+
content = input.required(...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
7
|
+
settings = input.required(...ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []);
|
|
8
|
+
index = input.required(...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
|
|
9
|
+
props = input([], ...ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []);
|
|
10
|
+
initialized = signal(true, ...ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []);
|
|
11
|
+
getData() {
|
|
12
|
+
return {
|
|
13
|
+
content: null,
|
|
14
|
+
settings: this.settings()
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
isEmpty() {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
focus() {}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
22
|
+
minVersion: "12.0.0",
|
|
23
|
+
version: "22.3.0",
|
|
24
|
+
ngImport: i0,
|
|
25
|
+
type: DividerBlockComponent,
|
|
26
|
+
deps: [],
|
|
27
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
28
|
+
});
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
30
|
+
minVersion: "17.1.0",
|
|
31
|
+
version: "22.3.0",
|
|
32
|
+
type: DividerBlockComponent,
|
|
33
|
+
isStandalone: true,
|
|
34
|
+
selector: "ngs-divider-block",
|
|
35
|
+
inputs: {
|
|
36
|
+
id: {
|
|
37
|
+
classPropertyName: "id",
|
|
38
|
+
publicName: "id",
|
|
39
|
+
isSignal: true,
|
|
40
|
+
isRequired: true,
|
|
41
|
+
transformFunction: null
|
|
42
|
+
},
|
|
43
|
+
content: {
|
|
44
|
+
classPropertyName: "content",
|
|
45
|
+
publicName: "content",
|
|
46
|
+
isSignal: true,
|
|
47
|
+
isRequired: true,
|
|
48
|
+
transformFunction: null
|
|
49
|
+
},
|
|
50
|
+
settings: {
|
|
51
|
+
classPropertyName: "settings",
|
|
52
|
+
publicName: "settings",
|
|
53
|
+
isSignal: true,
|
|
54
|
+
isRequired: true,
|
|
55
|
+
transformFunction: null
|
|
56
|
+
},
|
|
57
|
+
index: {
|
|
58
|
+
classPropertyName: "index",
|
|
59
|
+
publicName: "index",
|
|
60
|
+
isSignal: true,
|
|
61
|
+
isRequired: true,
|
|
62
|
+
transformFunction: null
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
classPropertyName: "props",
|
|
66
|
+
publicName: "props",
|
|
67
|
+
isSignal: true,
|
|
68
|
+
isRequired: false,
|
|
69
|
+
transformFunction: null
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
ngImport: i0,
|
|
73
|
+
template: "<ngs-divider/>\n",
|
|
74
|
+
styles: [""],
|
|
75
|
+
dependencies: [{
|
|
76
|
+
kind: "component",
|
|
77
|
+
type: Divider,
|
|
78
|
+
selector: "ngs-divider",
|
|
79
|
+
inputs: [
|
|
80
|
+
"vertical",
|
|
81
|
+
"inset",
|
|
82
|
+
"fixedHeight"
|
|
83
|
+
],
|
|
84
|
+
exportAs: ["ngsDivider"]
|
|
85
|
+
}],
|
|
86
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
90
|
+
minVersion: "12.0.0",
|
|
91
|
+
version: "22.3.0",
|
|
92
|
+
ngImport: i0,
|
|
93
|
+
type: DividerBlockComponent,
|
|
94
|
+
decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{
|
|
97
|
+
selector: "ngs-divider-block",
|
|
98
|
+
imports: [Divider],
|
|
99
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
100
|
+
template: "<ngs-divider/>\n"
|
|
101
|
+
}]
|
|
102
|
+
}],
|
|
103
|
+
propDecorators: {
|
|
104
|
+
id: [{
|
|
105
|
+
type: i0.Input,
|
|
106
|
+
args: [{
|
|
107
|
+
isSignal: true,
|
|
108
|
+
alias: "id",
|
|
109
|
+
required: true
|
|
110
|
+
}]
|
|
111
|
+
}],
|
|
112
|
+
content: [{
|
|
113
|
+
type: i0.Input,
|
|
114
|
+
args: [{
|
|
115
|
+
isSignal: true,
|
|
116
|
+
alias: "content",
|
|
117
|
+
required: true
|
|
118
|
+
}]
|
|
119
|
+
}],
|
|
120
|
+
settings: [{
|
|
121
|
+
type: i0.Input,
|
|
122
|
+
args: [{
|
|
123
|
+
isSignal: true,
|
|
124
|
+
alias: "settings",
|
|
125
|
+
required: true
|
|
126
|
+
}]
|
|
127
|
+
}],
|
|
128
|
+
index: [{
|
|
129
|
+
type: i0.Input,
|
|
130
|
+
args: [{
|
|
131
|
+
isSignal: true,
|
|
132
|
+
alias: "index",
|
|
133
|
+
required: true
|
|
134
|
+
}]
|
|
135
|
+
}],
|
|
136
|
+
props: [{
|
|
137
|
+
type: i0.Input,
|
|
138
|
+
args: [{
|
|
139
|
+
isSignal: true,
|
|
140
|
+
alias: "props",
|
|
141
|
+
required: false
|
|
142
|
+
}]
|
|
143
|
+
}]
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
export { DividerBlockComponent };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=divider-block.component-Dvgeq_D0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider-block.component-Dvgeq_D0.mjs","names":[],"sources":["../../../projects/components/content-editor/src/_builder/divider-block/divider-block.component.ts","../../../projects/components/content-editor/src/_builder/divider-block/divider-block.component.html"],"sourcesContent":["import { Component, input, signal, ChangeDetectionStrategy } from '@angular/core';\nimport { Divider } from '@ngstarter-ui/components/divider';\nimport { ContentEditorDataBlock } from '../../types';\nimport { ContentEditorCodeBlockSettings } from '../code-block/code-block.component';\n\n@Component({\n selector: 'ngs-divider-block',\n imports: [\n Divider\n ],\n templateUrl: './divider-block.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n styleUrl: './divider-block.component.scss'\n})\nexport class DividerBlockComponent implements ContentEditorDataBlock {\n id = input.required<string>();\n content = input.required<string>();\n settings = input.required<ContentEditorCodeBlockSettings>();\n index = input.required<number>();\n props = input<unknown[]>([]);\n\n readonly initialized = signal(true);\n\n getData(): any {\n return {\n content: null,\n settings: this.settings()\n };\n }\n\n isEmpty(): boolean {\n return true;\n }\n\n focus() {\n }\n}\n","<ngs-divider/>\n"],"mappings":";;;AAcA,IAAa,wBAAb,MAAa,sBAAqB;CAChC,KAAK,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC7B,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,WAAW,MAAM,SAA0C,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC3D,QAAQ,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,QAAQ,MAAiB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEnB,cAAc,OAAO,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAEnC,UAAO;EACL,OAAO;GACL,SAAS;GACT,UAAU,KAAK,SAAQ;EACxB;CACH;CAEA,UAAO;EACL,OAAO;CACT;CAEA,QAAK,CACL;CArBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;E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