@taiga-ui/layout 4.52.0-canary.e444d19 → 4.52.0-canary.e53e79e
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 +2 -2
- package/components/app-bar/app-bar-back.component.d.ts +1 -1
- package/components/app-bar/app-bar.component.d.ts +2 -2
- package/components/app-bar/app-bar.directive.d.ts +2 -2
- package/components/block-status/block-status.component.d.ts +3 -3
- package/components/block-status/block-status.directive.d.ts +2 -2
- package/components/card/collapsed.directive.d.ts +2 -2
- package/components/card/large.directive.d.ts +3 -2
- package/components/card/medium.directive.d.ts +2 -1
- package/components/dynamic-header/dynamic-header-anchor.directive.d.ts +1 -1
- package/components/dynamic-header/dynamic-header-container.directive.d.ts +2 -2
- package/components/form/form.directive.d.ts +3 -4
- package/components/form/form.options.d.ts +2 -2
- package/components/header/header.directive.d.ts +8 -11
- package/components/index.d.ts +2 -1
- package/components/input-search/input-search.component.d.ts +5 -6
- package/components/item-group/item-group.directive.d.ts +3 -3
- package/components/navigation/aside-group.component.d.ts +7 -8
- package/components/navigation/aside-item.directive.d.ts +2 -2
- package/components/navigation/aside.component.d.ts +2 -3
- package/components/navigation/drawer.component.d.ts +6 -7
- package/components/navigation/hint-aside.directive.d.ts +5 -3
- package/components/pdf-viewer/index.d.ts +1 -0
- package/components/pdf-viewer/pdf-viewer.component.d.ts +13 -0
- package/components/search/search-filter.component.d.ts +4 -3
- package/components/search/search-filters.component.d.ts +6 -8
- package/components/surface/index.d.ts +1 -0
- package/components/surface/surface.directive.d.ts +6 -0
- package/fesm2022/taiga-ui-layout-components-app-bar.mjs +25 -35
- package/fesm2022/taiga-ui-layout-components-app-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-block-details.mjs +9 -12
- package/fesm2022/taiga-ui-layout-components-block-details.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-block-status.mjs +15 -22
- package/fesm2022/taiga-ui-layout-components-block-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-card.mjs +55 -65
- package/fesm2022/taiga-ui-layout-components-card.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs +23 -27
- package/fesm2022/taiga-ui-layout-components-dynamic-header.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-form.mjs +33 -46
- package/fesm2022/taiga-ui-layout-components-form.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-header.mjs +15 -33
- package/fesm2022/taiga-ui-layout-components-header.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-input-search.mjs +20 -29
- package/fesm2022/taiga-ui-layout-components-input-search.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-item-group.mjs +18 -32
- package/fesm2022/taiga-ui-layout-components-item-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-navigation.mjs +103 -117
- package/fesm2022/taiga-ui-layout-components-navigation.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-pdf-viewer.mjs +48 -0
- package/fesm2022/taiga-ui-layout-components-pdf-viewer.mjs.map +1 -0
- package/fesm2022/taiga-ui-layout-components-search.mjs +32 -52
- package/fesm2022/taiga-ui-layout-components-search.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-components-surface.mjs +33 -0
- package/fesm2022/taiga-ui-layout-components-surface.mjs.map +1 -0
- package/fesm2022/taiga-ui-layout-components.mjs +2 -1
- package/fesm2022/taiga-ui-layout-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-layout-tokens.mjs +2 -7
- package/fesm2022/taiga-ui-layout-tokens.mjs.map +1 -1
- package/package.json +13 -6
- package/tokens/common-icons.d.ts +3 -5
- package/tokens/i18n.d.ts +1 -1
- package/components/cell/cell.directive.d.ts +0 -10
- package/components/cell/cell.options.d.ts +0 -6
- package/components/cell/index.d.ts +0 -2
- package/fesm2022/taiga-ui-layout-components-cell.mjs +0 -61
- package/fesm2022/taiga-ui-layout-components-cell.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-layout-components-input-search.mjs","sources":["../../../projects/layout/components/input-search/input-search.component.ts","../../../projects/layout/components/input-search/input-search.component.html","../../../projects/layout/components/input-search/taiga-ui-layout-components-input-search.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n type EmbeddedViewRef,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-layout-components-input-search.mjs","sources":["../../../projects/layout/components/input-search/input-search.component.ts","../../../projects/layout/components/input-search/input-search.component.html","../../../projects/layout/components/input-search/taiga-ui-layout-components-input-search.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n type OnChanges,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {\n tuiContainsOrAfter,\n tuiInjectElement,\n tuiIsElement,\n} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {tuiCellOptionsProvider} from '@taiga-ui/core/components/cell';\nimport {TuiWithInput} from '@taiga-ui/core/components/input';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiIconStart} from '@taiga-ui/core/directives/icons';\nimport {TuiPopupService} from '@taiga-ui/core/portals/popup';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {TUI_INPUT_SEARCH} from '@taiga-ui/layout/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'input[tuiInputSearch]',\n imports: [PolymorpheusOutlet],\n templateUrl: './input-search.component.html',\n styleUrl: './input-search.component.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiCellOptionsProvider({size: 'm'})],\n hostDirectives: [TuiWithInput],\n host: {\n ngSkipHydration: 'true',\n '(focus)': 'open()',\n '(keydown.tab.prevent)': '0',\n '(keydown.arrowDown.prevent)': 'onArrow()',\n },\n})\nexport class TuiInputSearch implements OnChanges {\n @ViewChild(TemplateRef)\n private readonly template?: TemplateRef<any>;\n\n @ViewChild('container')\n private readonly container?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement<HTMLInputElement>();\n private readonly service = inject(TuiPopupService);\n private readonly textfield = inject(TuiTextfieldComponent);\n private readonly i18n = inject(TUI_INPUT_SEARCH);\n private parent = this.textfield.el.parentElement;\n private neighbor = this.textfield.el.nextSibling;\n private placeholder = '';\n private ref?: EmbeddedViewRef<unknown>;\n\n protected readonly icon = tuiIconStart(inject(TUI_COMMON_ICONS).search, {});\n\n public readonly tuiInputSearch = input<PolymorpheusContent>();\n\n public searchOpen = model(false, {alias: 'tuiInputSearchOpen'});\n\n public ngOnChanges(): void {\n if (this.searchOpen()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n public open(): void {\n if (this.ref?.destroyed === false || !this.template) {\n return;\n }\n\n this.placeholder = this.el.placeholder;\n this.parent = this.textfield.el.parentElement;\n this.neighbor = this.textfield.el.nextSibling;\n this.ref = this.service.add(this.template);\n this.ref.rootNodes[0]?.insertAdjacentElement('afterbegin', this.textfield.el);\n this.el.focus({preventScroll: true});\n this.el.placeholder = this.i18n()?.placeholder || this.el.placeholder;\n this.searchOpen.set(true);\n }\n\n public close(): void {\n this.el.placeholder = this.placeholder || this.el.placeholder;\n this.parent?.insertBefore(this.textfield.el, this.neighbor);\n this.ref?.destroy();\n this.searchOpen.set(false);\n }\n\n protected onArrow(): void {\n tuiGetClosestFocusable({\n initial: this.container?.nativeElement || this.el,\n root: this.container?.nativeElement || this.el,\n })?.focus();\n }\n\n protected onFocus({target}: Event): void {\n if (\n this.container &&\n target !== this.el &&\n tuiIsElement(target) &&\n !tuiContainsOrAfter(this.container.nativeElement, target)\n ) {\n this.close();\n }\n }\n}\n","<ng-template>\n <div\n tuiTheme=\"dark\"\n class=\"t-container\"\n (document:focusin)=\"onFocus($event)\"\n (keydown.esc)=\"close()\"\n (pointerdown.self)=\"close()\"\n >\n <div\n #container\n class=\"t-content\"\n >\n <ng-container *polymorpheusOutlet=\"tuiInputSearch()\" />\n </div>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA0Ca,cAAc,CAAA;AAf3B,IAAA,WAAA,GAAA;QAsBqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;AACjC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACzC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACxC,IAAM,CAAA,MAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa;QACxC,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,WAAW;QACxC,IAAW,CAAA,WAAA,GAAG,EAAE;AAGL,QAAA,IAAA,CAAA,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QAE3D,IAAc,CAAA,cAAA,GAAG,KAAK,EAAuB;QAEtD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC,KAAK,EAAE,EAAC,KAAK,EAAE,oBAAoB,EAAC,CAAC;AAiDlE;IA/CU,WAAW,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACnB,IAAI,CAAC,IAAI,EAAE;;aACR;YACH,IAAI,CAAC,KAAK,EAAE;;;IAIb,IAAI,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,GAAG,EAAE,SAAS,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACjD;;QAGJ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,WAAW;QACtC,IAAI,CAAC,MAAM,GA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CAAC,sBAAsB,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EAChC,cAAA,EAAA,CAAC,YAAY,CAAC,EACxB,IAAA,EAAA;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,uBAAuB,EAAE,GAAG;AAC5B,wBAAA,6BAA6B,EAAE,WAAW;AAC7C,qBAAA,EAAA,QAAA,EAAA,4ZAAA,EAAA,MAAA,EAAA,CAAA,2VAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,SAAS;uBAAC,WAAW;gBAIL,SAAS,EAAA,CAAA;sBADzB,SAAS;uBAAC,WAAW;;;AE9C1B;;AAEG;;;;"}
|
|
@@ -1,60 +1,46 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, ViewEncapsulation, Component,
|
|
2
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, Directive } from '@angular/core';
|
|
3
3
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
4
4
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
5
|
-
import { timer, take } from 'rxjs';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
static { this.ɵ
|
|
6
|
+
const OPTIONS = { behavior: 'smooth', block: 'nearest', inline: 'center' };
|
|
7
|
+
class Styles {
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.16", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-item-group" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: Styles, decorators: [{
|
|
12
12
|
type: Component,
|
|
13
|
-
args: [{
|
|
14
|
-
class: 'tui-item-group',
|
|
15
|
-
}, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"] }]
|
|
13
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-item-group' }, styles: ["[tuiItemGroup]{display:flex;flex-wrap:wrap;--tui-item-margin: .25rem}[tuiItemGroup]>*:not(tui-items-with-more){margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._horizontal{scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;overflow:scroll}[tuiItemGroup]._horizontal::-webkit-scrollbar,[tuiItemGroup]._horizontal::-webkit-scrollbar-thumb{display:none}[tuiItemGroup]._horizontal>*:not(tui-items-with-more){margin-block-end:0}[tuiItemGroup]._initialized tui-items-with-more .t-item{transition-property:transform,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;opacity:1;transform:scale(1)}[tuiItemGroup]._initialized tui-items-with-more .t-item>*{margin:0 var(--tui-item-margin) var(--tui-item-margin) 0}[tuiItemGroup]._initialized tui-items-with-more .t-item_hidden{opacity:0;transform:scale(.9)}\n"] }]
|
|
16
14
|
}] });
|
|
17
15
|
class TuiItemGroup {
|
|
18
16
|
constructor() {
|
|
19
17
|
this.el = tuiInjectElement();
|
|
20
|
-
this.nothing = tuiWithStyles(
|
|
21
|
-
this.horizontal = false;
|
|
22
|
-
this.autoscroll = false;
|
|
18
|
+
this.nothing = tuiWithStyles(Styles);
|
|
19
|
+
this.horizontal = input(false);
|
|
20
|
+
this.autoscroll = input(false);
|
|
23
21
|
}
|
|
24
22
|
ngAfterViewInit() {
|
|
25
23
|
this.el.classList.add('_initialized');
|
|
26
24
|
}
|
|
27
25
|
onClick(target) {
|
|
28
|
-
if (this.autoscroll && this.horizontal) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.subscribe(() => {
|
|
32
|
-
target.scrollIntoView({
|
|
33
|
-
behavior: 'smooth',
|
|
34
|
-
block: 'nearest',
|
|
35
|
-
inline: 'center',
|
|
36
|
-
});
|
|
37
|
-
});
|
|
26
|
+
if (this.autoscroll() && this.horizontal()) {
|
|
27
|
+
// Safari bug
|
|
28
|
+
setTimeout(() => target.scrollIntoView(OPTIONS));
|
|
38
29
|
}
|
|
39
30
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
41
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
32
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.16", type: TuiItemGroup, isStandalone: true, selector: "[tuiItemGroup]", inputs: { horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, autoscroll: { classPropertyName: "autoscroll", publicName: "autoscroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event.target)" }, properties: { "class._horizontal": "horizontal()" } }, ngImport: i0 }); }
|
|
42
33
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.16", ngImport: i0, type: TuiItemGroup, decorators: [{
|
|
44
35
|
type: Directive,
|
|
45
36
|
args: [{
|
|
46
|
-
standalone: true,
|
|
47
37
|
selector: '[tuiItemGroup]',
|
|
48
38
|
host: {
|
|
49
39
|
'(click)': 'onClick($event.target)',
|
|
50
|
-
'[class._horizontal]': 'horizontal',
|
|
40
|
+
'[class._horizontal]': 'horizontal()',
|
|
51
41
|
},
|
|
52
42
|
}]
|
|
53
|
-
}]
|
|
54
|
-
type: Input
|
|
55
|
-
}], autoscroll: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}] } });
|
|
43
|
+
}] });
|
|
58
44
|
|
|
59
45
|
/**
|
|
60
46
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-layout-components-item-group.mjs","sources":["../../../projects/layout/components/item-group/item-group.directive.ts","../../../projects/layout/components/item-group/taiga-ui-layout-components-item-group.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-layout-components-item-group.mjs","sources":["../../../projects/layout/components/item-group/item-group.directive.ts","../../../projects/layout/components/item-group/taiga-ui-layout-components-item-group.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\nconst OPTIONS = {behavior: 'smooth', block: 'nearest', inline: 'center'} as const;\n\n@Component({\n template: '',\n styleUrl: './item-group.styles.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-item-group'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiItemGroup]',\n host: {\n '(click)': 'onClick($event.target)',\n '[class._horizontal]': 'horizontal()',\n },\n})\nexport class TuiItemGroup implements AfterViewInit {\n private readonly el = tuiInjectElement();\n\n protected readonly nothing = tuiWithStyles(Styles);\n\n public readonly horizontal = input(false);\n public readonly autoscroll = input(false);\n\n public ngAfterViewInit(): void {\n this.el.classList.add('_initialized');\n }\n\n protected onClick(target: HTMLElement): void {\n if (this.autoscroll() && this.horizontal()) {\n // Safari bug\n setTimeout(() => target.scrollIntoView(OPTIONS));\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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