@mintplayer/ng-bootstrap 22.32.0 → 22.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -166
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -9
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +12 -14
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +8 -8
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +15 -27
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -10
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +201 -18
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +13 -15
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +8 -16
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +49 -65
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -24
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +10 -12
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +2 -22
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
- package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
- package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
- package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
- package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
- package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
- package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
- package/types/mintplayer-ng-bootstrap-machine.d.ts +101 -4
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
- package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
- package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
- package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
- package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
- package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
- package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
- package/calendar-month/package.json +0 -4
- package/dropdown-divider/package.json +0 -4
- package/dropdown-menu/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
- package/has-overlay/package.json +0 -4
- package/no-noscript/package.json +0 -4
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-list-group.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/list-group/src/
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-list-group.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/list-group/src/generated/list-group.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/generated/list-group.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/list-group/src/generated/list-group-item.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/generated/list-group-item.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/list-group/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/list-group/mintplayer-ng-bootstrap-list-group.ts"],"sourcesContent":["// GENERATED from the list-group manifest (list-group) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input } from '@angular/core';\nimport { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { listGroupCore, type ListGroupInputs, listGroupScopedStyles } from '@mintplayer/ui-core/list-group';\nimport { bootstrapListGroup } from '@mintplayer/ui-core/bootstrap/list-group';\n\n/** Bootstrap's list group: a `role=\"list\"` of `list-group-item`s. `flush` drops the outer borders. */\n@Component({\n selector: 'bs-list-group',\n templateUrl: './list-group.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsListGroupComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly flush = input<ListGroupInputs['flush'], unknown>(false, { transform: booleanAttribute });\n\n readonly #core = useCore(listGroupCore, { inputs: () => ({ flush: this.flush() }), idPrefix: 'bs-list-group', hostBag: (props) => ({ ...props.root, 'data-mps': 'list-group' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapListGroup.key, bootstrapListGroup.css, { order: bootstrapListGroup.order }); useScopedStyles('list-group', listGroupScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/list-group/src/templates/list-group.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the list-group manifest (list-group-item) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input } from '@angular/core';\nimport { useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { listGroupItemCore, type ListGroupItemInputs, listGroupScopedStyles } from '@mintplayer/ui-core/list-group';\nimport { bootstrapListGroup } from '@mintplayer/ui-core/bootstrap/list-group';\n\n/** One item of a list group. `active` marks the current one (`aria-current`); `color` is a contextual colour. */\n@Component({\n selector: 'bs-list-group-item',\n templateUrl: './list-group-item.view.generated.html',\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsListGroupItemComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly active = input<ListGroupItemInputs['active'], unknown>(false, { transform: booleanAttribute });\n readonly disabled = input<ListGroupItemInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly color = input<ListGroupItemInputs['color']>(null);\n\n readonly #core = useCore(listGroupItemCore, { inputs: () => ({ active: this.active(), disabled: this.disabled(), color: this.color() }), idPrefix: 'bs-list-group-item', hostBag: (props) => ({ ...props.root, 'data-mps': 'list-group' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapListGroup.key, bootstrapListGroup.css, { order: bootstrapListGroup.order }); useScopedStyles('list-group', listGroupScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/list-group/src/templates/list-group-item.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n","// GENERATED from the list-group manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsListGroupComponent } from './list-group.component.generated';\nexport { BsListGroupItemComponent } from './list-group-item.component.generated';\n","// Generated from @mintplayer/ui-core/list-group (#458 D10).\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAMA;MAOa,oBAAoB,CAAA;AAMtB,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AARS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;QAExD,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoC,KAAK,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAExF,IAAA,CAAA,KAAK,GAAG,OAAO,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,KAAK,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;AAE/J,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK;AAGzC,QAAA,eAAe,CAAC,kBAAkB,CAA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E,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC,KAAK,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;;AAE1N,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK;AAGzC,QAAA,eAAe,CAAC,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,CAAC;AAAE,QAAA,eAAe,CAAC,YAAY,EAAE,qBAAqB,CAAC;IAC5J;8GAdW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,8cCbrC,wKAEA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDWa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,OAAA,EAErB,EAAE,EAAA,eAAA,EACM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wKAAA,EAAA;;;AEXjD;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, inject, DestroyRef, input, ElementRef, Renderer2, effect, Directive, PLATFORM_ID, DOCUMENT, InjectionToken, makeEnvironmentProviders, TransferState, untracked, makeStateKey, PendingTasks, computed, afterNextRender, TemplateRef, ViewContainerRef, Pipe } from '@angular/core';
|
|
3
|
-
import { isPlatformServer } from '@angular/common';
|
|
2
|
+
import { signal, inject, DestroyRef, input, ElementRef, Renderer2, effect, Directive, PLATFORM_ID, DOCUMENT, InjectionToken, makeEnvironmentProviders, TransferState, untracked, makeStateKey, PendingTasks, computed, afterNextRender, TemplateRef, ViewContainerRef, Pipe, ApplicationRef, Injector, EnvironmentInjector, createComponent } from '@angular/core';
|
|
3
|
+
import { isPlatformServer, DOCUMENT as DOCUMENT$1, isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import { bootstrapInstallOptions } from '@mintplayer/ui-core/bootstrap';
|
|
5
|
-
import { writeScopedStyleTag, installLightStyles } from '@mintplayer/ui-core/scoped-styles';
|
|
6
|
-
import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
|
-
import { coreRuntime } from '@mintplayer/ui-core/component';
|
|
5
|
+
import { writeScopedStyleTag, installLightStyles, SCOPED_STYLE_MARKER } from '@mintplayer/ui-core/scoped-styles';
|
|
6
|
+
import { takeHostAria, BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
|
+
import { scopedHost, coreRuntime } from '@mintplayer/ui-core/component';
|
|
8
8
|
import { DEFAULT_PREFETCH_TIMEOUT, runPrefetch } from '@mintplayer/ui-core/transfer-state';
|
|
9
9
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
|
+
import { createBodyHost, removeBodyHost } from '@mintplayer/ui-core/overlay';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only
|
|
@@ -50,18 +51,34 @@ class MpPropsDirective {
|
|
|
50
51
|
constructor() {
|
|
51
52
|
this.mpProps = input(null, /* @ts-ignore */
|
|
52
53
|
...(ngDevMode ? [{ debugName: "mpProps" }] : /* istanbul ignore next */ []));
|
|
54
|
+
/**
|
|
55
|
+
* The host's forwarded `aria-*` / `id` / `tabindex` (`useHostAttrs`), written over
|
|
56
|
+
* the bag: the consumer's word wins. Except an `id` the bag sets itself, which
|
|
57
|
+
* the core's own references (a `label for`, an `aria-controls`) point at: then
|
|
58
|
+
* the consumer's id goes back to the host instead.
|
|
59
|
+
*/
|
|
60
|
+
this.mpHostAttrs = input(null, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "mpHostAttrs" }] : /* istanbul ignore next */ []));
|
|
53
62
|
this.element = inject(ElementRef).nativeElement;
|
|
54
63
|
this.renderer = inject(Renderer2);
|
|
55
64
|
this.applied = {};
|
|
56
|
-
effect(() =>
|
|
65
|
+
effect(() => {
|
|
66
|
+
const bag = this.mpProps() ?? {};
|
|
67
|
+
const forwarded = this.mpHostAttrs();
|
|
68
|
+
const { id, ...rest } = forwarded?.attrs ?? {};
|
|
69
|
+
const ownId = bag['id'] !== null && bag['id'] !== undefined;
|
|
70
|
+
if (forwarded && ownId && id)
|
|
71
|
+
this.renderer.setAttribute(forwarded.host, 'id', String(id));
|
|
72
|
+
this.applied = applyPropBag(this.renderer, this.element, this.applied, { ...bag, ...rest, ...(id && !ownId ? { id } : {}) });
|
|
73
|
+
});
|
|
57
74
|
}
|
|
58
75
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpPropsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
59
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: MpPropsDirective, isStandalone: true, selector: "[mpProps]", inputs: { mpProps: { classPropertyName: "mpProps", publicName: "mpProps", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
76
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: MpPropsDirective, isStandalone: true, selector: "[mpProps],[mpHostAttrs]", inputs: { mpProps: { classPropertyName: "mpProps", publicName: "mpProps", isSignal: true, isRequired: false, transformFunction: null }, mpHostAttrs: { classPropertyName: "mpHostAttrs", publicName: "mpHostAttrs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
60
77
|
}
|
|
61
78
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpPropsDirective, decorators: [{
|
|
62
79
|
type: Directive,
|
|
63
|
-
args: [{ selector: '[mpProps]' }]
|
|
64
|
-
}], ctorParameters: () => [], propDecorators: { mpProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpProps", required: false }] }] } });
|
|
80
|
+
args: [{ selector: '[mpProps],[mpHostAttrs]' }]
|
|
81
|
+
}], ctorParameters: () => [], propDecorators: { mpProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpProps", required: false }] }], mpHostAttrs: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpHostAttrs", required: false }] }] } });
|
|
65
82
|
/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */
|
|
66
83
|
function applyPropBag(renderer, element, previous, next) {
|
|
67
84
|
Object.keys(previous)
|
|
@@ -143,13 +160,17 @@ function repairEventReplayBodyPaths(doc) {
|
|
|
143
160
|
*
|
|
144
161
|
* constructor() { useHostProps(() => this.view().root); }
|
|
145
162
|
*/
|
|
146
|
-
function useHostProps(bag) {
|
|
147
|
-
const
|
|
163
|
+
function useHostProps(bag, target) {
|
|
164
|
+
const host = inject(ElementRef).nativeElement;
|
|
148
165
|
const renderer = inject(Renderer2);
|
|
149
166
|
let applied = {};
|
|
150
167
|
let classes = [];
|
|
151
168
|
effect(() => {
|
|
169
|
+
// `target`: another element than the host (a structural directive's anchor), not placed yet in the constructor.
|
|
170
|
+
const element = target ? target() : host;
|
|
152
171
|
const { class: className, ...rest } = bag() ?? {};
|
|
172
|
+
if (!element)
|
|
173
|
+
return;
|
|
153
174
|
const next = typeof className === 'string' ? className.split(/\s+/).filter(Boolean) : [];
|
|
154
175
|
classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));
|
|
155
176
|
next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));
|
|
@@ -157,6 +178,19 @@ function useHostProps(bag) {
|
|
|
157
178
|
applied = applyPropBag(renderer, element, applied, rest);
|
|
158
179
|
});
|
|
159
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* Host transparency for a compiled template whose role lives on an inner
|
|
183
|
+
* `mp-attrs` node (#458): a consumer's `aria-*`, `id` and `tabindex` on the
|
|
184
|
+
* host belong on that node, which binds the result as `[mpHostAttrs]`. `id`
|
|
185
|
+
* and `tabindex` are moved (no duplicate id, no dead tab stop on the host);
|
|
186
|
+
* `aria-*` are copied. Read once, in a field initializer, so the server render
|
|
187
|
+
* already carries them where AT reads them. A consumer `role` is never taken:
|
|
188
|
+
* the inner node's role is the core's contract.
|
|
189
|
+
*/
|
|
190
|
+
function useHostAttrs() {
|
|
191
|
+
const host = inject(ElementRef).nativeElement;
|
|
192
|
+
return { host, attrs: takeHostAria(host) };
|
|
193
|
+
}
|
|
160
194
|
|
|
161
195
|
const MACHINE_SSR_OPTIONS = new InjectionToken('mp-machine-ssr-options', {
|
|
162
196
|
factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),
|
|
@@ -186,11 +220,13 @@ function provideCoreContext(context, component) {
|
|
|
186
220
|
* where `hostBag` is given, else the host's first element child.
|
|
187
221
|
*/
|
|
188
222
|
function useCore(core, options) {
|
|
189
|
-
const
|
|
223
|
+
const host = inject(ElementRef).nativeElement;
|
|
224
|
+
const element = () => (options.element ? options.element() : host);
|
|
190
225
|
const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;
|
|
191
226
|
const id = inject(BsIdService).next(options.idPrefix);
|
|
192
227
|
// Read once: a host attribute is static content, and Angular does not observe it.
|
|
193
|
-
|
|
228
|
+
let label;
|
|
229
|
+
const readLabel = () => (label === undefined ? (label = element()?.getAttribute('aria-label') ?? null) : label);
|
|
194
230
|
const hydrated = signal(false, /* @ts-ignore */
|
|
195
231
|
...(ngDevMode ? [{ debugName: "hydrated" }] : /* istanbul ignore next */ []));
|
|
196
232
|
// The state is seeded at its first read, in the first change detection: the
|
|
@@ -255,7 +291,7 @@ function useCore(core, options) {
|
|
|
255
291
|
id,
|
|
256
292
|
hydrated: hydrated(),
|
|
257
293
|
context: (consumed ? consumed() : core.consume?.defaultValue),
|
|
258
|
-
label,
|
|
294
|
+
label: readLabel(),
|
|
259
295
|
api: () => runtime.api,
|
|
260
296
|
}), /* @ts-ignore */
|
|
261
297
|
...(ngDevMode ? [{ debugName: "args" }] : /* istanbul ignore next */ []));
|
|
@@ -263,9 +299,9 @@ function useCore(core, options) {
|
|
|
263
299
|
...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
|
|
264
300
|
const provided = computed(() => core.provide?.(args()), /* @ts-ignore */
|
|
265
301
|
...(ngDevMode ? [{ debugName: "provided" }] : /* istanbul ignore next */ []));
|
|
266
|
-
const hostBag = options.hostBag ?? core.host?.bind(core);
|
|
302
|
+
const hostBag = options.hostBag ?? scopedHost(core.host?.bind(core), options.hostScope);
|
|
267
303
|
if (hostBag)
|
|
268
|
-
useHostProps(() => hostBag(props()));
|
|
304
|
+
useHostProps(() => hostBag(props()), options.element);
|
|
269
305
|
const runtime = coreRuntime(core, {
|
|
270
306
|
inputs: () => untracked(options.inputs),
|
|
271
307
|
state: () => untracked(state),
|
|
@@ -276,7 +312,7 @@ function useCore(core, options) {
|
|
|
276
312
|
});
|
|
277
313
|
afterNextRender(() => {
|
|
278
314
|
hydrated.set(true);
|
|
279
|
-
const root = options.
|
|
315
|
+
const root = options.element ? element() : options.hostBag ? host : host.firstElementChild;
|
|
280
316
|
if (root)
|
|
281
317
|
runtime.attachTo(root);
|
|
282
318
|
});
|
|
@@ -369,9 +405,156 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
369
405
|
args: [{ name: 'mpTrustedHtml' }]
|
|
370
406
|
}] });
|
|
371
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Render an `<ng-template>` into a body host (#458 §4.4): a `div` appended to
|
|
410
|
+
* the end of `<body>`, outside every clipping ancestor. The compiled form of a
|
|
411
|
+
* view's `<teleport to="body">`, and the twin of React's `createPortal`, Vue's
|
|
412
|
+
* `<Teleport to="body">` and Lit's `bodyTeleport()`.
|
|
413
|
+
*
|
|
414
|
+
* The view is created DETACHED (`TemplateRef.createEmbeddedView` +
|
|
415
|
+
* `ApplicationRef.attachView`), never in this anchor's container, so the
|
|
416
|
+
* component's hydration info holds no view whose nodes are elsewhere. The
|
|
417
|
+
* server renders it into its body host; the client removes that copy (same
|
|
418
|
+
* deterministic id) and renders its own, outside hydration. Change detection
|
|
419
|
+
* reaches it through the application; it reads the declaring component's
|
|
420
|
+
* members, because an embedded view keeps its declaration context.
|
|
421
|
+
*
|
|
422
|
+
* @if (open()) { <ng-template mpBodyTeleport>…</ng-template> }
|
|
423
|
+
*/
|
|
424
|
+
class MpBodyTeleportDirective {
|
|
425
|
+
constructor() {
|
|
426
|
+
this.template = inject(TemplateRef);
|
|
427
|
+
this.appRef = inject(ApplicationRef);
|
|
428
|
+
this.document = inject(DOCUMENT);
|
|
429
|
+
this.anchor = inject(ViewContainerRef).element.nativeElement;
|
|
430
|
+
/** Identical on the server and on hydration: the client replaces the server's host by it. */
|
|
431
|
+
this.id = inject(BsIdService).next('mp-overlay');
|
|
432
|
+
this.view = null;
|
|
433
|
+
this.host = null;
|
|
434
|
+
// An effect runs during change detection on the server too, where afterNextRender never does.
|
|
435
|
+
effect(() => untracked(() => {
|
|
436
|
+
if (this.view)
|
|
437
|
+
return;
|
|
438
|
+
this.host = createBodyHost(this.document, this.id, this.anchor.parentElement);
|
|
439
|
+
this.view = this.template.createEmbeddedView({});
|
|
440
|
+
this.appRef.attachView(this.view);
|
|
441
|
+
this.view.detectChanges();
|
|
442
|
+
this.view.rootNodes.forEach((node) => this.host.appendChild(node));
|
|
443
|
+
}));
|
|
444
|
+
inject(DestroyRef).onDestroy(() => {
|
|
445
|
+
if (this.view) {
|
|
446
|
+
this.appRef.detachView(this.view);
|
|
447
|
+
this.view.destroy();
|
|
448
|
+
}
|
|
449
|
+
this.host?.remove();
|
|
450
|
+
this.view = this.host = null;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpBodyTeleportDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
454
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: MpBodyTeleportDirective, isStandalone: true, selector: "[mpBodyTeleport]", ngImport: i0 }); }
|
|
455
|
+
}
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpBodyTeleportDirective, decorators: [{
|
|
457
|
+
type: Directive,
|
|
458
|
+
args: [{ selector: '[mpBodyTeleport]' }]
|
|
459
|
+
}], ctorParameters: () => [] });
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* A compiled template's `<instance-style :name :css />` (#458 M4): one instance's own
|
|
463
|
+
* sheet, the tile manager's server layout rules. Angular strips `<style>` from
|
|
464
|
+
* templates, so the sheet goes into the document head under `name`, on the server
|
|
465
|
+
* (where it ships in the HTML) and on the client alike. A null `css` removes it, as
|
|
466
|
+
* does destroying the component.
|
|
467
|
+
*/
|
|
468
|
+
class MpInstanceStyleDirective {
|
|
469
|
+
constructor() {
|
|
470
|
+
this.mpInstanceStyle = input(null, /* @ts-ignore */
|
|
471
|
+
...(ngDevMode ? [{ debugName: "mpInstanceStyle" }] : /* istanbul ignore next */ []));
|
|
472
|
+
this.mpInstanceStyleName = input.required(/* @ts-ignore */
|
|
473
|
+
...(ngDevMode ? [{ debugName: "mpInstanceStyleName" }] : /* istanbul ignore next */ []));
|
|
474
|
+
const doc = inject(DOCUMENT$1);
|
|
475
|
+
let written = null;
|
|
476
|
+
const remove = () => {
|
|
477
|
+
if (written !== null)
|
|
478
|
+
doc.head?.querySelector(`style[${SCOPED_STYLE_MARKER}="${written}"]`)?.remove();
|
|
479
|
+
written = null;
|
|
480
|
+
};
|
|
481
|
+
effect(() => {
|
|
482
|
+
const css = this.mpInstanceStyle();
|
|
483
|
+
const name = this.mpInstanceStyleName();
|
|
484
|
+
if (written !== name)
|
|
485
|
+
remove();
|
|
486
|
+
if (!css)
|
|
487
|
+
return remove();
|
|
488
|
+
writeScopedStyleTag(doc, name, css, { replace: true });
|
|
489
|
+
written = name;
|
|
490
|
+
});
|
|
491
|
+
inject(DestroyRef).onDestroy(remove);
|
|
492
|
+
}
|
|
493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpInstanceStyleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
494
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: MpInstanceStyleDirective, isStandalone: true, selector: "ng-container[mpInstanceStyle]", inputs: { mpInstanceStyle: { classPropertyName: "mpInstanceStyle", publicName: "mpInstanceStyle", isSignal: true, isRequired: false, transformFunction: null }, mpInstanceStyleName: { classPropertyName: "mpInstanceStyleName", publicName: "mpInstanceStyleName", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
495
|
+
}
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MpInstanceStyleDirective, decorators: [{
|
|
497
|
+
type: Directive,
|
|
498
|
+
args: [{ selector: 'ng-container[mpInstanceStyle]' }]
|
|
499
|
+
}], ctorParameters: () => [], propDecorators: { mpInstanceStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpInstanceStyle", required: false }] }], mpInstanceStyleName: [{ type: i0.Input, args: [{ isSignal: true, alias: "mpInstanceStyleName", required: true }] }] } });
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* A structural directive's anchor: the element its template sits in
|
|
503
|
+
* (`<button>Save<span *bsTooltip>…</span></button>` → the button). The
|
|
504
|
+
* directive's own node is a comment; read this lazily, once the view placed it.
|
|
505
|
+
*/
|
|
506
|
+
function anchorElement() {
|
|
507
|
+
const node = inject(ElementRef).nativeElement;
|
|
508
|
+
return () => node.parentElement;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* The Angular half of an overlay directive (#458 M6, tooltip and popover): while
|
|
512
|
+
* `inputs()` is not null, `component` renders into a body host with the
|
|
513
|
+
* directive's template as its content (`<ng-content>`), and gets those inputs.
|
|
514
|
+
* The panel is created detached and attached to the application, so it lives
|
|
515
|
+
* outside every clipping ancestor and the anchor's DOM stays the consumer's.
|
|
516
|
+
* Browser only: an overlay cannot be open in server HTML.
|
|
517
|
+
*/
|
|
518
|
+
function useOverlayComponent(component, inputs, anchor) {
|
|
519
|
+
const template = inject(TemplateRef);
|
|
520
|
+
const injector = inject(Injector);
|
|
521
|
+
const environmentInjector = inject(EnvironmentInjector);
|
|
522
|
+
const appRef = inject(ApplicationRef);
|
|
523
|
+
const doc = inject(DOCUMENT);
|
|
524
|
+
const id = `mp-overlay-${inject(BsIdService).next('bs-overlay')}`;
|
|
525
|
+
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
526
|
+
return;
|
|
527
|
+
let panel = null;
|
|
528
|
+
let content = null;
|
|
529
|
+
const close = () => {
|
|
530
|
+
panel?.destroy();
|
|
531
|
+
content?.destroy();
|
|
532
|
+
panel = content = null;
|
|
533
|
+
removeBodyHost(doc, id);
|
|
534
|
+
};
|
|
535
|
+
effect(() => {
|
|
536
|
+
const next = inputs();
|
|
537
|
+
untracked(() => {
|
|
538
|
+
if (!next)
|
|
539
|
+
return close();
|
|
540
|
+
if (!panel) {
|
|
541
|
+
content = template.createEmbeddedView(null, injector);
|
|
542
|
+
appRef.attachView(content);
|
|
543
|
+
panel = createComponent(component, { environmentInjector, elementInjector: injector, projectableNodes: [content.rootNodes] });
|
|
544
|
+
Object.entries(next).map(([name, value]) => panel?.setInput(name, value));
|
|
545
|
+
createBodyHost(doc, id, anchor()).appendChild(panel.location.nativeElement);
|
|
546
|
+
appRef.attachView(panel.hostView);
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
Object.entries(next).map(([name, value]) => panel?.setInput(name, value));
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
inject(DestroyRef).onDestroy(close);
|
|
553
|
+
}
|
|
554
|
+
|
|
372
555
|
/**
|
|
373
556
|
* Generated bundle index. Do not edit.
|
|
374
557
|
*/
|
|
375
558
|
|
|
376
|
-
export { MACHINE_SSR_OPTIONS, MpPropsDirective, MpTeleportDirective, MpTrustedHtmlPipe, applyPropBag, coreContextToken, machineSignal, provideCoreContext, provideMachineSsr, repairEventReplayBodyPaths, useBootstrap, useCore, useHostProps, useScopedStyles };
|
|
559
|
+
export { MACHINE_SSR_OPTIONS, MpBodyTeleportDirective, MpInstanceStyleDirective, MpPropsDirective, MpTeleportDirective, MpTrustedHtmlPipe, anchorElement, applyPropBag, coreContextToken, machineSignal, provideCoreContext, provideMachineSsr, repairEventReplayBodyPaths, useBootstrap, useCore, useHostAttrs, useHostProps, useOverlayComponent, useScopedStyles };
|
|
377
560
|
//# sourceMappingURL=mintplayer-ng-bootstrap-machine.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/host-props.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/ssr.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/core.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/trusted-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => (this.applied = applyPropBag(this.renderer, this.element, this.applied, this.mpProps() ?? {})));\n }\n}\n\n/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */\nexport function applyPropBag(renderer: Renderer2, element: Element, previous: PropBag, next: PropBag): PropBag {\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => renderer.removeAttribute(element, name));\n Object.entries(next)\n .filter(([, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => renderer.setAttribute(element, name, value === true ? '' : String(value)));\n return next;\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { bootstrapInstallOptions, type BootstrapPart } from '@mintplayer/ui-core/bootstrap';\nimport { installLightStyles, writeScopedStyleTag, type InstallOptions } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * In the browser it also repairs the event-replay body shift (below) — every\n * front calls this first thing, so the repair runs before any front's\n * projected children are hydrated.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string, options: InstallOptions = {}): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText, options);\n } else {\n repairEventReplayBodyPaths(inject(DOCUMENT));\n installLightStyles(key, cssText, options);\n }\n}\n\n/**\n * Install Bootstrap parts (`@mintplayer/ui-core/bootstrap`, #452) from an\n * Angular front, the same way as {@link useScopedStyles}: once per page, and\n * written into the server `DOCUMENT` during SSR. A component passes the scoped\n * parts its markup uses; a page that renders raw Bootstrap markup passes the\n * `…Page` variants, which replace a scoped copy under the same key. Call from\n * the constructor (an injection context).\n */\nexport function useBootstrap(...parts: readonly BootstrapPart[]): void {\n parts.forEach((part) => useScopedStyles(part.key, part.css, bootstrapInstallOptions(part)));\n}\n\n/**\n * Angular SSR defect (platform-server 22): `_annotateForHydration` records the\n * hydration paths, and only THEN `insertEventRecordScript` adds the replay\n * `<script>` right after `#ng-event-dispatch-contract` in `<body>`. A node\n * whose path is body-relative — any projected node a front renders outside\n * its own host (an accordion tab's body inside the accordion's `<details>`, a\n * tab page's body inside the tab control's panel) — is then looked up one\n * sibling off, and hydration throws \"Cannot read properties of null\n * (reading 'nextSibling')\". The replay script has already run by the time any\n * component is constructed, so removing its element restores the body the\n * paths were computed against. Idempotent; a no-op without event replay.\n */\nexport function repairEventReplayBodyPaths(doc: Document): void {\n const replay = doc.getElementById('ng-event-dispatch-contract')?.nextSibling;\n if (replay instanceof HTMLScriptElement && replay.textContent?.startsWith('window.__jsaction_bootstrap(')) replay.remove();\n}\n","import { effect, ElementRef, inject, Renderer2 } from '@angular/core';\nimport { applyPropBag, type PropBag } from './props.directive';\n\n/**\n * Apply a core's attribute bag to the component's own host element: the host\n * twin of `[mpProps]`, for a compiled template whose root is marked `mp-host`\n * (the root element IS the host, so the template holds only its children).\n *\n * Diffs like `[mpProps]` and writes through `Renderer2`, so the attributes are\n * in the server-rendered HTML. `class` is merged token by token, never\n * written as an attribute: the consumer's own classes on the host survive.\n *\n * constructor() { useHostProps(() => this.view().root); }\n */\nexport function useHostProps(bag: () => PropBag | null | undefined): void {\n const element = inject(ElementRef).nativeElement as Element;\n const renderer = inject(Renderer2);\n let applied: PropBag = {};\n let classes: string[] = [];\n effect(() => {\n const { class: className, ...rest } = bag() ?? {};\n const next = typeof className === 'string' ? className.split(/\\s+/).filter(Boolean) : [];\n classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));\n next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));\n classes = next;\n applied = applyPropBag(renderer, element, applied, rest);\n });\n}\n","import { InjectionToken, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { DEFAULT_PREFETCH_TIMEOUT } from '@mintplayer/ui-core/transfer-state';\n\nexport interface MachineSsrOptions {\n /**\n * How long a server render waits for one component's prefetch (a `[fetch]`\n * datatable's first page with a `stateKey`), ms. On expiry the component\n * renders its loading state and the browser fetches. Default 3000 (#448 D6).\n */\n readonly prefetchTimeout?: number;\n}\n\nexport const MACHINE_SSR_OPTIONS = new InjectionToken<MachineSsrOptions>('mp-machine-ssr-options', {\n factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),\n});\n\n/** App-level settings for components that load data during a server render. */\nexport function provideMachineSsr(options: MachineSsrOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: MACHINE_SSR_OPTIONS, useValue: { prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT, ...options } }]);\n}\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n makeStateKey,\n PendingTasks,\n PLATFORM_ID,\n signal,\n TransferState,\n untracked,\n type Provider,\n type Signal,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreRuntime, type ComponentCore, type CoreBag, type CoreContext, type ViewArgs } from '@mintplayer/ui-core/component';\nimport { runPrefetch } from '@mintplayer/ui-core/transfer-state';\nimport { useHostProps } from './host-props';\nimport { MACHINE_SSR_OPTIONS } from './ssr';\n\nconst tokens = new WeakMap<CoreContext<unknown>, InjectionToken<Signal<unknown>>>();\n\n/** The Angular token for a core context: one per context object. */\nexport function coreContextToken<T>(context: CoreContext<T>): InjectionToken<Signal<T>> {\n let token = tokens.get(context as CoreContext<unknown>);\n if (!token) {\n token = new InjectionToken<Signal<unknown>>(`mp-core-context:${context.name}`);\n tokens.set(context as CoreContext<unknown>, token);\n }\n return token as InjectionToken<Signal<T>>;\n}\n\n/** Provides `context` to the component's content, read from the component's `useCore().provided`. */\nexport function provideCoreContext<T>(context: CoreContext<T>, component: Type<{ readonly provided: Signal<T> }>): Provider {\n return { provide: coreContextToken(context), useFactory: () => inject(component).provided };\n}\n\nexport interface UseCoreOptions<I, P> {\n readonly inputs: () => I;\n /** Prefix of the deterministic id, e.g. `bs-navbar`. */\n readonly idPrefix: string;\n /** The outputs by name; `api.emit` calls their `emit`. */\n readonly outputs?: Readonly<Record<string, { emit(detail: never): void }>>;\n /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */\n readonly hostBag?: (props: P) => CoreBag | null | undefined;\n /** Two-way inputs (`model()`), by name; written back when the core changes the state of the same name. */\n readonly models?: Readonly<Record<string, { set(value: never): void }>>;\n}\n\nexport interface CoreHandle<P, PC> {\n /** The template's props. */\n readonly props: Signal<P>;\n /** The value this component provides to its content. */\n readonly provided: Signal<PC>;\n /** Runs a core method; does nothing before the first client render. */\n call(name: string, args: unknown[]): unknown;\n}\n\n/**\n * Host a `ComponentCore` in a generated Angular component (PRD #437 D10).\n * Call it in a field initializer. The template's root is the host element\n * where `hostBag` is given, else the host's first element child.\n */\nexport function useCore<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: UseCoreOptions<I, P>): CoreHandle<P, PC> {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;\n const id = inject(BsIdService).next(options.idPrefix);\n // Read once: a host attribute is static content, and Angular does not observe it.\n const label = element.getAttribute('aria-label');\n const hydrated = signal(false);\n // The state is seeded at its first read, in the first change detection: the\n // template's bindings have set the inputs by then. In the constructor they\n // have not, and the server would render a bound model input's default.\n const written = signal<S | null>(null);\n const server = isPlatformServer(inject(PLATFORM_ID));\n const transfer = core.transferKey ? inject(TransferState) : null;\n /** Server only: starts the prefetch with the first inputs that name one (a `transferKey`), however late they arrive. */\n let prefetchOnce: ((inputs: I) => void) | null = null;\n /** Client only: the transferred seed is still unread, because no inputs have named its key yet. */\n let transferArmed = !server && !!transfer;\n let seeded: S | null = null;\n const seed = (): S => {\n if (seeded) return seeded;\n const inputs = untracked(options.inputs);\n // The baseline the state was seeded from: inputs that change before attaching\n // (a form control writing its value) reach inputsChanged on attach.\n runtime.inputs(inputs);\n return (seeded = core.state ? core.state(inputs, server ? undefined : takeTransferred(inputs)) : ({} as S));\n };\n /**\n * The server's prefetched seed for these inputs, read once: a later instance with the same query fetches fresh (#448).\n * Inputs without a key (a `fetch` the consumer sets after an async step) leave it armed for the next delivery.\n */\n const takeTransferred = (inputs: I): unknown => {\n const key = transferArmed && transfer ? core.transferKey?.(inputs) : undefined;\n if (!transfer || !key) return undefined;\n transferArmed = false;\n const stateKey = makeStateKey<unknown>(key);\n if (!transfer.hasKey(stateKey)) return undefined;\n const value = transfer.get(stateKey, undefined);\n transfer.remove(stateKey);\n return value;\n };\n if (server && transfer && core.prefetch) {\n // Outside the state computed, which must not write signals: the first change\n // detection seeds the loading snapshot, this replaces it before serialization.\n const pendingTasks = inject(PendingTasks);\n const ssr = inject(MACHINE_SSR_OPTIONS);\n const abort = new AbortController();\n inject(DestroyRef).onDestroy(() => abort.abort());\n prefetchOnce = (inputs) => {\n void pendingTasks.run(async () => {\n const result = await runPrefetch(core, inputs, { timeout: ssr.prefetchTimeout, signal: abort.signal });\n if (!result || abort.signal.aborted) return;\n transfer.set(makeStateKey<unknown>(result.key), result.seed);\n written.set(core.state!(inputs, result.seed));\n });\n };\n }\n const state = computed(() => written() ?? seed());\n\n const args = computed<ViewArgs<I, S, C, E>>(() => ({\n inputs: options.inputs(),\n state: state(),\n id,\n hydrated: hydrated(),\n context: (consumed ? consumed() : core.consume?.defaultValue) as C,\n label,\n api: () => runtime.api,\n }));\n const props = computed(() => core.view(args()));\n const provided = computed(() => core.provide?.(args()) as PC);\n\n const hostBag = options.hostBag ?? core.host?.bind(core);\n if (hostBag) useHostProps(() => hostBag(props()));\n\n const runtime = coreRuntime(core, {\n inputs: () => untracked(options.inputs),\n state: () => untracked(state),\n setState: (next) => written.set(next),\n emit: (name, detail) => options.outputs?.[name]?.emit(detail as never),\n models: Object.keys(options.models ?? {}) as never,\n writeModel: (name, value) => options.models?.[name]?.set(value as never),\n });\n afterNextRender(() => {\n hydrated.set(true);\n const root = options.hostBag ? element : (element.firstElementChild as HTMLElement | null);\n if (root) runtime.attachTo(root);\n });\n effect(() => {\n const inputs = options.inputs();\n untracked(() => {\n // A seed whose key the first inputs did not name: applied before the inputs reach the core,\n // so its inputsChanged sees the seeded page as the answer rather than reloading it.\n if (transferArmed && core.adopt) {\n const late = takeTransferred(inputs);\n if (late !== undefined) written.set(core.adopt(state(), inputs, late));\n }\n runtime.inputs(inputs);\n // Armed until the inputs name a prefetch: a `fetch` or `stateKey` can arrive after the first delivery.\n if (prefetchOnce && core.transferKey?.(inputs)) {\n const start = prefetchOnce;\n prefetchOnce = null;\n start(inputs);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => runtime.dispose());\n\n return { props, provided, call: (name, callArgs) => runtime.call(name, callArgs) };\n}\n","import { DestroyRef, Directive, effect, EmbeddedViewRef, inject, input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * Render an `<ng-template>` into another element, the compiled form of a view's\n * `<teleport :to>`. The twin of React's `createPortal`, Vue's `<Teleport>` and\n * Lit's `teleport()`. The view lives in this container, so change detection and\n * destruction follow the component, but its root nodes are moved into `to`, as\n * CDK's DomPortalOutlet does. Nothing renders while `to` is null, which is the\n * server's case. A core hands a target whose identity never changes (the\n * dock's per-pane hosts), so the content's state survives wherever the core\n * moves that target.\n *\n * <ng-template [mpTeleport]=\"view.paneHosts[pane]\">...</ng-template>\n */\n@Directive({ selector: '[mpTeleport]' })\nexport class MpTeleportDirective {\n readonly mpTeleport = input<Element | null | undefined>(null);\n\n private readonly template = inject(TemplateRef);\n private readonly container = inject(ViewContainerRef);\n private view: EmbeddedViewRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const to = this.mpTeleport() ?? null;\n if (!to) {\n this.container.clear();\n this.view = null;\n return;\n }\n this.view ??= this.container.createEmbeddedView(this.template);\n // The view's nodes render in place first; detectChanges fills them before they move.\n this.view.detectChanges();\n this.view.rootNodes.filter((node: Node) => node.parentNode !== to).forEach((node: Node) => to.appendChild(node));\n });\n inject(DestroyRef).onDestroy(() => this.container.clear());\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Marks core-produced markup as trusted for `[innerHTML]`: the compiled form of\n * a view's `v-html`. The view contract is that `v-html` only ever carries markup\n * the core produced (flag and file-type SVGs, highlighted code rows), which the\n * React, Vue and Lit fronts insert as-is. Angular's sanitiser would instead drop\n * every `<svg>` — an empty flag, an icon-less file manager — so the Angular front\n * trusts it the same way.\n *\n * <span [innerHTML]=\"view.flagHtml | mpTrustedHtml\"></span>\n */\n@Pipe({ name: 'mpTrustedHtml' })\nexport class MpTrustedHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n transform(html: string | null | undefined): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html ?? '');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,G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A,SAAS,CAAC,IAA+B,EAAA;QACvC,OAAO,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3D;8GALW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,IAAI;mBAAC,EAAE,IAAI,EAAE,eAAe,EAAE;;;ACb/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-machine.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/machine/src/machine-signal.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/props.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/scoped-styles.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/host-props.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/ssr.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/core.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/trusted-html.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/body-teleport.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/instance-style.directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/src/overlay-directive.ts","../../../../libs/mintplayer-ng-bootstrap/machine/mintplayer-ng-bootstrap-machine.ts"],"sourcesContent":["import { DestroyRef, inject, Signal, signal } from '@angular/core';\nimport type { Store } from '@mintplayer/ui-core/store';\n\n/**\n * Bridge a `@mintplayer/ui-core` store into Angular's reactivity: a read-only\n * `Signal` of the store's snapshot, kept current by `subscribe` and released on\n * the injection context's `DestroyRef`.\n *\n * The signal is set synchronously from the store's notification; Angular\n * coalesces the resulting change detection, so a command that commits one\n * snapshot costs one render (measured in `machine-signal.spec.ts`, spike S1).\n */\nexport function machineSignal<S extends object>(store: Store<S>, destroyRef: DestroyRef = inject(DestroyRef)): Signal<S> {\n const state = signal<S>(store.snapshot);\n const unsubscribe = store.subscribe((snapshot) => state.set(snapshot));\n destroyRef.onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';\n\n/** An attribute bag as a core's `connect()` returns it. `null`/`undefined`/`false` remove the attribute; `true` sets it empty. */\nexport type PropBag = Record<string, string | number | boolean | null | undefined>;\n\n/**\n * Attribute names a bag may never set. A bag is data the core computed, but a\n * generic setter is still an injection sink, so URL-bearing and script-bearing\n * attributes are refused outright rather than sanitised.\n */\nconst REFUSED = new Set(['href', 'src', 'srcdoc', 'xlink:href', 'style', 'action', 'formaction', 'data']);\n\nfunction isRefused(name: string): boolean {\n return REFUSED.has(name) || name.startsWith('on');\n}\n\n/**\n * Apply a core's attribute bag to the host element — the Angular stand-in for\n * JSX/Lit/Vue attribute spread. The directive diffs the previous and next bag:\n * a key that disappears is *removed* from the DOM (a stale\n * `aria-activedescendant` would otherwise survive a close), and unchanged keys\n * are not rewritten.\n *\n * Attributes are written through `Renderer2`, so they land in the server-\n * rendered HTML and are re-applied identically after hydration (spike S2 in\n * docs/prd/typeahead-wc-436.md). Consumers never see a bag: the front's own\n * template binds `[mpProps]=\"api().input\"` on its own nodes.\n */\n@Directive({ selector: '[mpProps],[mpHostAttrs]' })\nexport class MpPropsDirective {\n readonly mpProps = input<PropBag | null | undefined>(null);\n /**\n * The host's forwarded `aria-*` / `id` / `tabindex` (`useHostAttrs`), written over\n * the bag: the consumer's word wins. Except an `id` the bag sets itself, which\n * the core's own references (a `label for`, an `aria-controls`) point at: then\n * the consumer's id goes back to the host instead.\n */\n readonly mpHostAttrs = input<{ readonly host: Element; readonly attrs: PropBag } | null | undefined>(null);\n\n private readonly element = inject(ElementRef).nativeElement as Element;\n private readonly renderer = inject(Renderer2);\n private applied: PropBag = {};\n\n constructor() {\n effect(() => {\n const bag = this.mpProps() ?? {};\n const forwarded = this.mpHostAttrs();\n const { id, ...rest } = forwarded?.attrs ?? {};\n const ownId = bag['id'] !== null && bag['id'] !== undefined;\n if (forwarded && ownId && id) this.renderer.setAttribute(forwarded.host, 'id', String(id));\n this.applied = applyPropBag(this.renderer, this.element, this.applied, { ...bag, ...rest, ...(id && !ownId ? { id } : {}) });\n });\n }\n}\n\n/** Write `next` onto `element`, removing what `previous` set and `next` drops. Returns `next`. */\nexport function applyPropBag(renderer: Renderer2, element: Element, previous: PropBag, next: PropBag): PropBag {\n Object.keys(previous)\n .filter((name) => !(name in next) || next[name] === null || next[name] === undefined || next[name] === false)\n .forEach((name) => renderer.removeAttribute(element, name));\n Object.entries(next)\n .filter(([, value]) => value !== null && value !== undefined && value !== false)\n .filter(([name]) => {\n if (isRefused(name)) {\n throw new Error(`[mpProps] refuses to set \"${name}\"; bind it explicitly in the template.`);\n }\n return true;\n })\n .filter(([name, value]) => !Object.is(previous[name], value))\n .forEach(([name, value]) => renderer.setAttribute(element, name, value === true ? '' : String(value)));\n return next;\n}\n","import { DOCUMENT, inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { bootstrapInstallOptions, type BootstrapPart } from '@mintplayer/ui-core/bootstrap';\nimport { installLightStyles, writeScopedStyleTag, type InstallOptions } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * Install a core's scoped stylesheet from an Angular front. In the browser it\n * goes through the shared registry (`installLightStyles`: once per key,\n * cross-bundle safe). On the server the registry cannot run, so the marker\n * `<style data-mp-light-styles=\"<key>\">` is written straight into the\n * request's `DOCUMENT` head — the client registry then treats it as already\n * installed. No string post-processing of the response is involved.\n *\n * In the browser it also repairs the event-replay body shift (below) — every\n * front calls this first thing, so the repair runs before any front's\n * projected children are hydrated.\n *\n * Call from the component's constructor (an injection context).\n */\nexport function useScopedStyles(key: string, cssText: string, options: InstallOptions = {}): void {\n if (isPlatformServer(inject(PLATFORM_ID))) {\n writeScopedStyleTag(inject(DOCUMENT), key, cssText, options);\n } else {\n repairEventReplayBodyPaths(inject(DOCUMENT));\n installLightStyles(key, cssText, options);\n }\n}\n\n/**\n * Install Bootstrap parts (`@mintplayer/ui-core/bootstrap`, #452) from an\n * Angular front, the same way as {@link useScopedStyles}: once per page, and\n * written into the server `DOCUMENT` during SSR. A component passes the scoped\n * parts its markup uses; a page that renders raw Bootstrap markup passes the\n * `…Page` variants, which replace a scoped copy under the same key. Call from\n * the constructor (an injection context).\n */\nexport function useBootstrap(...parts: readonly BootstrapPart[]): void {\n parts.forEach((part) => useScopedStyles(part.key, part.css, bootstrapInstallOptions(part)));\n}\n\n/**\n * Angular SSR defect (platform-server 22): `_annotateForHydration` records the\n * hydration paths, and only THEN `insertEventRecordScript` adds the replay\n * `<script>` right after `#ng-event-dispatch-contract` in `<body>`. A node\n * whose path is body-relative — any projected node a front renders outside\n * its own host (an accordion tab's body inside the accordion's `<details>`, a\n * tab page's body inside the tab control's panel) — is then looked up one\n * sibling off, and hydration throws \"Cannot read properties of null\n * (reading 'nextSibling')\". The replay script has already run by the time any\n * component is constructed, so removing its element restores the body the\n * paths were computed against. Idempotent; a no-op without event replay.\n */\nexport function repairEventReplayBodyPaths(doc: Document): void {\n const replay = doc.getElementById('ng-event-dispatch-contract')?.nextSibling;\n if (replay instanceof HTMLScriptElement && replay.textContent?.startsWith('window.__jsaction_bootstrap(')) replay.remove();\n}\n","import { effect, ElementRef, inject, Renderer2 } from '@angular/core';\nimport { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { applyPropBag, type PropBag } from './props.directive';\n\n/**\n * Apply a core's attribute bag to the component's own host element: the host\n * twin of `[mpProps]`, for a compiled template whose root is marked `mp-host`\n * (the root element IS the host, so the template holds only its children).\n *\n * Diffs like `[mpProps]` and writes through `Renderer2`, so the attributes are\n * in the server-rendered HTML. `class` is merged token by token, never\n * written as an attribute: the consumer's own classes on the host survive.\n *\n * constructor() { useHostProps(() => this.view().root); }\n */\nexport function useHostProps(bag: () => PropBag | null | undefined, target?: () => Element | null): void {\n const host = inject(ElementRef).nativeElement as Element;\n const renderer = inject(Renderer2);\n let applied: PropBag = {};\n let classes: string[] = [];\n effect(() => {\n // `target`: another element than the host (a structural directive's anchor), not placed yet in the constructor.\n const element = target ? target() : host;\n const { class: className, ...rest } = bag() ?? {};\n if (!element) return;\n const next = typeof className === 'string' ? className.split(/\\s+/).filter(Boolean) : [];\n classes.filter((name) => !next.includes(name)).forEach((name) => renderer.removeClass(element, name));\n next.filter((name) => !classes.includes(name)).forEach((name) => renderer.addClass(element, name));\n classes = next;\n applied = applyPropBag(renderer, element, applied, rest);\n });\n}\n\n/** A host's forwarded attributes (`useHostAttrs`), and the host they came from. */\nexport interface HostAttrs {\n readonly host: HTMLElement;\n readonly attrs: PropBag;\n}\n\n/**\n * Host transparency for a compiled template whose role lives on an inner\n * `mp-attrs` node (#458): a consumer's `aria-*`, `id` and `tabindex` on the\n * host belong on that node, which binds the result as `[mpHostAttrs]`. `id`\n * and `tabindex` are moved (no duplicate id, no dead tab stop on the host);\n * `aria-*` are copied. Read once, in a field initializer, so the server render\n * already carries them where AT reads them. A consumer `role` is never taken:\n * the inner node's role is the core's contract.\n */\nexport function useHostAttrs(): HostAttrs {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n return { host, attrs: takeHostAria(host) };\n}\n","import { InjectionToken, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { DEFAULT_PREFETCH_TIMEOUT } from '@mintplayer/ui-core/transfer-state';\n\nexport interface MachineSsrOptions {\n /**\n * How long a server render waits for one component's prefetch (a `[fetch]`\n * datatable's first page with a `stateKey`), ms. On expiry the component\n * renders its loading state and the browser fetches. Default 3000 (#448 D6).\n */\n readonly prefetchTimeout?: number;\n}\n\nexport const MACHINE_SSR_OPTIONS = new InjectionToken<MachineSsrOptions>('mp-machine-ssr-options', {\n factory: () => ({ prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT }),\n});\n\n/** App-level settings for components that load data during a server render. */\nexport function provideMachineSsr(options: MachineSsrOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: MACHINE_SSR_OPTIONS, useValue: { prefetchTimeout: DEFAULT_PREFETCH_TIMEOUT, ...options } }]);\n}\n","import {\n afterNextRender,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n makeStateKey,\n PendingTasks,\n PLATFORM_ID,\n signal,\n TransferState,\n untracked,\n type Provider,\n type Signal,\n type Type,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { coreRuntime, scopedHost, type ComponentCore, type CoreBag, type CoreContext, type ViewArgs } from '@mintplayer/ui-core/component';\nimport { runPrefetch } from '@mintplayer/ui-core/transfer-state';\nimport { useHostProps } from './host-props';\nimport { MACHINE_SSR_OPTIONS } from './ssr';\n\nconst tokens = new WeakMap<CoreContext<unknown>, InjectionToken<Signal<unknown>>>();\n\n/** The Angular token for a core context: one per context object. */\nexport function coreContextToken<T>(context: CoreContext<T>): InjectionToken<Signal<T>> {\n let token = tokens.get(context as CoreContext<unknown>);\n if (!token) {\n token = new InjectionToken<Signal<unknown>>(`mp-core-context:${context.name}`);\n tokens.set(context as CoreContext<unknown>, token);\n }\n return token as InjectionToken<Signal<T>>;\n}\n\n/** Provides `context` to the component's content, read from the component's `useCore().provided`. */\nexport function provideCoreContext<T>(context: CoreContext<T>, component: Type<{ readonly provided: Signal<T> }>): Provider {\n return { provide: coreContextToken(context), useFactory: () => inject(component).provided };\n}\n\nexport interface UseCoreOptions<I, P> {\n readonly inputs: () => I;\n /** Prefix of the deterministic id, e.g. `bs-navbar`. */\n readonly idPrefix: string;\n /** The outputs by name; `api.emit` calls their `emit`. */\n readonly outputs?: Readonly<Record<string, { emit(detail: never): void }>>;\n /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */\n readonly hostBag?: (props: P) => CoreBag | null | undefined;\n /**\n * The group's scope, stamped as `data-mps` on the host bag `core.host` writes where the template\n * root is NOT the host (`bs-progress-bar`'s `.progress-bar-host`, #460). Unlike `hostBag`, it does\n * not make the host the core's root.\n */\n readonly hostScope?: string;\n /** Two-way inputs (`model()`), by name; written back when the core changes the state of the same name. */\n readonly models?: Readonly<Record<string, { set(value: never): void }>>;\n /**\n * The element the core runs on, where it is not the host: a structural directive's anchor\n * (`anchorElement`), whose own node is a comment. Read lazily, after the view placed it.\n */\n readonly element?: () => HTMLElement | null;\n}\n\nexport interface CoreHandle<P, PC> {\n /** The template's props. */\n readonly props: Signal<P>;\n /** The value this component provides to its content. */\n readonly provided: Signal<PC>;\n /** Runs a core method; does nothing before the first client render. */\n call(name: string, args: unknown[]): unknown;\n}\n\n/**\n * Host a `ComponentCore` in a generated Angular component (PRD #437 D10).\n * Call it in a field initializer. The template's root is the host element\n * where `hostBag` is given, else the host's first element child.\n */\nexport function useCore<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: UseCoreOptions<I, P>): CoreHandle<P, PC> {\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const element = (): HTMLElement | null => (options.element ? options.element() : host);\n const consumed = core.consume ? inject(coreContextToken(core.consume), { optional: true, skipSelf: true }) : null;\n const id = inject(BsIdService).next(options.idPrefix);\n // Read once: a host attribute is static content, and Angular does not observe it.\n let label: string | null | undefined;\n const readLabel = () => (label === undefined ? (label = element()?.getAttribute('aria-label') ?? null) : label);\n const hydrated = signal(false);\n // The state is seeded at its first read, in the first change detection: the\n // template's bindings have set the inputs by then. In the constructor they\n // have not, and the server would render a bound model input's default.\n const written = signal<S | null>(null);\n const server = isPlatformServer(inject(PLATFORM_ID));\n const transfer = core.transferKey ? inject(TransferState) : null;\n /** Server only: starts the prefetch with the first inputs that name one (a `transferKey`), however late they arrive. */\n let prefetchOnce: ((inputs: I) => void) | null = null;\n /** Client only: the transferred seed is still unread, because no inputs have named its key yet. */\n let transferArmed = !server && !!transfer;\n let seeded: S | null = null;\n const seed = (): S => {\n if (seeded) return seeded;\n const inputs = untracked(options.inputs);\n // The baseline the state was seeded from: inputs that change before attaching\n // (a form control writing its value) reach inputsChanged on attach.\n runtime.inputs(inputs);\n return (seeded = core.state ? core.state(inputs, server ? undefined : takeTransferred(inputs)) : ({} as S));\n };\n /**\n * The server's prefetched seed for these inputs, read once: a later instance with the same query fetches fresh (#448).\n * Inputs without a key (a `fetch` the consumer sets after an async step) leave it armed for the next delivery.\n */\n const takeTransferred = (inputs: I): unknown => {\n const key = transferArmed && transfer ? core.transferKey?.(inputs) : undefined;\n if (!transfer || !key) return undefined;\n transferArmed = false;\n const stateKey = makeStateKey<unknown>(key);\n if (!transfer.hasKey(stateKey)) return undefined;\n const value = transfer.get(stateKey, undefined);\n transfer.remove(stateKey);\n return value;\n };\n if (server && transfer && core.prefetch) {\n // Outside the state computed, which must not write signals: the first change\n // detection seeds the loading snapshot, this replaces it before serialization.\n const pendingTasks = inject(PendingTasks);\n const ssr = inject(MACHINE_SSR_OPTIONS);\n const abort = new AbortController();\n inject(DestroyRef).onDestroy(() => abort.abort());\n prefetchOnce = (inputs) => {\n void pendingTasks.run(async () => {\n const result = await runPrefetch(core, inputs, { timeout: ssr.prefetchTimeout, signal: abort.signal });\n if (!result || abort.signal.aborted) return;\n transfer.set(makeStateKey<unknown>(result.key), result.seed);\n written.set(core.state!(inputs, result.seed));\n });\n };\n }\n const state = computed(() => written() ?? seed());\n\n const args = computed<ViewArgs<I, S, C, E>>(() => ({\n inputs: options.inputs(),\n state: state(),\n id,\n hydrated: hydrated(),\n context: (consumed ? consumed() : core.consume?.defaultValue) as C,\n label: readLabel(),\n api: () => runtime.api,\n }));\n const props = computed(() => core.view(args()));\n const provided = computed(() => core.provide?.(args()) as PC);\n\n const hostBag = options.hostBag ?? scopedHost(core.host?.bind(core), options.hostScope);\n if (hostBag) useHostProps(() => hostBag(props()), options.element);\n\n const runtime = coreRuntime(core, {\n inputs: () => untracked(options.inputs),\n state: () => untracked(state),\n setState: (next) => written.set(next),\n emit: (name, detail) => options.outputs?.[name]?.emit(detail as never),\n models: Object.keys(options.models ?? {}) as never,\n writeModel: (name, value) => options.models?.[name]?.set(value as never),\n });\n afterNextRender(() => {\n hydrated.set(true);\n const root = options.element ? element() : options.hostBag ? host : (host.firstElementChild as HTMLElement | null);\n if (root) runtime.attachTo(root);\n });\n effect(() => {\n const inputs = options.inputs();\n untracked(() => {\n // A seed whose key the first inputs did not name: applied before the inputs reach the core,\n // so its inputsChanged sees the seeded page as the answer rather than reloading it.\n if (transferArmed && core.adopt) {\n const late = takeTransferred(inputs);\n if (late !== undefined) written.set(core.adopt(state(), inputs, late));\n }\n runtime.inputs(inputs);\n // Armed until the inputs name a prefetch: a `fetch` or `stateKey` can arrive after the first delivery.\n if (prefetchOnce && core.transferKey?.(inputs)) {\n const start = prefetchOnce;\n prefetchOnce = null;\n start(inputs);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => runtime.dispose());\n\n return { props, provided, call: (name, callArgs) => runtime.call(name, callArgs) };\n}\n","import { DestroyRef, Directive, effect, EmbeddedViewRef, inject, input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n/**\n * Render an `<ng-template>` into another element, the compiled form of a view's\n * `<teleport :to>`. The twin of React's `createPortal`, Vue's `<Teleport>` and\n * Lit's `teleport()`. The view lives in this container, so change detection and\n * destruction follow the component, but its root nodes are moved into `to`, as\n * CDK's DomPortalOutlet does. Nothing renders while `to` is null, which is the\n * server's case. A core hands a target whose identity never changes (the\n * dock's per-pane hosts), so the content's state survives wherever the core\n * moves that target.\n *\n * <ng-template [mpTeleport]=\"view.paneHosts[pane]\">...</ng-template>\n */\n@Directive({ selector: '[mpTeleport]' })\nexport class MpTeleportDirective {\n readonly mpTeleport = input<Element | null | undefined>(null);\n\n private readonly template = inject(TemplateRef);\n private readonly container = inject(ViewContainerRef);\n private view: EmbeddedViewRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const to = this.mpTeleport() ?? null;\n if (!to) {\n this.container.clear();\n this.view = null;\n return;\n }\n this.view ??= this.container.createEmbeddedView(this.template);\n // The view's nodes render in place first; detectChanges fills them before they move.\n this.view.detectChanges();\n this.view.rootNodes.filter((node: Node) => node.parentNode !== to).forEach((node: Node) => to.appendChild(node));\n });\n inject(DestroyRef).onDestroy(() => this.container.clear());\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Marks core-produced markup as trusted for `[innerHTML]`: the compiled form of\n * a view's `v-html`. The view contract is that `v-html` only ever carries markup\n * the core produced (flag and file-type SVGs, highlighted code rows), which the\n * React, Vue and Lit fronts insert as-is. Angular's sanitiser would instead drop\n * every `<svg>` — an empty flag, an icon-less file manager — so the Angular front\n * trusts it the same way.\n *\n * <span [innerHTML]=\"view.flagHtml | mpTrustedHtml\"></span>\n */\n@Pipe({ name: 'mpTrustedHtml' })\nexport class MpTrustedHtmlPipe implements PipeTransform {\n private readonly sanitizer = inject(DomSanitizer);\n\n transform(html: string | null | undefined): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(html ?? '');\n }\n}\n","import { ApplicationRef, DestroyRef, Directive, DOCUMENT, effect, EmbeddedViewRef, inject, TemplateRef, untracked, ViewContainerRef } from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { createBodyHost } from '@mintplayer/ui-core/overlay';\n\n/**\n * Render an `<ng-template>` into a body host (#458 §4.4): a `div` appended to\n * the end of `<body>`, outside every clipping ancestor. The compiled form of a\n * view's `<teleport to=\"body\">`, and the twin of React's `createPortal`, Vue's\n * `<Teleport to=\"body\">` and Lit's `bodyTeleport()`.\n *\n * The view is created DETACHED (`TemplateRef.createEmbeddedView` +\n * `ApplicationRef.attachView`), never in this anchor's container, so the\n * component's hydration info holds no view whose nodes are elsewhere. The\n * server renders it into its body host; the client removes that copy (same\n * deterministic id) and renders its own, outside hydration. Change detection\n * reaches it through the application; it reads the declaring component's\n * members, because an embedded view keeps its declaration context.\n *\n * @if (open()) { <ng-template mpBodyTeleport>…</ng-template> }\n */\n@Directive({ selector: '[mpBodyTeleport]' })\nexport class MpBodyTeleportDirective {\n private readonly template = inject(TemplateRef);\n private readonly appRef = inject(ApplicationRef);\n private readonly document = inject(DOCUMENT);\n private readonly anchor = inject(ViewContainerRef).element.nativeElement as Node;\n /** Identical on the server and on hydration: the client replaces the server's host by it. */\n readonly id = inject(BsIdService).next('mp-overlay');\n private view: EmbeddedViewRef<unknown> | null = null;\n private host: HTMLElement | null = null;\n\n constructor() {\n // An effect runs during change detection on the server too, where afterNextRender never does.\n effect(() =>\n untracked(() => {\n if (this.view) return;\n this.host = createBodyHost(this.document, this.id, this.anchor.parentElement);\n this.view = this.template.createEmbeddedView({});\n this.appRef.attachView(this.view);\n this.view.detectChanges();\n this.view.rootNodes.forEach((node: Node) => this.host!.appendChild(node));\n }),\n );\n inject(DestroyRef).onDestroy(() => {\n if (this.view) {\n this.appRef.detachView(this.view);\n this.view.destroy();\n }\n this.host?.remove();\n this.view = this.host = null;\n });\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Directive, effect, inject, input } from '@angular/core';\nimport { SCOPED_STYLE_MARKER, writeScopedStyleTag } from '@mintplayer/ui-core/scoped-styles';\n\n/**\n * A compiled template's `<instance-style :name :css />` (#458 M4): one instance's own\n * sheet, the tile manager's server layout rules. Angular strips `<style>` from\n * templates, so the sheet goes into the document head under `name`, on the server\n * (where it ships in the HTML) and on the client alike. A null `css` removes it, as\n * does destroying the component.\n */\n@Directive({ selector: 'ng-container[mpInstanceStyle]' })\nexport class MpInstanceStyleDirective {\n readonly mpInstanceStyle = input<string | null>(null);\n readonly mpInstanceStyleName = input.required<string>();\n\n constructor() {\n const doc = inject(DOCUMENT);\n let written: string | null = null;\n const remove = () => {\n if (written !== null) doc.head?.querySelector(`style[${SCOPED_STYLE_MARKER}=\"${written}\"]`)?.remove();\n written = null;\n };\n effect(() => {\n const css = this.mpInstanceStyle();\n const name = this.mpInstanceStyleName();\n if (written !== name) remove();\n if (!css) return remove();\n writeScopedStyleTag(doc, name, css, { replace: true });\n written = name;\n });\n inject(DestroyRef).onDestroy(remove);\n }\n}\n","import {\n ApplicationRef,\n createComponent,\n DestroyRef,\n DOCUMENT,\n effect,\n ElementRef,\n EnvironmentInjector,\n inject,\n Injector,\n PLATFORM_ID,\n TemplateRef,\n untracked,\n type ComponentRef,\n type EmbeddedViewRef,\n type Type,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { createBodyHost, removeBodyHost } from '@mintplayer/ui-core/overlay';\n\n/**\n * A structural directive's anchor: the element its template sits in\n * (`<button>Save<span *bsTooltip>…</span></button>` → the button). The\n * directive's own node is a comment; read this lazily, once the view placed it.\n */\nexport function anchorElement(): () => HTMLElement | null {\n const node = inject<ElementRef<Node>>(ElementRef).nativeElement;\n return () => node.parentElement;\n}\n\n/**\n * The Angular half of an overlay directive (#458 M6, tooltip and popover): while\n * `inputs()` is not null, `component` renders into a body host with the\n * directive's template as its content (`<ng-content>`), and gets those inputs.\n * The panel is created detached and attached to the application, so it lives\n * outside every clipping ancestor and the anchor's DOM stays the consumer's.\n * Browser only: an overlay cannot be open in server HTML.\n */\nexport function useOverlayComponent(component: Type<unknown>, inputs: () => object | null, anchor: () => Element | null): void {\n const template = inject<TemplateRef<unknown>>(TemplateRef);\n const injector = inject(Injector);\n const environmentInjector = inject(EnvironmentInjector);\n const appRef = inject(ApplicationRef);\n const doc = inject(DOCUMENT);\n const id = `mp-overlay-${inject(BsIdService).next('bs-overlay')}`;\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n\n let panel: ComponentRef<unknown> | null = null;\n let content: EmbeddedViewRef<unknown> | null = null;\n const close = () => {\n panel?.destroy();\n content?.destroy();\n panel = content = null;\n removeBodyHost(doc, id);\n };\n effect(() => {\n const next = inputs();\n untracked(() => {\n if (!next) return close();\n if (!panel) {\n content = template.createEmbeddedView(null, injector);\n appRef.attachView(content);\n panel = createComponent(component, { environmentInjector, elementInjector: injector, projectableNodes: [content.rootNodes] });\n Object.entries(next).map(([name, value]) => panel?.setInput(name, value));\n createBodyHost(doc, id, anchor()).appendChild(panel.location.nativeElement);\n appRef.attachView(panel.hostView);\n return;\n }\n Object.entries(next).map(([name, value]) => panel?.setInput(name, value));\n });\n });\n inject(DestroyRef).onDestroy(close);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["DOCUMENT"],"mappings":";;;;;;;;;;;AAGA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAmB,KAAe,EAAE,UAAA,GAAyB,MAAM,CAAC,UAAU,CAAC,EAAA;AAC1G,IAAA,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ;8EAAC;AACvC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACtE,IAAA,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC;AACjC,IAAA,OAAO,KAAK,CAAC,UAAU,EAAE;AAC3B;;ACZA;;;;AAIG;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AAEzG,SAAS,SAAS,CAAC,IAAY,EAAA;AAC7B,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACnD;AAEA;;;;;;;;;;;AAWG;MAEU,gBAAgB,CAAA;AAc3B,IAAA,WAAA,GAAA;QAbS,IAAA,CAAA,OAAO,GAAG,KAAK,C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