@ng-doc/app 22.1.0 → 22.2.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/LICENSE +21 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs +22 -4
- package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +36 -12
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +7 -5
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +5 -3
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +6 -4
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-command-palette.mjs +35 -27
- package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-copy-button.mjs +6 -4
- package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +19 -4
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-frame.mjs +195 -12
- package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +2 -2
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +49 -12
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +5 -3
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +4 -2
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs +5 -3
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-image-viewer.mjs +5 -3
- package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-navbar.mjs +4 -2
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +5 -3
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs +2 -2
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +83 -16
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +743 -108
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +51 -4
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs +8 -6
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +7 -5
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +4 -3
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +7 -5
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +4 -2
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-constants.mjs +11 -1
- package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
- package/fesm2022/ng-doc-app-demo-app.mjs +618 -15
- package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-helpers.mjs +125 -6
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +29 -18
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-texts.mjs +53 -0
- package/fesm2022/ng-doc-app-providers-texts.mjs.map +1 -0
- package/fesm2022/ng-doc-app-providers.mjs +1 -0
- package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +27 -2
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-highlighter.mjs +8 -5
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-shortcuts.mjs +38 -4
- package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -1
- package/fesm2022/ng-doc-app-texts-ar.mjs +238 -0
- package/fesm2022/ng-doc-app-texts-ar.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-de.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-de.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-es.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-es.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-fr.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-fr.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-hi.mjs +219 -0
- package/fesm2022/ng-doc-app-texts-hi.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ja.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-ja.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ko.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-ko.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-pt-br.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-pt-br.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-ru.mjs +231 -0
- package/fesm2022/ng-doc-app-texts-ru.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-uk.mjs +231 -0
- package/fesm2022/ng-doc-app-texts-uk.mjs.map +1 -0
- package/fesm2022/ng-doc-app-texts-zh.mjs +205 -0
- package/fesm2022/ng-doc-app-texts-zh.mjs.map +1 -0
- package/fesm2022/ng-doc-app-tokens.mjs +214 -1
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-json-control.mjs +90 -0
- package/fesm2022/ng-doc-app-type-controls-json-control.mjs.map +1 -0
- package/fesm2022/ng-doc-app-type-controls-list-control.mjs +792 -0
- package/fesm2022/ng-doc-app-type-controls-list-control.mjs.map +1 -0
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +5 -3
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls.mjs +2 -0
- package/fesm2022/ng-doc-app-type-controls.mjs.map +1 -1
- package/package.json +59 -3
- package/styles/global.css +1 -0
- package/styles/main.css +1 -0
- package/types/ng-doc-app-classes-default-search-engine.d.ts +11 -0
- package/types/ng-doc-app-classes-root-page.d.ts +5 -0
- package/types/ng-doc-app-components-api-list.d.ts +3 -1
- package/types/ng-doc-app-components-breadcrumb.d.ts +2 -1
- package/types/ng-doc-app-components-code.d.ts +2 -0
- package/types/ng-doc-app-components-command-palette.d.ts +3 -1
- package/types/ng-doc-app-components-copy-button.d.ts +3 -1
- package/types/ng-doc-app-components-demo-displayer.d.ts +13 -1
- package/types/ng-doc-app-components-demo-frame.d.ts +62 -3
- package/types/ng-doc-app-components-demo.d.ts +27 -8
- package/types/ng-doc-app-components-fullscreen-button.d.ts +2 -0
- package/types/ng-doc-app-components-fullscreen-toggle.d.ts +2 -0
- package/types/ng-doc-app-components-heading-anchor.d.ts +2 -0
- package/types/ng-doc-app-components-image-viewer.d.ts +2 -0
- package/types/ng-doc-app-components-navbar.d.ts +2 -0
- package/types/ng-doc-app-components-page-navigation.d.ts +2 -1
- package/types/ng-doc-app-components-page.d.ts +10 -1
- package/types/ng-doc-app-components-playground.d.ts +241 -44
- package/types/ng-doc-app-components-root.d.ts +18 -0
- package/types/ng-doc-app-components-search-result.d.ts +2 -0
- package/types/ng-doc-app-components-search.d.ts +2 -0
- package/types/ng-doc-app-components-sidebar.d.ts +2 -1
- package/types/ng-doc-app-components-theme-toggle.d.ts +4 -1
- package/types/ng-doc-app-components-toc.d.ts +2 -1
- package/types/ng-doc-app-constants.d.ts +11 -1
- package/types/ng-doc-app-demo-app.d.ts +211 -3
- package/types/ng-doc-app-helpers.d.ts +56 -3
- package/types/ng-doc-app-interfaces.d.ts +621 -3
- package/types/ng-doc-app-providers-ng-doc-app.d.ts +6 -0
- package/types/ng-doc-app-providers-texts.d.ts +28 -0
- package/types/ng-doc-app-providers.d.ts +1 -0
- package/types/ng-doc-app-services-content-scroll-intent.d.ts +11 -1
- package/types/ng-doc-app-services-highlighter.d.ts +3 -1
- package/types/ng-doc-app-services-shortcuts.d.ts +16 -0
- package/types/ng-doc-app-texts-ar.d.ts +13 -0
- package/types/ng-doc-app-texts-de.d.ts +12 -0
- package/types/ng-doc-app-texts-es.d.ts +12 -0
- package/types/ng-doc-app-texts-fr.d.ts +12 -0
- package/types/ng-doc-app-texts-hi.d.ts +12 -0
- package/types/ng-doc-app-texts-ja.d.ts +12 -0
- package/types/ng-doc-app-texts-ko.d.ts +12 -0
- package/types/ng-doc-app-texts-pt-br.d.ts +12 -0
- package/types/ng-doc-app-texts-ru.d.ts +12 -0
- package/types/ng-doc-app-texts-uk.d.ts +12 -0
- package/types/ng-doc-app-texts-zh.d.ts +12 -0
- package/types/ng-doc-app-tokens.d.ts +21 -2
- package/types/ng-doc-app-type-controls-json-control.d.ts +38 -0
- package/types/ng-doc-app-type-controls-list-control.d.ts +313 -0
- package/types/ng-doc-app-type-controls-type-alias-control.d.ts +2 -1
- package/types/ng-doc-app-type-controls.d.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-doc-app-components-playground.mjs","sources":["../../../../libs/app/components/playground/playground-demo/playground-demo.component.ts","../../../../libs/app/components/playground/playground-demo/playground-demo.component.html","../../../../libs/app/components/playground/playground-property/playground-property.component.ts","../../../../libs/app/components/playground/playground-property/playground-property.component.html","../../../../libs/app/components/playground/playground-properties/playground-properties.component.ts","../../../../libs/app/components/playground/playground-properties/playground-properties.component.html","../../../../libs/app/components/playground/playground.component.ts","../../../../libs/app/components/playground/playground.component.html","../../../../libs/app/components/playground/base-playground.ts","../../../../libs/app/components/playground/ng-doc-app-components-playground.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n inject,\n InjectionToken,\n Injector,\n input,\n InputSignal,\n OnChanges,\n OnDestroy,\n PendingTasks,\n Signal,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroup } from '@angular/forms';\nimport { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';\nimport { formatHtml } from '@ng-doc/app/helpers';\nimport { getPlaygroundDemoToken } from '@ng-doc/app/providers/playground-demo';\nimport { NgDocFormPartialValue } from '@ng-doc/app/types';\nimport {\n buildPlaygroundDemoPipeTemplate,\n buildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { stringify } from '@ng-doc/core/helpers/stringify';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n/**\n * One demo of a playground: it creates the generated playground class of its selector (or pipe),\n * passes it the form's values and shows the code of the current state.\n */\n@Component({\n selector: 'ng-doc-playground-demo',\n templateUrl: './playground-demo.component.html',\n styleUrls: ['./playground-demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocDemoDisplayerComponent],\n})\nexport class NgDocPlaygroundDemoComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n >\n implements OnChanges, OnDestroy\n{\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input<string>('');\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selector of the target this demo renders. */\n readonly selector: InputSignal<string> = input<string>('');\n\n /** The playground configuration, extended by the action's options. */\n readonly configuration: InputSignal<NgDocPlaygroundConfig | undefined> = input<\n NgDocPlaygroundConfig | undefined\n >(undefined);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Whether the demo is created again each time a value changes. */\n readonly recreateDemo: InputSignal<boolean> = input<boolean>(false);\n\n /** The values of the inputs and content slots. */\n readonly form: InputSignal<FormGroup<NgDocPlaygroundForm> | undefined> = input<\n FormGroup<NgDocPlaygroundForm> | undefined\n >(undefined);\n\n /** Whether the code of the demo is shown. */\n readonly expanded: InputSignal<boolean> = input<boolean>(false);\n\n /** Where the playground class is created. */\n readonly demoOutlet: Signal<ViewContainerRef | undefined> = viewChild('demoOutlet', {\n read: ViewContainerRef,\n });\n\n /** The generated playground class of this demo's selector or pipe. */\n playgroundDemo?: typeof NgDocBasePlayground;\n\n protected readonly code = signal('');\n\n protected readonly injector = inject(Injector);\n protected readonly destroyRef = inject(DestroyRef);\n private readonly pendingTasks = inject(PendingTasks);\n\n private demoRef?: ComponentRef<NgDocBasePlayground>;\n private readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n async ngOnChanges({ form, id }: SimpleChanges): Promise<void> {\n if (form || id) {\n this.unsubscribe$.next();\n\n const demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n getPlaygroundDemoToken(this.id());\n\n if (demoInjector) {\n const demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n this.playgroundDemo = demos.find(\n (demo: typeof NgDocBasePlayground) =>\n demo.selector === this.selector() || demo.selector === this.pipeName(),\n );\n }\n\n await this.updateDemo();\n\n const form = this.form();\n\n form?.valueChanges\n .pipe(\n startWith(form.value),\n takeUntil(this.unsubscribe$),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((data: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>) =>\n this.updateDemo(data),\n );\n }\n }\n\n private async updateDemo(\n data?: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>,\n ): Promise<void> {\n if (this.recreateDemo() || !this.demoRef) {\n this.createDemo();\n }\n\n if (data) {\n this.demoRef?.setInput('properties', data.properties ?? {});\n this.demoRef?.setInput('content', data.content ?? {});\n this.demoRef?.setInput('actionData', this.configuration()?.data ?? {});\n\n if (this.recreateDemo()) {\n this.demoRef?.instance.onReattached.subscribe(() => {\n this.demoRef?.changeDetectorRef.detectChanges();\n });\n }\n }\n\n await this.updateCodeView();\n }\n\n private createDemo(): void {\n if (this.playgroundDemo) {\n this.demoRef?.destroy();\n this.demoRef = this.demoOutlet()?.createComponent(\n this.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n );\n this.demoRef?.changeDetectorRef.markForCheck();\n }\n }\n\n private async updateCodeView(): Promise<void> {\n const template: string = this.pipeName()\n ? buildPlaygroundDemoPipeTemplate(\n this.configuration()?.template ?? '',\n this.pipeName(),\n this.getActiveContent(),\n this.getPipeActiveInputs(),\n )\n : buildPlaygroundDemoTemplate(\n this.configuration()?.template ?? '',\n this.selector(),\n this.getActiveContent(),\n this.getActiveInputs(),\n );\n\n // Formatting loads the formatter asynchronously. Zoneless SSR waits only for pending tasks, so\n // the page would otherwise be serialized before the code view is filled.\n const done = this.pendingTasks.add();\n\n try {\n this.code.set(await formatHtml(template));\n } finally {\n done();\n }\n }\n\n private getActiveContent(): Record<string, string> {\n const formData: Record<string, boolean> =\n (this.form()?.controls.content.value as Record<string, boolean>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n result[key] = formData[key] ? this.configuration()?.content?.[key].template ?? '' : '';\n\n return result;\n }, {});\n }\n\n private getActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n const inputName = this.properties()?.[key]?.inputName ?? key;\n const value: unknown = formData[key];\n const property: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (property !== value) {\n result[inputName] = stringify(value).replace(/\"/g, `'`);\n }\n\n return result;\n }, {});\n }\n\n private getPipeActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n let changedInputIndex: number = -1;\n\n return objectKeys(formData)\n .map((key: string, i: number) => {\n const value: unknown = formData[key];\n const defaultValue: unknown | undefined = this.demoRef?.instance?.defaultValues[key];\n\n if (defaultValue !== value) {\n changedInputIndex = i;\n }\n\n return key;\n })\n .slice(0, changedInputIndex + 1)\n .reduce((result: Record<string, string>, key: string) => {\n result[key] = stringify(formData[key]).replace(/\"/g, `'`);\n\n return result;\n }, {});\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n}\n","<ng-doc-demo-displayer\n [code]=\"code()\"\n [border]=\"false\"\n [expanded]=\"expanded()\"\n language=\"angular-html\">\n <ng-container #demoOutlet></ng-container>\n</ng-doc-demo-displayer>\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n reflectComponentType,\n Signal,\n signal,\n untracked,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport {\n NgDocProvidedTypeControl,\n NgDocTypeControl,\n NgDocTypeControlProviderOptions,\n} from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport { NgDocLabelComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\nlet nextId = 0;\n\n/** Value types that have a chip colour. */\nconst CHIP_TYPES: ReadonlySet<string> = new Set([\n 'string',\n 'number',\n 'boolean',\n 'object',\n 'null',\n 'undefined',\n]);\n\n/**\n * One row of the playground inspector: the input's name with its type chip, and the type\n * control that edits it, bound to the input's form control.\n */\n@Component({\n selector: 'ng-doc-playground-property',\n templateUrl: './playground-property.component.html',\n styleUrls: ['./playground-property.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocLabelComponent,\n NgDocTooltipDirective,\n NgDocSanitizeHtmlPipe,\n NgDocKindIconComponent,\n NgTemplateOutlet,\n ],\n host: {\n '[attr.data-has-property-control]': 'hasPropertyControl()',\n },\n})\nexport class NgDocPlaygroundPropertyComponent {\n /** Name of the input. */\n readonly name = input<string>('');\n\n /** The input, or the content slot. */\n readonly property = input<NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined>(\n undefined,\n );\n\n /** The type control that edits the input. */\n readonly typeControl = input<NgDocProvidedTypeControl | undefined>(undefined);\n\n /** Form control of the input. */\n readonly control = input<FormControl | undefined>(undefined);\n\n /** Default value of the input. */\n readonly defaultValue = input<unknown>(undefined);\n\n /** Whether a type control is rendered. */\n readonly hasPropertyControl = signal<boolean>(false);\n\n /** Description of the input, shown in the tooltip of its name. */\n protected readonly tooltipContent: Signal<string> = computed(() => {\n const property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined = this.property();\n\n return property && isPlaygroundProperty(property) ? property.description ?? '' : '';\n });\n\n /** Options of the type control provider. */\n protected readonly option: Signal<NgDocTypeControlProviderOptions | undefined> = computed(\n () => this.typeControl()?.options,\n );\n\n /** The value type shown as a chip under the name, or an empty string. */\n protected readonly typeChip: Signal<string> = computed(() => valueType(this.property()));\n\n /** Whether the row is a `<label>` around the control, unless its provider opts out. */\n protected readonly labelWrapper: Signal<boolean> = computed(\n () => this.option()?.labelWrapper !== false,\n );\n\n /** ID of the caption that names the control of a row without the `<label>`. */\n protected readonly captionId: string = `ng-doc-playground-property-caption-${nextId++}`;\n\n // The outlet is in the `<label>` or in the `<div>` of the row, so the query follows the branch.\n private readonly propertyOutlet = viewChild('propertyOutlet', { read: ViewContainerRef });\n\n private propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n constructor() {\n // A plain effect, not an after-render hook: it runs during change detection on the server\n // too, so server-rendered and prerendered pages include the controls. The outlet is inside\n // the row's `@if` branch, so the query reports it once the branch renders, and the effect\n // runs again then. It also runs again when an input it reads changes.\n effect(() => {\n const outlet: ViewContainerRef | undefined = this.propertyOutlet();\n const property = this.property();\n const typeControl: NgDocProvidedTypeControl | undefined = this.typeControl();\n const control: FormControl | undefined = this.control();\n const defaultValue: unknown = this.defaultValue();\n\n if (outlet) {\n untracked(() => this.createControl(outlet, property, typeControl, control, defaultValue));\n }\n });\n\n inject(DestroyRef).onDestroy(() => this.propertyTypeControl?.destroy());\n }\n\n private createControl(\n outlet: ViewContainerRef,\n property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined,\n typeControl: NgDocProvidedTypeControl | undefined,\n formControl: FormControl | undefined,\n defaultValue: unknown,\n ): void {\n if (!property || !typeControl) {\n return;\n }\n\n this.propertyTypeControl?.destroy();\n\n const control: ComponentRef<NgDocTypeControl> = outlet.createComponent(typeControl.control);\n\n this.propertyTypeControl = control;\n setTypeControlField(control, 'name', this.name());\n setTypeControlField(control, 'description', this.tooltipContent());\n setTypeControlField(\n control,\n 'options',\n isPlaygroundProperty(property) ? property.options : undefined,\n );\n setTypeControlField(control, 'default', defaultValue);\n setTypeControlField(\n control,\n 'isManual',\n isPlaygroundProperty(property) ? property.isManual : undefined,\n );\n control.instance.writeValue(formControl?.value);\n\n if (formControl) {\n formControl.registerOnChange((value: unknown) => control.instance.writeValue(value));\n control.instance.registerOnChange((value: unknown) => formControl.setValue(value));\n control.instance.registerOnTouched(() => formControl.markAsTouched());\n }\n\n this.hasPropertyControl.set(true);\n }\n}\n\n/**\n * The value type of an input: its declared type when it is a primitive, else the type of the first\n * value of its type alias. Content slots are booleans.\n * @param property - The input or the content slot.\n */\nfunction valueType(property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined): string {\n if (!property) {\n return '';\n }\n\n if (!isPlaygroundProperty(property)) {\n return 'boolean';\n }\n\n if (CHIP_TYPES.has(property.type)) {\n return property.type;\n }\n\n const option: string | NgDocPlaygroundOption | undefined = property.options?.[0];\n\n if (option !== undefined) {\n try {\n const type: string = typeof resolvePlaygroundOption(option, property.isManual).value;\n\n return CHIP_TYPES.has(type) ? type : '';\n } catch {\n return '';\n }\n }\n\n return '';\n}\n\n/**\n * Sets a field of a type control: through `ComponentRef.setInput()` when the control declares it\n * as an input (a signal input or a decorator input), otherwise by assigning the plain field.\n * @param control - The created type control.\n * @param field - Name of the field.\n * @param value - Value to set.\n */\nfunction setTypeControlField(\n control: ComponentRef<NgDocTypeControl>,\n field: keyof NgDocTypeControl,\n value: unknown,\n): void {\n const input = reflectComponentType(control.componentType)?.inputs.find(\n ({ propName }: { propName: string }) => propName === field,\n );\n\n if (input) {\n control.setInput(input.templateName, value);\n } else {\n (control.instance as unknown as Record<string, unknown>)[field] = value;\n }\n}\n","@if (labelWrapper()) {\n <label\n class=\"ng-doc-playground-property-label\"\n [class.with-label]=\"!option()?.hideLabel\"\n [ng-doc-label]=\"option()?.hideLabel ? '' : labelContent\">\n <ng-container #propertyOutlet></ng-container>\n </label>\n} @else {\n <!-- A control with several interactive parts: a label would forward clicks on them to the first\n of them, so the caption names the control through aria-labelledby instead. -->\n <div\n class=\"ng-doc-playground-property-label ng-doc-playground-property-group\"\n role=\"group\"\n [class.with-label]=\"!option()?.hideLabel\"\n [attr.aria-labelledby]=\"option()?.hideLabel ? null : captionId\">\n @if (!option()?.hideLabel) {\n <span class=\"ng-doc-label\" [id]=\"captionId\">\n <ng-container [ngTemplateOutlet]=\"labelContent\"></ng-container>\n </span>\n }\n <span class=\"ng-doc-content\">\n <ng-container #propertyOutlet></ng-container>\n </span>\n </div>\n}\n<ng-template #labelContent>\n <span\n class=\"ng-doc-playground-property-name\"\n [ngDocTooltip]=\"tooltipTemplate\"\n [canOpen]=\"!!tooltipContent()\"\n [positions]=\"['left-center', 'top-right', 'bottom-right']\"\n >{{ name() }}</span\n >\n @if (typeChip(); as type) {\n <ng-doc-kind-icon [kind]=\"type\" type=\"type\"></ng-doc-kind-icon>\n }\n <ng-template #tooltipTemplate>\n <div [innerHTML]=\"tooltipContent() | ngDocSanitizeHtml\"></div>\n </ng-template>\n</ng-template>\n","import { KeyValuePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n InjectionToken,\n Injector,\n input,\n isDevMode,\n model,\n output,\n Signal,\n} from '@angular/core';\nimport { FormControl, FormGroup, FormsModule } from '@angular/forms';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport { NgDocProvidedTypeControl } from '@ng-doc/app/interfaces';\nimport { getTokenForType } from '@ng-doc/app/providers/type-control';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperties,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n NgDocBindPipe,\n NgDocCheckboxComponent,\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n/**\n * Orders inputs without an `order` by name in English whatever the locale, so a prerendered\n * playground does not depend on the machine that built it.\n */\nconst INPUT_ORDER = new Intl.Collator('en');\n\n/**\n * The playground inspector: the demos, and beside them (below them in a container narrower than\n * 640px) the Recreate setting and a control per input and content slot.\n */\n@Component({\n selector: 'ng-doc-playground-properties',\n templateUrl: './playground-properties.component.html',\n styleUrls: ['./playground-properties.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocCheckboxComponent,\n FormsModule,\n NgDocTooltipDirective,\n NgDocIconComponent,\n NgDocPlaygroundPropertyComponent,\n KeyValuePipe,\n NgDocBindPipe,\n NgDocExecutePipe,\n ],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n P extends NgDocPlaygroundProperties,\n C extends Record<string, NgDocPlaygroundContent>,\n> {\n private readonly injector = inject(Injector);\n\n /** The form of the playground. */\n readonly form = input.required<FormGroup<NgDocPlaygroundForm>>();\n\n /** The inputs of the playground's target. */\n readonly properties = input<P | undefined>(undefined);\n\n /** Inputs that get no control. */\n readonly ignoreInputs = input<string[] | undefined>([]);\n\n /** Content slots of the playground. */\n readonly dynamicContent = input<C | undefined>(undefined);\n\n /** Default values of the inputs; the inspector renders once they are known. */\n readonly defaultValues = input<Record<string, unknown> | undefined>(undefined);\n\n /** Whether the inspector is hidden, leaving the demos only. */\n readonly hideSidePanel = input<boolean>(false);\n\n /** Where the inspector goes: right of the demos, or below them at full width. */\n readonly inspectorPosition = input<'right' | 'bottom'>('right');\n\n /** Whether the demo is recreated each time an input changes. */\n readonly recreateDemo = model<boolean>(false);\n\n /** Whether the Recreate setting is fixed by the playground's options and hidden. */\n readonly recreateLocked = input<boolean>(false);\n\n /** Whether the Reset button is shown. */\n readonly showResetButton = input<boolean>(false);\n\n /** Emits when the reader resets the form. */\n readonly resetForm = output<void>();\n\n /** The control of each input, in display order. */\n protected readonly propertyControls: Signal<NgDocPlaygroundPropertyControl[]> = computed(() => {\n const properties: P | undefined = this.properties();\n const ignoreInputs: string[] | undefined = this.ignoreInputs();\n\n if (!properties) {\n return [];\n }\n\n return objectKeys(properties)\n .filter((key: keyof P) => ignoreInputs?.includes(String(key)) !== true)\n .map((key: keyof P) => {\n const property: NgDocPlaygroundProperty = properties[key];\n const typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n return typeControl ? { propertyName: String(key), property, typeControl } : null;\n })\n .filter(isPresent)\n .sort(\n (a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) =>\n compareOrder(a.property.order, b.property.order) ?? compareByTypeControl(a, b),\n );\n });\n\n /**\n * The controls in sections: the inputs without a group first, then a section per group, in the\n * order of the group's first input.\n */\n protected readonly propertySections: Signal<NgDocPlaygroundPropertySection[]> = computed(() => {\n const sections = new Map<string | undefined, NgDocPlaygroundPropertyControl[]>([\n [undefined, []],\n ]);\n\n for (const control of this.propertyControls()) {\n const group: string | undefined = control.property.group || undefined;\n\n sections.set(group, [...(sections.get(group) ?? []), control]);\n }\n\n return Array.from(sections, ([group, controls]) => ({\n title: group ?? 'Settings',\n controls,\n })).filter((section: NgDocPlaygroundPropertySection) => section.controls.length > 0);\n });\n\n /** The control of content slots. */\n protected readonly contentTypeControl?: NgDocProvidedTypeControl =\n this.getControlForType('boolean');\n\n /**\n * The form control of an input or a content slot.\n * @param controlType - `properties` or `content`.\n * @param key - Name of the input or slot.\n */\n getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl {\n return this.form().get(controlType)?.get(key) as FormControl;\n }\n\n private getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n const type: string = property.type;\n const primitive: string | undefined = optionalPrimitive(type);\n const typeControl: NgDocProvidedTypeControl | undefined =\n this.getControlForType(type) ??\n (primitive ? this.getControlForType(primitive) : undefined) ??\n this.getControlForTypeAlias(\n isPlaygroundProperty(property) ? property.options : undefined,\n property.isManual,\n );\n\n if (!typeControl && isDevMode()) {\n console.warn(\n `NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n );\n }\n\n return typeControl;\n }\n\n private getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n return token ? this.injector.get(token) : undefined;\n }\n\n private getControlForTypeAlias(\n options?: Array<string | NgDocPlaygroundOption>,\n isManual?: boolean,\n ): NgDocProvidedTypeControl | undefined {\n if (options && options.length) {\n let optionsIsValid: boolean = true;\n\n try {\n // checking that all values are extractable\n options.forEach((item: string | NgDocPlaygroundOption) =>\n resolvePlaygroundOption(item, isManual),\n );\n } catch {\n optionsIsValid = false;\n }\n\n if (optionsIsValid) {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined =\n getTokenForType('NgDocTypeAlias');\n\n return token ? this.injector.get(token) : undefined;\n }\n }\n\n return undefined;\n }\n}\n\n/** A titled list of controls in the inspector. */\ninterface NgDocPlaygroundPropertySection {\n title: string;\n controls: NgDocPlaygroundPropertyControl[];\n}\n\n/**\n * Compares the `order` of two inputs from the playground's `controls`: inputs with one come first,\n * lowest first.\n * @param a - The first input's order.\n * @param b - The second input's order.\n * @returns The comparison, or `undefined` when neither input has an order or both have the same.\n */\nfunction compareOrder(a: number | undefined, b: number | undefined): number | undefined {\n if (isPresent(a) && isPresent(b)) {\n return a - b || undefined;\n }\n if (isPresent(a)) {\n return -1;\n }\n if (isPresent(b)) {\n return 1;\n }\n return undefined;\n}\n\n/**\n * Compares two inputs by the order of their type controls: controls with an order first, lowest\n * first (equal orders keep the inputs' order), then the others by name.\n * @param a - The first input.\n * @param b - The second input.\n */\nfunction compareByTypeControl(\n a: NgDocPlaygroundPropertyControl,\n b: NgDocPlaygroundPropertyControl,\n): number {\n const aOrder: number | undefined = a.typeControl.options?.order;\n const bOrder: number | undefined = b.typeControl.options?.order;\n\n if (isPresent(aOrder) && isPresent(bOrder)) {\n return aOrder - bOrder;\n }\n if (isPresent(aOrder)) {\n return -1;\n }\n if (isPresent(bOrder)) {\n return 1;\n }\n return INPUT_ORDER.compare(a.property.inputName, b.property.inputName);\n}\n\n/** The types whose control also edits an optional or nullable input of the type. */\nconst PRIMITIVE_TYPES: ReadonlySet<string> = new Set(['string', 'number', 'boolean']);\n\n/**\n * The primitive of an optional or nullable primitive input type, such as `string` of\n * `string | undefined` (an optional `@Input() label?: string`, `input<string>()` or\n * `model<string>()`) or of `number | null`, so that the input gets the primitive's control.\n * Other types are matched by their exact name only: a custom control registered for `Position`\n * does not receive the `undefined` of a `Position | undefined` input unless it is registered for\n * that type too.\n * @param type - The input type as the builder printed it.\n * @returns The primitive, or `undefined` when the type is not one.\n */\nfunction optionalPrimitive(type: string): string | undefined {\n const members: string[] = type.split('|').map((member: string) => member.trim());\n const rest: string[] = members.filter(\n (member: string) => member !== 'undefined' && member !== 'null',\n );\n\n return rest.length === 1 && rest.length < members.length && PRIMITIVE_TYPES.has(rest[0])\n ? rest[0]\n : undefined;\n}\n","@if (defaultValues(); as defaultValues) {\n <div\n class=\"ng-doc-playground-properties-wrapper\"\n [class.no-side-panel]=\"hideSidePanel()\"\n [class.inspector-bottom]=\"inspectorPosition() === 'bottom'\">\n <div class=\"ng-doc-playground-demos\">\n <ng-content></ng-content>\n </div>\n @if (!hideSidePanel()) {\n <div class=\"ng-doc-playground-properties\">\n <div class=\"ng-doc-playground-header\">\n <h4>Playground</h4>\n @if (showResetButton()) {\n <button type=\"button\" class=\"ng-doc-playground-reset\" (click)=\"resetForm.emit()\">\n Reset\n </button>\n }\n </div>\n @if (!recreateLocked()) {\n <div class=\"ng-doc-playground-setting\">\n <ng-doc-checkbox [ngModel]=\"recreateDemo()\" (ngModelChange)=\"recreateDemo.set($event)\">\n Recreate\n </ng-doc-checkbox>\n <ng-doc-icon\n class=\"ng-doc-playground-info\"\n icon=\"info\"\n role=\"img\"\n aria-label=\"Recreates the demo every time one of the inputs changes\"\n [ngDocTooltip]=\"'Recreates the demo every time one of the inputs changes'\"\n [positions]=\"['bottom-right', 'left-center']\"></ng-doc-icon>\n </div>\n }\n <div class=\"ng-doc-playground-divider\"></div>\n @for (section of propertySections(); track $index) {\n <h5 class=\"ng-doc-title\">{{ section.title }}</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (propertyControl of section.controls; track propertyControl.propertyName) {\n <ng-doc-playground-property\n [name]=\"propertyControl.property.label ?? propertyControl.property.inputName\"\n [property]=\"propertyControl.property\"\n [typeControl]=\"propertyControl.typeControl\"\n [defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n [control]=\"\n getFormControl | bind: this | execute: 'properties' : propertyControl.propertyName\n \">\n </ng-doc-playground-property>\n }\n </div>\n }\n @if ((dynamicContent() | keyvalue)?.length) {\n <h5 class=\"ng-doc-title\">Content</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (content of dynamicContent() | keyvalue; track content.key) {\n <ng-doc-playground-property\n [name]=\"content.value.label\"\n [property]=\"content.value\"\n [typeControl]=\"contentTypeControl\"\n [control]=\"getFormControl | bind: this | execute: 'content' : content.key\">\n </ng-doc-playground-property>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n InputSignal,\n linkedSignal,\n Signal,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { isSameObject } from '@ng-doc/core/helpers/is-same-object';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundConfig,\n NgDocPlaygroundOptions,\n NgDocPlaygroundProperties,\n} from '@ng-doc/core/interfaces';\nimport { NgDocAsArrayPipe } from '@ng-doc/ui-kit';\n\nimport { NgDocPlaygroundDemoComponent } from './playground-demo/playground-demo.component';\nimport { NgDocPlaygroundForm } from './playground-form';\nimport { NgDocPlaygroundPropertiesComponent } from './playground-properties/playground-properties.component';\n\n/**\n * A playground: an inspector with a control per input and content slot of its target, and a demo\n * per selector (or the pipe) rendered with the chosen values.\n */\n@Component({\n selector: 'ng-doc-playground',\n templateUrl: './playground.component.html',\n styleUrls: ['./playground.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocPlaygroundPropertiesComponent, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe],\n})\nexport class NgDocPlaygroundComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements AfterViewInit\n{\n private readonly rootPage = inject(NgDocRootPage);\n private readonly formBuilder = inject(FormBuilder);\n\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input.required<string>();\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selectors of the target to render a demo for. */\n readonly selectors: InputSignal<string[]> = input<string[]>([]);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Options of the playground action; they extend the playground configuration. */\n readonly options: InputSignal<NgDocPlaygroundOptions> = input<NgDocPlaygroundOptions>({});\n\n /** The values of the inputs and content slots. */\n readonly formGroup: WritableSignal<FormGroup<NgDocPlaygroundForm> | undefined> =\n signal(undefined);\n\n /** The default values of the target's inputs, reported by the first demo. */\n readonly defaultValues: WritableSignal<Record<string, unknown> | undefined> = signal(undefined);\n\n /** The playground configuration of the page, extended by the options. */\n readonly configuration: Signal<NgDocPlaygroundConfig> = computed(() =>\n Object.assign({}, this.rootPage.page?.playgrounds?.[this.id()], this.options()),\n );\n\n /**\n * Whether the demo is created again each time a value changes. It starts from the `recreate`\n * option; the reader can change it unless the option is `'always'`.\n */\n readonly recreateDemo: WritableSignal<boolean> = linkedSignal(\n () => !!this.configuration().recreate,\n );\n\n /** Whether the Recreate setting is fixed on, and hidden, by the `'always'` option. */\n readonly recreateLocked: Signal<boolean> = computed(\n () => this.configuration().recreate === 'always',\n );\n\n private defaultProperties: Record<string, unknown> = {};\n private defaultContent: Record<string, boolean> = {};\n\n ngAfterViewInit(): void {\n this.defaultProperties = this.getPropertiesFormValues();\n this.defaultContent = this.getContentFormValues();\n\n // `FormBuilder` reads an array as `[value, validators]`, so each value is wrapped: the default\n // of an array input is the value of its control.\n const propertiesForm: FormGroup = this.formBuilder.group(\n Object.fromEntries(\n Object.entries(this.defaultProperties).map(([key, value]) => [key, [value]]),\n ),\n );\n const contentForm: FormGroup = this.formBuilder.group(this.defaultContent);\n const formGroup: FormGroup<NgDocPlaygroundForm> = this.formBuilder.group({\n properties: propertiesForm,\n content: contentForm,\n });\n\n // `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n formGroup.patchValue({\n properties: Object.assign({}, this.defaultProperties, this.configuration().inputs),\n content: this.defaultContent,\n });\n this.formGroup.set(formGroup);\n }\n\n protected isDefaultState(): boolean {\n const formGroup = this.formGroup();\n\n if (!formGroup) {\n return false;\n }\n\n return (\n isSameObject(formGroup.value.properties ?? {}, this.defaultValues() ?? {}) &&\n isSameObject(formGroup.value.content ?? {}, this.defaultContent ?? {})\n );\n }\n\n private getPropertiesFormValues(): Record<string, unknown> {\n const defaultValues = this.defaultValues();\n const formValues: Record<string, unknown> = objectKeys(this.properties() ?? {}).reduce(\n (controls: Record<string, unknown>, key: string) => {\n controls[key] = defaultValues ? defaultValues[key] : undefined;\n\n return controls;\n },\n {} as Record<string, unknown>,\n );\n\n return Object.assign({}, formValues, this.configuration().defaults);\n }\n\n private getContentFormValues(): Record<string, boolean> {\n return objectKeys(this.configuration().content ?? {}).reduce(\n (controls: Record<string, boolean>, key: string) => {\n controls[key] = false;\n\n return controls;\n },\n {} as Record<keyof T, boolean>,\n );\n }\n\n /** Sets every input and content slot back to its default value. */\n resetForm(): void {\n const formGroup = this.formGroup();\n\n formGroup?.reset({}, { emitEvent: false });\n formGroup?.patchValue({\n properties: this.defaultProperties,\n content: this.defaultContent,\n });\n }\n}\n","@if (configuration(); as configuration) {\n <ng-doc-playground-properties\n [form]=\"formGroup()!\"\n [properties]=\"properties()\"\n [ignoreInputs]=\"configuration.hiddenInputs\"\n [dynamicContent]=\"configuration.content\"\n [hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n [inspectorPosition]=\"configuration.inspectorPosition ?? 'right'\"\n [defaultValues]=\"defaultValues()\"\n [showResetButton]=\"!isDefaultState()\"\n [(recreateDemo)]=\"recreateDemo\"\n [recreateLocked]=\"recreateLocked()\"\n (resetForm)=\"resetForm()\">\n @for (selector of configuration.selectors ?? selectors() | asArray; track selector) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [selector]=\"selector\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\"\n [expanded]=\"configuration.expanded ?? false\">\n </ng-doc-playground-demo>\n }\n @if (pipeName()) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [pipeName]=\"pipeName()\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\">\n </ng-doc-playground-demo>\n }\n </ng-doc-playground-properties>\n}\n","import {\n ChangeDetectorRef,\n Directive,\n inject,\n input,\n InputSignal,\n OnInit,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { extractFunctionDefaults } from '@ng-doc/core/helpers/extract-function-defaults';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\nimport { Constructor } from '@ng-doc/core/types';\nimport { Observable, Subject, take } from 'rxjs';\n\nimport { NgDocPlaygroundComponent } from './playground.component';\n\n/**\n * Base class of the playground classes the builder generates, one per playground and selector.\n * A generated class renders the playground template with the target's inputs bound to\n * `properties()`, and queries the target with `viewChild()`.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n static readonly selector: string = 'unknown';\n\n /** The class the playground shows: a component, a directive or a pipe. */\n abstract readonly target: Constructor<unknown>;\n\n /** The instance of the target in the playground template; a pipe has none. */\n abstract readonly playground: Signal<unknown>;\n\n /** The view container of the target in the playground template; a pipe has none. */\n abstract readonly viewContainerRef: Signal<ViewContainerRef | undefined>;\n\n /** The `data` of the playground configuration. */\n abstract readonly configData: Record<string, unknown>;\n\n /** Values of the target's inputs, by property name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly properties: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The `data` given to the playground action; it extends the configuration's `data`. */\n readonly actionData: InputSignal<Record<string, unknown>> = input<Record<string, unknown>>({});\n\n /** Whether each content slot is shown, by slot name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly content: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The default values of the target's inputs, read before the template binds them. */\n defaultValues: Record<string, unknown> = {};\n\n private readonly reattached: Subject<void> = new Subject<void>();\n private readonly playgroundContainer: NgDocPlaygroundComponent = inject(NgDocPlaygroundComponent);\n protected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n constructor() {\n // The view is not checked until the default values of the target are read, so the\n // template's bindings cannot overwrite them first.\n this.changeDetectorRef.detach();\n }\n\n /** Emits once, after the view is attached again and checks the template's bindings. */\n get onReattached(): Observable<void> {\n return this.reattached.pipe(take(1));\n }\n\n /** The playground `data`: the configuration's data extended by the action's data. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get data(): any {\n return Object.assign({}, this.configData, this.actionData());\n }\n\n ngOnInit(): void {\n // The target is created with the view, but the view has not been checked yet, so its inputs\n // still hold their defaults. Signal inputs are read by calling them.\n const playground = this.playground() as Record<string, unknown> | undefined;\n\n if (playground) {\n this.defaultValues = Object.keys(playground).reduce(\n (values: Record<string, unknown>, key: string) => {\n try {\n const value: unknown = playground[key];\n\n values[key] = typeof value === 'function' ? value.call(playground) : value;\n } catch {\n // Some properties are getters or functions that throw without their context.\n }\n\n return values;\n },\n {},\n );\n } else if (this.target) {\n // A pipe: the defaults of its `transform` parameters after the value itself.\n const defaults = extractFunctionDefaults(\n (this.target.prototype as { transform: (...args: unknown[]) => unknown }).transform,\n );\n\n this.defaultValues = Object.keys(this.playgroundContainer.properties() ?? {}).reduce(\n (values: Record<string, unknown>, key: string, i: number) => {\n values[key] = defaults[i + 1];\n\n return values;\n },\n {},\n );\n } else {\n throw new Error('Playground is not defined or initialized');\n }\n\n if (!this.playgroundContainer.defaultValues()) {\n this.playgroundContainer.defaultValues.set(this.defaultValues);\n }\n\n // The demo sets the playground's inputs right after it creates this view; the view is\n // attached again once they are set, so its first check renders the playground's values.\n Promise.resolve().then(() => {\n this.changeDetectorRef.reattach();\n this.changeDetectorRef.markForCheck();\n this.reattached.next();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA;;;AAGG;MAQU,4BAA4B,CAAA;AAPzC,IAAA,WAAA,GAAA;;QAaW,IAAA,CAAA,EAAE,GAAwB,KAAK,CAAS,EAAE;+EAAC;;QAG3C,IAAA,CAAA,QAAQ,GAAwB,KAAK,CAAS,EAAE;qFAAC;;QAGjD,IAAA,CAAA,QAAQ,GAAwB,KAAK,CAAS,EAAE;qFAAC;;QAGjD,IAAA,CAAA,aAAa,GAAmD,KAAK,CAE5E,SAAS;0FAAC;;QAGH,IAAA,CAAA,UAAU,GAA+B,KAAK,CAAgB,SAAS;uFAAC;;QAGxE,IAAA,CAAA,YAAY,GAAyB,KAAK,CAAU,KAAK;yFAAC;;QAG1D,IAAA,CAAA,IAAI,GAA4D,KAAK,CAE5E,SAAS;iFAAC;;QAGH,IAAA,CAAA,QAAQ,GAAyB,KAAK,CAAU,KAAK;qFAAC;;QAGtD,IAAA,CAAA,UAAU,GAAyC,SAAS,CAAC,YAAY,kFAChF,IAAI,EAAE,gBAAgB,EAAA,CACtB;QAKiB,I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AA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBADxC;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-doc-app-components-playground.mjs","sources":["../../../../libs/app/components/playground/playground-container.ts","../../../../libs/app/components/playground/base-playground.ts","../../../../libs/app/components/playground/playground-demo/playground-demo.component.ts","../../../../libs/app/components/playground/playground-demo/playground-demo.component.html","../../../../libs/app/components/playground/playground-array-type.ts","../../../../libs/app/components/playground/playground-property/playground-property.component.ts","../../../../libs/app/components/playground/playground-property/playground-property.component.html","../../../../libs/app/components/playground/playground-properties/playground-properties.component.ts","../../../../libs/app/components/playground/playground-properties/playground-properties.component.html","../../../../libs/app/components/playground/playground.component.ts","../../../../libs/app/components/playground/playground.component.html","../../../../libs/app/components/playground/playground-host/playground-host.component.ts","../../../../libs/app/components/playground/ng-doc-app-components-playground.ts"],"sourcesContent":["import { InjectionToken, Signal, WritableSignal } from '@angular/core';\n\n/**\n * What a generated playground class needs from the playground that shows it: the target's inputs\n * (the order of a pipe's parameters) and the place to report the target's default input values.\n * The playground on the documentation page provides it, and so does the page of an isolated\n * playground in the demo application, which shows the class without the rest of the playground.\n * @internal\n */\nexport interface ɵNgDocPlaygroundContainer {\n /** The inputs of the target, by name: only the names, in order, are read. */\n readonly properties: Signal<Readonly<Record<string, unknown>> | undefined>;\n /** The default values of the target's inputs, reported by the first class created. */\n readonly defaultValues: WritableSignal<Record<string, unknown> | undefined>;\n}\n\n/**\n * The playground that shows a generated playground class.\n * @internal\n */\nexport const ɵNG_DOC_PLAYGROUND_CONTAINER = new InjectionToken<ɵNgDocPlaygroundContainer>(\n 'NG_DOC_PLAYGROUND_CONTAINER',\n);\n","import {\n ChangeDetectorRef,\n Directive,\n inject,\n input,\n InputSignal,\n OnInit,\n Signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { extractFunctionDefaults } from '@ng-doc/core/helpers/extract-function-defaults';\nimport { NgDocPlaygroundConfig } from '@ng-doc/core/interfaces';\nimport { Constructor } from '@ng-doc/core/types';\nimport { Observable, Subject, take } from 'rxjs';\n\nimport { ɵNG_DOC_PLAYGROUND_CONTAINER, ɵNgDocPlaygroundContainer } from './playground-container';\n\n/**\n * Base class of the playground classes the builder generates, one per playground and selector.\n * A generated class renders the playground template with the target's inputs bound to\n * `properties()`, and queries the target with `viewChild()`.\n */\n@Directive()\nexport abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {\n static readonly selector: string = 'unknown';\n\n /** The class the playground shows: a component, a directive or a pipe. */\n abstract readonly target: Constructor<unknown>;\n\n /** The instance of the target in the playground template; a pipe has none. */\n abstract readonly playground: Signal<unknown>;\n\n /** The view container of the target in the playground template; a pipe has none. */\n abstract readonly viewContainerRef: Signal<ViewContainerRef | undefined>;\n\n /** The `data` of the playground configuration. */\n abstract readonly configData: Record<string, unknown>;\n\n /** Values of the target's inputs, by property name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly properties: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The `data` given to the playground action; it extends the configuration's `data`. */\n readonly actionData: InputSignal<Record<string, unknown>> = input<Record<string, unknown>>({});\n\n /** Whether each content slot is shown, by slot name. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly content: InputSignal<Record<string, any>> = input<Record<string, any>>({});\n\n /** The default values of the target's inputs, read before the template binds them. */\n defaultValues: Record<string, unknown> = {};\n\n private readonly reattached: Subject<void> = new Subject<void>();\n private readonly playgroundContainer: ɵNgDocPlaygroundContainer = inject(\n ɵNG_DOC_PLAYGROUND_CONTAINER,\n );\n protected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n constructor() {\n // The view is not checked until the default values of the target are read, so the\n // template's bindings cannot overwrite them first.\n this.changeDetectorRef.detach();\n }\n\n /** Emits once, after the view is attached again and checks the template's bindings. */\n get onReattached(): Observable<void> {\n return this.reattached.pipe(take(1));\n }\n\n /** The playground `data`: the configuration's data extended by the action's data. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get data(): any {\n return Object.assign({}, this.configData, this.actionData());\n }\n\n ngOnInit(): void {\n // The target is created with the view, but the view has not been checked yet, so its inputs\n // still hold their defaults. Signal inputs are read by calling them.\n const playground = this.playground() as Record<string, unknown> | undefined;\n\n if (playground) {\n this.defaultValues = Object.keys(playground).reduce(\n (values: Record<string, unknown>, key: string) => {\n try {\n const value: unknown = playground[key];\n\n values[key] = typeof value === 'function' ? value.call(playground) : value;\n } catch {\n // Some properties are getters or functions that throw without their context.\n }\n\n return values;\n },\n {},\n );\n } else if (this.target) {\n // A pipe: the defaults of its `transform` parameters after the value itself.\n const defaults = extractFunctionDefaults(\n (this.target.prototype as { transform: (...args: unknown[]) => unknown }).transform,\n );\n\n this.defaultValues = Object.keys(this.playgroundContainer.properties() ?? {}).reduce(\n (values: Record<string, unknown>, key: string, i: number) => {\n values[key] = defaults[i + 1];\n\n return values;\n },\n {},\n );\n } else {\n throw new Error('Playground is not defined or initialized');\n }\n\n if (!this.playgroundContainer.defaultValues()) {\n this.playgroundContainer.defaultValues.set(this.defaultValues);\n }\n\n // The demo sets the playground's inputs right after it creates this view; the view is\n // attached again once they are set, so its first check renders the playground's values.\n Promise.resolve().then(() => {\n this.changeDetectorRef.reattach();\n this.changeDetectorRef.markForCheck();\n this.reattached.next();\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n inject,\n InjectionToken,\n Injector,\n input,\n InputSignal,\n model,\n OnChanges,\n OnDestroy,\n output,\n PendingTasks,\n Signal,\n signal,\n SimpleChanges,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroup } from '@angular/forms';\nimport { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';\nimport {\n NgDocDemoFrameComponent,\n NgDocDemoThemeButtonComponent,\n} from '@ng-doc/app/components/demo-frame';\nimport { ɵNgDocPlaygroundFrameMessage } from '@ng-doc/app/demo-app';\nimport { formatHtml } from '@ng-doc/app/helpers';\nimport { getPlaygroundDemoToken } from '@ng-doc/app/providers/playground-demo';\nimport { NgDocFormPartialValue } from '@ng-doc/app/types';\nimport {\n buildPlaygroundDemoPipeTemplate,\n buildPlaygroundDemoTemplate,\n} from '@ng-doc/core/helpers/build-playground-demo-template';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { stringify } from '@ng-doc/core/helpers/stringify';\nimport { NgDocPlaygroundConfig, NgDocPlaygroundProperties } from '@ng-doc/core/interfaces';\nimport { Subject } from 'rxjs';\nimport { startWith, takeUntil } from 'rxjs/operators';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { NgDocPlaygroundForm } from '../playground-form';\n\n/**\n * The iframe an isolated playground shows a target in: the URL of the target's page in the demo\n * application, the fragment with the current state, and the iframe's accessible title.\n * @internal\n */\nexport interface ɵNgDocPlaygroundFrame {\n readonly url: string;\n readonly fragment: string;\n readonly title: string;\n}\n\n/**\n * One demo of a playground: it creates the generated playground class of its selector (or pipe),\n * passes it the form's values and shows the code of the current state. In an isolated playground\n * the class runs on a page of the demo application in an iframe, which gets the values from its\n * URL fragment, and reports the target's defaults back for the code view.\n */\n@Component({\n selector: 'ng-doc-playground-demo',\n templateUrl: './playground-demo.component.html',\n styleUrls: ['./playground-demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocDemoDisplayerComponent, NgDocDemoFrameComponent, NgDocDemoThemeButtonComponent],\n})\nexport class NgDocPlaygroundDemoComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n >\n implements OnChanges, OnDestroy\n{\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input<string>('');\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selector of the target this demo renders. */\n readonly selector: InputSignal<string> = input<string>('');\n\n /** The playground configuration, extended by the action's options. */\n readonly configuration: InputSignal<NgDocPlaygroundConfig | undefined> = input<\n NgDocPlaygroundConfig | undefined\n >(undefined);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Whether the demo is created again each time a value changes. */\n readonly recreateDemo: InputSignal<boolean> = input<boolean>(false);\n\n /** The values of the inputs and content slots. */\n readonly form: InputSignal<FormGroup<NgDocPlaygroundForm> | undefined> = input<\n FormGroup<NgDocPlaygroundForm> | undefined\n >(undefined);\n\n /** Whether the code of the demo is shown. */\n readonly expanded: InputSignal<boolean> = input<boolean>(false);\n\n /** The iframe of an isolated playground; without it, the class is created in the page. */\n readonly frame: InputSignal<ɵNgDocPlaygroundFrame | undefined> = input<\n ɵNgDocPlaygroundFrame | undefined\n >(undefined);\n\n /** The defaults of the target's inputs that the iframe reported, for the code view. */\n readonly frameDefaults: InputSignal<Record<string, unknown> | undefined> = input<\n Record<string, unknown> | undefined\n >(undefined);\n\n /** The messages of the iframe of an isolated playground. */\n readonly frameMessage = output<ɵNgDocPlaygroundFrameMessage>();\n\n /** The iframe's page loaded but did not report the target in time. */\n readonly frameSilent = output<void>();\n\n /** The theme of the iframe, which the theme button beside the demo changes. */\n readonly frameTheme = model<string | undefined>(undefined);\n\n /** The `theme` option of the playground, which the theme button offers too. */\n readonly configuredTheme = input<string | undefined>(undefined);\n\n /** The iframe of an isolated playground, while it is shown. */\n private readonly frameComponent = viewChild(NgDocDemoFrameComponent);\n\n /**\n * The background of the canvas while the iframe shows a theme of its own: the background its\n * page reported, so the whole canvas reads in that theme.\n */\n protected readonly canvasBackground: Signal<string | undefined> = computed(() =>\n this.frame() && this.frameTheme() !== undefined\n ? this.frameComponent()?.background()\n : undefined,\n );\n\n /** The dots of the canvas while the iframe shows a theme of its own, in that theme's color. */\n protected readonly canvasDots: Signal<string | undefined> = computed(() =>\n this.canvasBackground() ? this.frameComponent()?.dots() : undefined,\n );\n\n /** The iframe's page with the current state, which the toolbar opens in a new tab. */\n protected readonly frameUrl: Signal<string | undefined> = computed(() => {\n const frame = this.frame();\n\n return frame ? `${frame.url}#${frame.fragment}` : undefined;\n });\n\n /** Where the playground class is created. */\n readonly demoOutlet: Signal<ViewContainerRef | undefined> = viewChild('demoOutlet', {\n read: ViewContainerRef,\n });\n\n /** The generated playground class of this demo's selector or pipe. */\n playgroundDemo?: typeof NgDocBasePlayground;\n\n protected readonly code = signal('');\n\n protected readonly injector = inject(Injector);\n protected readonly destroyRef = inject(DestroyRef);\n private readonly pendingTasks = inject(PendingTasks);\n\n private demoRef?: ComponentRef<NgDocBasePlayground>;\n private readonly unsubscribe$: Subject<void> = new Subject<void>();\n\n async ngOnChanges({ form, id, frame }: SimpleChanges): Promise<void> {\n // A playground that falls back from its iframe to the page creates its class in the page.\n if (frame && !frame.firstChange && !this.frame()) {\n await this.updateDemo(this.form()?.value);\n }\n if (form || id) {\n this.unsubscribe$.next();\n\n const demoInjector: InjectionToken<Array<typeof NgDocBasePlayground>> | undefined =\n getPlaygroundDemoToken(this.id());\n\n if (demoInjector) {\n const demos: Array<typeof NgDocBasePlayground> = this.injector.get(demoInjector, []);\n\n this.playgroundDemo = demos.find(\n (demo: typeof NgDocBasePlayground) =>\n demo.selector === this.selector() || demo.selector === this.pipeName(),\n );\n }\n\n const form = this.form();\n\n if (!form) {\n // No values yet: the class is created so that it reports the target's defaults.\n await this.updateDemo();\n return;\n }\n // The form's values reach the class synchronously, in this check: the class may already be\n // attached again, and checked with no values its target would get `undefined` for every\n // input instead of its default.\n form.valueChanges\n .pipe(\n startWith(form.value),\n takeUntil(this.unsubscribe$),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe((data: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>) =>\n this.updateDemo(data),\n );\n }\n }\n\n private async updateDemo(\n data?: NgDocFormPartialValue<FormGroup<NgDocPlaygroundForm>>,\n ): Promise<void> {\n if (this.frame()) {\n await this.updateCodeView();\n return;\n }\n if (this.recreateDemo() || !this.demoRef) {\n this.createDemo();\n }\n\n if (data) {\n this.demoRef?.setInput('properties', data.properties ?? {});\n this.demoRef?.setInput('content', data.content ?? {});\n this.demoRef?.setInput('actionData', this.configuration()?.data ?? {});\n\n if (this.recreateDemo()) {\n this.demoRef?.instance.onReattached.subscribe(() => {\n this.demoRef?.changeDetectorRef.detectChanges();\n });\n }\n }\n\n await this.updateCodeView();\n }\n\n private createDemo(): void {\n if (this.playgroundDemo) {\n this.demoRef?.destroy();\n this.demoRef = this.demoOutlet()?.createComponent(\n this.playgroundDemo as unknown as Type<NgDocBasePlayground>,\n );\n this.demoRef?.changeDetectorRef.markForCheck();\n }\n }\n\n private async updateCodeView(): Promise<void> {\n const template: string = this.pipeName()\n ? buildPlaygroundDemoPipeTemplate(\n this.configuration()?.template ?? '',\n this.pipeName(),\n this.getActiveContent(),\n this.getPipeActiveInputs(),\n )\n : buildPlaygroundDemoTemplate(\n this.configuration()?.template ?? '',\n this.selector(),\n this.getActiveContent(),\n this.getActiveInputs(),\n );\n\n // Formatting loads the formatter asynchronously. Zoneless SSR waits only for pending tasks, so\n // the page would otherwise be serialized before the code view is filled.\n const done = this.pendingTasks.add();\n\n try {\n this.code.set(await formatHtml(template));\n } finally {\n done();\n }\n }\n\n private getActiveContent(): Record<string, string> {\n const formData: Record<string, boolean> =\n (this.form()?.controls.content.value as Record<string, boolean>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n result[key] = formData[key] ? this.configuration()?.content?.[key].template ?? '' : '';\n\n return result;\n }, {});\n }\n\n private getActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n\n return objectKeys(formData).reduce((result: Record<string, string>, key: string) => {\n const inputName = this.properties()?.[key]?.inputName ?? key;\n const value: unknown = formData[key];\n const property: unknown | undefined = this.defaultValue(key);\n\n if (property !== value) {\n result[inputName] = stringify(value).replace(/\"/g, `'`);\n }\n\n return result;\n }, {});\n }\n\n private getPipeActiveInputs(): Record<string, string> {\n const formData: Record<string, unknown> =\n (this.form()?.controls.properties.value as Record<string, unknown>) ?? {};\n let changedInputIndex: number = -1;\n\n return objectKeys(formData)\n .map((key: string, i: number) => {\n const value: unknown = formData[key];\n const defaultValue: unknown | undefined = this.defaultValue(key);\n\n if (defaultValue !== value) {\n changedInputIndex = i;\n }\n\n return key;\n })\n .slice(0, changedInputIndex + 1)\n .reduce((result: Record<string, string>, key: string) => {\n result[key] = stringify(formData[key]).replace(/\"/g, `'`);\n\n return result;\n }, {});\n }\n\n ngOnDestroy(): void {\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n }\n\n /**\n * The default of an input: from the class in the page, or as the iframe reported it.\n * @param key\n */\n private defaultValue(key: string): unknown {\n return this.frame() ? this.frameDefaults()?.[key] : this.demoRef?.instance?.defaultValues[key];\n }\n}\n","<ng-doc-demo-displayer\n [code]=\"code()\"\n [border]=\"false\"\n [expanded]=\"expanded()\"\n [newTabUrl]=\"frameUrl()\"\n [canvasBackground]=\"canvasBackground()\"\n [canvasDots]=\"canvasDots()\"\n language=\"angular-html\">\n @if (frame()) {\n <ng-doc-demo-theme-button\n ngDocDemoControl\n [(theme)]=\"frameTheme\"\n [configured]=\"configuredTheme()\" />\n }\n @if (frame(); as frame) {\n <ng-doc-demo-frame\n [src]=\"frame.url\"\n [fragment]=\"frame.fragment\"\n [playground]=\"true\"\n [frameTitle]=\"frame.title\"\n (playgroundMessage)=\"frameMessage.emit($event)\"\n (playgroundSilent)=\"frameSilent.emit()\" />\n }\n <!-- Static, so the class can be created before the first check (in ngOnChanges). An isolated\n playground leaves it empty. -->\n <ng-container #demoOutlet></ng-container>\n</ng-doc-demo-displayer>\n","/**\n * Reading an input type as an array type, which the inspector uses to choose the control of an\n * array input and the property row to leave out the type chip of one. Shared inside the playground\n * entry point only; not public API.\n */\n\n/**\n * The type that the control of array types without a control of their own is registered for.\n * NgDoc registers its JSON field for it, and `controls` can name it for an input.\n * @internal\n */\nexport const ARRAY_CONTROL_TYPE: string = 'NgDocArray';\n\n/**\n * The type that the control of arrays of a union of literals (arrays whose `options` the builder\n * lists) is registered for. NgDoc registers its multi-select for it, as it registers the select\n * of a union for `NgDocTypeAlias`, and `controls` can name it for an input.\n * @internal\n */\nexport const UNION_ARRAY_CONTROL_TYPE: string = 'NgDocTypeAlias[]';\n\n/** The item types whose arrays get the control registered for `<item>[]`, a chip field by default. */\nconst LIST_ITEM_TYPES: ReadonlySet<string> = new Set(['string', 'number']);\n\n/** Keywords that make a type ending in `[]` another type than an array, as in `keyof Item[]`. */\nconst TYPE_OPERATOR: RegExp = /^(?:keyof|typeof|unique|infer|asserts|new)\\s/;\n\n/**\n * An input type that is an array or a tuple.\n * @internal\n */\nexport interface NgDocArrayType {\n /** `string[]` or `number[]` for an array of strings or numbers, whatever its spelling. */\n list?: string;\n}\n\n/**\n * Reads an input type as an array type: `T[]` (as both engines print an array), `Array<T>`,\n * `readonly T[]`, `ReadonlyArray<T>` or a tuple such as `[string, number]`, alone or in a union\n * with `undefined` or `null` (an optional or nullable input). An array of strings or numbers gets\n * the control of `string[]` or `number[]`, so a control registered for that type replaces the\n * built-in list for every spelling; any other array gets the control of `NgDocArray`, the JSON\n * field. A type alias of an array (`type Tags = string[]`) is printed by its name and is not\n * recognized: register a control for the name.\n * @param type - The input type as the builder printed it.\n * @returns What the array type is, or `undefined` when the type is not one.\n * @internal\n */\nexport function arrayType(type: string): NgDocArrayType | undefined {\n const members: string[] = splitTopLevel(type);\n const rest: string[] = members.filter(\n (member: string) => member !== 'undefined' && member !== 'null',\n );\n\n if (rest.length !== 1) {\n return undefined;\n }\n\n const written: string = unwrapParentheses(rest[0]).replace(/^readonly\\s+/, '');\n const item: string | undefined = arrayItem(written);\n\n if (item !== undefined) {\n return LIST_ITEM_TYPES.has(item) ? { list: `${item}[]` } : {};\n }\n\n return written.startsWith('[') && written.endsWith(']') && isBalanced(written.slice(1, -1))\n ? {}\n : undefined;\n}\n\n/**\n * The item type of `T[]`, `Array<T>` or `ReadonlyArray<T>`.\n * @param type - A type that is not a union.\n */\nfunction arrayItem(type: string): string | undefined {\n const generic: RegExpExecArray | null = /^(?:Readonly)?Array<([\\s\\S]*)>$/.exec(type);\n\n if (generic) {\n return isBalanced(generic[1]) ? unwrapParentheses(generic[1].trim()) : undefined;\n }\n\n if (!type.endsWith('[]') || TYPE_OPERATOR.test(type)) {\n return undefined;\n }\n\n const item: string = type.slice(0, -2).trim();\n\n // `() => string[]` is a function, and `A extends B ? C[] : D[]` a conditional type.\n const text: string | undefined = item ? topLevelText(item) : undefined;\n\n return text !== undefined && !/=>|\\?/.test(text) ? unwrapParentheses(item) : undefined;\n}\n\n/**\n * Splits a type at the `|` of its top-level union, outside brackets and string literals.\n * @param type - The type.\n */\nfunction splitTopLevel(type: string): string[] {\n const text: string | undefined = topLevelText(type);\n\n if (text === undefined) {\n return [type.trim()];\n }\n\n const members: string[] = [];\n let start: number = 0;\n\n for (let index = 0; index < text.length; index++) {\n if (text[index] === '|') {\n members.push(type.slice(start, index).trim());\n start = index + 1;\n }\n }\n\n return [...members, type.slice(start).trim()];\n}\n\n/**\n * Removes the parentheses around a whole type, such as those of `(string | number)`.\n * @param type - The type.\n */\nfunction unwrapParentheses(type: string): string {\n let result: string = type.trim();\n\n while (result.startsWith('(') && result.endsWith(')') && isBalanced(result.slice(1, -1))) {\n result = result.slice(1, -1).trim();\n }\n\n return result;\n}\n\n/**\n * Whether every bracket and string literal of a type is closed in it.\n * @param type - The type.\n */\nfunction isBalanced(type: string): boolean {\n return topLevelText(type) !== undefined;\n}\n\n/**\n * The type with every character inside brackets or a string literal replaced by a space, so that\n * the operators of the type itself can be found by position; `undefined` when a bracket or a string\n * is not closed. The `>` of an arrow (`=>`) closes no bracket.\n * @param type - The type.\n */\nfunction topLevelText(type: string): string | undefined {\n let depth: number = 0;\n let quote: string | undefined;\n let text: string = '';\n\n for (let index = 0; index < type.length; index++) {\n const char: string = type[index];\n\n if (quote) {\n if (char === '\\\\') {\n index++;\n text += ' ';\n continue;\n }\n if (char === quote) {\n quote = undefined;\n }\n text += ' ';\n continue;\n }\n\n if (char === \"'\" || char === '\"' || char === '`') {\n quote = char;\n text += ' ';\n } else if ('([{<'.includes(char)) {\n depth++;\n text += ' ';\n } else if (char === '>' && type[index - 1] === '=') {\n text += depth ? ' ' : char;\n } else if (')]}>'.includes(char)) {\n depth--;\n text += ' ';\n\n if (depth < 0) {\n return undefined;\n }\n } else {\n text += depth ? ' ' : char;\n }\n }\n\n return depth === 0 && !quote ? text : undefined;\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n reflectComponentType,\n Signal,\n signal,\n untracked,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { NgDocKindIconComponent } from '@ng-doc/app/components/kind-icon';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport {\n NgDocProvidedTypeControl,\n NgDocTypeControl,\n NgDocTypeControlProviderOptions,\n} from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport { NgDocLabelComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';\n\nimport { arrayType } from '../playground-array-type';\n\nlet nextId = 0;\n\n/** Value types that have a chip colour. */\nconst CHIP_TYPES: ReadonlySet<string> = new Set([\n 'string',\n 'number',\n 'boolean',\n 'object',\n 'null',\n 'undefined',\n]);\n\n/**\n * One row of the playground inspector: the input's name with its type chip, and the type\n * control that edits it, bound to the input's form control.\n */\n@Component({\n selector: 'ng-doc-playground-property',\n templateUrl: './playground-property.component.html',\n styleUrls: ['./playground-property.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocLabelComponent,\n NgDocTooltipDirective,\n NgDocSanitizeHtmlPipe,\n NgDocKindIconComponent,\n NgTemplateOutlet,\n ],\n host: {\n '[attr.data-has-property-control]': 'hasPropertyControl()',\n },\n})\nexport class NgDocPlaygroundPropertyComponent {\n /** Name of the input. */\n readonly name = input<string>('');\n\n /** The input, or the content slot. */\n readonly property = input<NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined>(\n undefined,\n );\n\n /** The type control that edits the input. */\n readonly typeControl = input<NgDocProvidedTypeControl | undefined>(undefined);\n\n /** Form control of the input. */\n readonly control = input<FormControl | undefined>(undefined);\n\n /** Default value of the input. */\n readonly defaultValue = input<unknown>(undefined);\n\n /** Whether a type control is rendered. */\n readonly hasPropertyControl = signal<boolean>(false);\n\n /** Description of the input, shown in the tooltip of its name. */\n protected readonly tooltipContent: Signal<string> = computed(() => {\n const property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined = this.property();\n\n return property && isPlaygroundProperty(property) ? property.description ?? '' : '';\n });\n\n /** Options of the type control provider. */\n protected readonly option: Signal<NgDocTypeControlProviderOptions | undefined> = computed(\n () => this.typeControl()?.options,\n );\n\n /** The value type shown as a chip under the name, or an empty string. */\n protected readonly typeChip: Signal<string> = computed(() => valueType(this.property()));\n\n /** Whether the row is a `<label>` around the control, unless its provider opts out. */\n protected readonly labelWrapper: Signal<boolean> = computed(\n () => this.option()?.labelWrapper !== false,\n );\n\n /** ID of the caption that names the control of a row without the `<label>`. */\n protected readonly captionId: string = `ng-doc-playground-property-caption-${nextId++}`;\n\n // The outlet is in the `<label>` or in the `<div>` of the row, so the query follows the branch.\n private readonly propertyOutlet = viewChild('propertyOutlet', { read: ViewContainerRef });\n\n private propertyTypeControl?: ComponentRef<NgDocTypeControl>;\n\n constructor() {\n // A plain effect, not an after-render hook: it runs during change detection on the server\n // too, so server-rendered and prerendered pages include the controls. The outlet is inside\n // the row's `@if` branch, so the query reports it once the branch renders, and the effect\n // runs again then. It also runs again when an input it reads changes.\n effect(() => {\n const outlet: ViewContainerRef | undefined = this.propertyOutlet();\n const property = this.property();\n const typeControl: NgDocProvidedTypeControl | undefined = this.typeControl();\n const control: FormControl | undefined = this.control();\n const defaultValue: unknown = this.defaultValue();\n\n if (outlet) {\n untracked(() => this.createControl(outlet, property, typeControl, control, defaultValue));\n }\n });\n\n inject(DestroyRef).onDestroy(() => this.propertyTypeControl?.destroy());\n }\n\n private createControl(\n outlet: ViewContainerRef,\n property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined,\n typeControl: NgDocProvidedTypeControl | undefined,\n formControl: FormControl | undefined,\n defaultValue: unknown,\n ): void {\n if (!property || !typeControl) {\n return;\n }\n\n this.propertyTypeControl?.destroy();\n\n const control: ComponentRef<NgDocTypeControl> = outlet.createComponent(typeControl.control);\n\n this.propertyTypeControl = control;\n setTypeControlField(control, 'name', this.name());\n setTypeControlField(control, 'description', this.tooltipContent());\n setTypeControlField(\n control,\n 'options',\n isPlaygroundProperty(property) ? property.options : undefined,\n );\n setTypeControlField(control, 'default', defaultValue);\n setTypeControlField(\n control,\n 'isManual',\n isPlaygroundProperty(property) ? property.isManual : undefined,\n );\n control.instance.writeValue(formControl?.value);\n\n if (formControl) {\n formControl.registerOnChange((value: unknown) => control.instance.writeValue(value));\n control.instance.registerOnChange((value: unknown) => formControl.setValue(value));\n control.instance.registerOnTouched(() => formControl.markAsTouched());\n }\n\n this.hasPropertyControl.set(true);\n }\n}\n\n/**\n * The value type of an input: its declared type when it is a primitive, else the type of the first\n * value of its type alias; none for an array. Content slots are booleans.\n * @param property - The input or the content slot.\n */\nfunction valueType(property: NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined): string {\n if (!property) {\n return '';\n }\n\n if (!isPlaygroundProperty(property)) {\n return 'boolean';\n }\n\n if (CHIP_TYPES.has(property.type)) {\n return property.type;\n }\n\n // The options of an array are the values of its items, or the members of an optional array's\n // union (`undefined` first): neither is the type of the input.\n if (arrayType(property.type)) {\n return '';\n }\n\n const option: string | NgDocPlaygroundOption | undefined = property.options?.[0];\n\n if (option !== undefined) {\n try {\n const type: string = typeof resolvePlaygroundOption(option, property.isManual).value;\n\n return CHIP_TYPES.has(type) ? type : '';\n } catch {\n return '';\n }\n }\n\n return '';\n}\n\n/**\n * Sets a field of a type control: through `ComponentRef.setInput()` when the control declares it\n * as an input (a signal input or a decorator input), otherwise by assigning the plain field.\n * @param control - The created type control.\n * @param field - Name of the field.\n * @param value - Value to set.\n */\nfunction setTypeControlField(\n control: ComponentRef<NgDocTypeControl>,\n field: keyof NgDocTypeControl,\n value: unknown,\n): void {\n const input = reflectComponentType(control.componentType)?.inputs.find(\n ({ propName }: { propName: string }) => propName === field,\n );\n\n if (input) {\n control.setInput(input.templateName, value);\n } else {\n (control.instance as unknown as Record<string, unknown>)[field] = value;\n }\n}\n","@if (labelWrapper()) {\n <label\n class=\"ng-doc-playground-property-label\"\n [class.with-label]=\"!option()?.hideLabel\"\n [ng-doc-label]=\"option()?.hideLabel ? '' : labelContent\">\n <ng-container #propertyOutlet></ng-container>\n </label>\n} @else {\n <!-- A control with several interactive parts: a label would forward clicks on them to the first\n of them, so the caption names the control through aria-labelledby instead. -->\n <div\n class=\"ng-doc-playground-property-label ng-doc-playground-property-group\"\n role=\"group\"\n [class.with-label]=\"!option()?.hideLabel\"\n [attr.aria-labelledby]=\"option()?.hideLabel ? null : captionId\">\n @if (!option()?.hideLabel) {\n <span class=\"ng-doc-label\" [id]=\"captionId\">\n <ng-container [ngTemplateOutlet]=\"labelContent\"></ng-container>\n </span>\n }\n <span class=\"ng-doc-content\">\n <ng-container #propertyOutlet></ng-container>\n </span>\n </div>\n}\n<ng-template #labelContent>\n <span\n class=\"ng-doc-playground-property-name\"\n [ngDocTooltip]=\"tooltipTemplate\"\n [canOpen]=\"!!tooltipContent()\"\n [positions]=\"['left-center', 'top-right', 'bottom-right']\"\n >{{ name() }}</span\n >\n @if (typeChip(); as type) {\n <ng-doc-kind-icon [kind]=\"type\" type=\"type\"></ng-doc-kind-icon>\n }\n <ng-template #tooltipTemplate>\n <div [innerHTML]=\"tooltipContent() | ngDocSanitizeHtml\"></div>\n </ng-template>\n</ng-template>\n","import { KeyValuePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n InjectionToken,\n Injector,\n input,\n isDevMode,\n model,\n output,\n Signal,\n} from '@angular/core';\nimport { FormControl, FormGroup, FormsModule } from '@angular/forms';\nimport { isPlaygroundProperty, resolvePlaygroundOption } from '@ng-doc/app/helpers';\nimport { NgDocPlaygroundTexts, NgDocProvidedTypeControl } from '@ng-doc/app/interfaces';\nimport { getTokenForType } from '@ng-doc/app/providers/type-control';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport {\n NgDocPlaygroundContent,\n NgDocPlaygroundOption,\n NgDocPlaygroundProperties,\n NgDocPlaygroundProperty,\n} from '@ng-doc/core/interfaces';\nimport {\n NgDocBindPipe,\n NgDocCheckboxComponent,\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\nimport {\n ARRAY_CONTROL_TYPE,\n arrayType,\n NgDocArrayType,\n UNION_ARRAY_CONTROL_TYPE,\n} from '../playground-array-type';\nimport { NgDocPlaygroundForm } from '../playground-form';\nimport { NgDocPlaygroundPropertyComponent } from '../playground-property/playground-property.component';\nimport { NgDocPlaygroundPropertyControl } from '../playground-property-control';\n\n/**\n * Orders inputs without an `order` by name in English whatever the locale, so a prerendered\n * playground does not depend on the machine that built it.\n */\nconst INPUT_ORDER = new Intl.Collator('en');\n\n/**\n * The playground inspector: the demos, and beside them (below them in a container narrower than\n * 640px) the Recreate setting and a control per input and content slot.\n */\n@Component({\n selector: 'ng-doc-playground-properties',\n templateUrl: './playground-properties.component.html',\n styleUrls: ['./playground-properties.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocCheckboxComponent,\n FormsModule,\n NgDocTooltipDirective,\n NgDocIconComponent,\n NgDocPlaygroundPropertyComponent,\n KeyValuePipe,\n NgDocBindPipe,\n NgDocExecutePipe,\n ],\n})\nexport class NgDocPlaygroundPropertiesComponent<\n P extends NgDocPlaygroundProperties,\n C extends Record<string, NgDocPlaygroundContent>,\n> {\n protected readonly texts: NgDocPlaygroundTexts = inject(NG_DOC_TEXTS).playground;\n\n private readonly injector = inject(Injector);\n\n /** The form of the playground. */\n readonly form = input.required<FormGroup<NgDocPlaygroundForm>>();\n\n /** The inputs of the playground's target. */\n readonly properties = input<P | undefined>(undefined);\n\n /** Inputs that get no control. */\n readonly ignoreInputs = input<string[] | undefined>([]);\n\n /** Content slots of the playground. */\n readonly dynamicContent = input<C | undefined>(undefined);\n\n /** Default values of the inputs; the inspector renders once they are known. */\n readonly defaultValues = input<Record<string, unknown> | undefined>(undefined);\n\n /**\n * Whether the demos render before the defaults are known: an isolated playground's iframes\n * report them, so they must render first. The controls render once the defaults are known.\n */\n readonly waitingForDefaults = input<boolean>(false);\n\n /** Whether the inspector is hidden, leaving the demos only. */\n readonly hideSidePanel = input<boolean>(false);\n\n /** Where the inspector goes: right of the demos, or below them at full width. */\n readonly inspectorPosition = input<'right' | 'bottom'>('right');\n\n /** Whether the demo is recreated each time an input changes. */\n readonly recreateDemo = model<boolean>(false);\n\n /** Whether the Recreate setting is fixed by the playground's options and hidden. */\n readonly recreateLocked = input<boolean>(false);\n\n /** Whether the Reset button is shown. */\n readonly showResetButton = input<boolean>(false);\n\n /** Emits when the reader resets the form. */\n readonly resetForm = output<void>();\n\n /** The control of each input, in display order. */\n protected readonly propertyControls: Signal<NgDocPlaygroundPropertyControl[]> = computed(() => {\n const properties: P | undefined = this.properties();\n const ignoreInputs: string[] | undefined = this.ignoreInputs();\n\n if (!properties) {\n return [];\n }\n\n return objectKeys(properties)\n .filter((key: keyof P) => ignoreInputs?.includes(String(key)) !== true)\n .map((key: keyof P) => {\n const property: NgDocPlaygroundProperty = properties[key];\n const typeControl: NgDocProvidedTypeControl | undefined = this.getTypeControl(property);\n\n return typeControl ? { propertyName: String(key), property, typeControl } : null;\n })\n .filter(isPresent)\n .sort(\n (a: NgDocPlaygroundPropertyControl, b: NgDocPlaygroundPropertyControl) =>\n compareOrder(a.property.order, b.property.order) ?? compareByTypeControl(a, b),\n );\n });\n\n /**\n * The controls in sections: the inputs without a group first, then a section per group, in the\n * order of the group's first input.\n */\n protected readonly propertySections: Signal<NgDocPlaygroundPropertySection[]> = computed(() => {\n const sections = new Map<string | undefined, NgDocPlaygroundPropertyControl[]>([\n [undefined, []],\n ]);\n\n for (const control of this.propertyControls()) {\n const group: string | undefined = control.property.group || undefined;\n\n sections.set(group, [...(sections.get(group) ?? []), control]);\n }\n\n return Array.from(sections, ([group, controls]) => ({\n title: group ?? this.texts.settings,\n controls,\n })).filter((section: NgDocPlaygroundPropertySection) => section.controls.length > 0);\n });\n\n /** The control of content slots. */\n protected readonly contentTypeControl?: NgDocProvidedTypeControl =\n this.getControlForType('boolean');\n\n /**\n * The form control of an input or a content slot.\n * @param controlType - `properties` or `content`.\n * @param key - Name of the input or slot.\n */\n getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl {\n return this.form().get(controlType)?.get(key) as FormControl;\n }\n\n private getTypeControl(property: NgDocPlaygroundProperty): NgDocProvidedTypeControl | undefined {\n const type: string = property.type;\n const primitive: string | undefined = optionalPrimitive(type);\n const array: NgDocArrayType | undefined = arrayType(type);\n const options: Array<string | NgDocPlaygroundOption> | undefined = isPlaygroundProperty(\n property,\n )\n ? property.options\n : undefined;\n // The options of an array are the values of its items, when they are a union of literals.\n const typeControl: NgDocProvidedTypeControl | undefined =\n this.getControlForType(type) ??\n (primitive ? this.getControlForType(primitive) : undefined) ??\n (array?.list ? this.getControlForType(array.list) : undefined) ??\n (array\n ? this.getControlForTypeAlias(options, property.isManual, UNION_ARRAY_CONTROL_TYPE)\n : undefined) ??\n (array ? this.getControlForType(ARRAY_CONTROL_TYPE) : undefined) ??\n this.getControlForTypeAlias(options, property.isManual, 'NgDocTypeAlias');\n\n if (!typeControl && isDevMode()) {\n console.warn(\n `NgDocPlayground didn't find the control for the @Input \"${property.inputName}\", the type \"${type}\" was not recognized'`,\n );\n }\n\n return typeControl;\n }\n\n private getControlForType(type: string): NgDocProvidedTypeControl | undefined {\n const token: InjectionToken<NgDocProvidedTypeControl> | undefined = getTokenForType(type);\n\n return token ? this.injector.get(token) : undefined;\n }\n\n /**\n * The control of the values of a union, when every option is a value: the select of a union\n * (`NgDocTypeAlias`) or the multi-select of an array of one (`NgDocTypeAlias[]`). An optional\n * array input without such options has the members of its own union (`undefined` and the array\n * type), and the text of an array type is not a value of an item.\n * @param options - The options of the input.\n * @param isManual - Whether the options come from the playground's `controls`.\n * @param controlType - The type the control is registered for.\n */\n private getControlForTypeAlias(\n options: Array<string | NgDocPlaygroundOption> | undefined,\n isManual: boolean | undefined,\n controlType: string,\n ): NgDocProvidedTypeControl | undefined {\n if (!options?.length) {\n return undefined;\n }\n\n const values: unknown[] = [];\n\n try {\n // checking that all values are extractable\n options.forEach((item: string | NgDocPlaygroundOption) =>\n values.push(resolvePlaygroundOption(item, isManual).value),\n );\n } catch {\n return undefined;\n }\n\n // The items of an array are values: an option that evaluates to an object, such as the text\n // of a tuple type, means the options are not those of the items.\n if (\n controlType === UNION_ARRAY_CONTROL_TYPE &&\n !(\n values.every((value: unknown) => value === null || ITEM_TYPES.has(typeof value)) &&\n values.some((value: unknown) => value !== null && value !== undefined)\n )\n ) {\n return undefined;\n }\n\n return this.getControlForType(controlType);\n }\n}\n\n/** A titled list of controls in the inspector. */\ninterface NgDocPlaygroundPropertySection {\n title: string;\n controls: NgDocPlaygroundPropertyControl[];\n}\n\n/**\n * Compares the `order` of two inputs from the playground's `controls`: inputs with one come first,\n * lowest first.\n * @param a - The first input's order.\n * @param b - The second input's order.\n * @returns The comparison, or `undefined` when neither input has an order or both have the same.\n */\nfunction compareOrder(a: number | undefined, b: number | undefined): number | undefined {\n if (isPresent(a) && isPresent(b)) {\n return a - b || undefined;\n }\n if (isPresent(a)) {\n return -1;\n }\n if (isPresent(b)) {\n return 1;\n }\n return undefined;\n}\n\n/**\n * Compares two inputs by the order of their type controls: controls with an order first, lowest\n * first (equal orders keep the inputs' order), then the others by name.\n * @param a - The first input.\n * @param b - The second input.\n */\nfunction compareByTypeControl(\n a: NgDocPlaygroundPropertyControl,\n b: NgDocPlaygroundPropertyControl,\n): number {\n const aOrder: number | undefined = a.typeControl.options?.order;\n const bOrder: number | undefined = b.typeControl.options?.order;\n\n if (isPresent(aOrder) && isPresent(bOrder)) {\n return aOrder - bOrder;\n }\n if (isPresent(aOrder)) {\n return -1;\n }\n if (isPresent(bOrder)) {\n return 1;\n }\n return INPUT_ORDER.compare(a.property.inputName, b.property.inputName);\n}\n\n/** The types of the values that an item of the multi-select of a union can have. */\nconst ITEM_TYPES: ReadonlySet<string> = new Set(['string', 'number', 'boolean', 'undefined']);\n\n/** The types whose control also edits an optional or nullable input of the type. */\nconst PRIMITIVE_TYPES: ReadonlySet<string> = new Set(['string', 'number', 'boolean']);\n\n/**\n * The primitive of an optional or nullable primitive input type, such as `string` of\n * `string | undefined` (an optional `@Input() label?: string`, `input<string>()` or\n * `model<string>()`) or of `number | null`, so that the input gets the primitive's control.\n * Other types are matched by their exact name only (arrays of strings and numbers aside, see\n * `arrayType`): a custom control registered for `Position` does not receive the `undefined` of a\n * `Position | undefined` input unless it is registered for that type too.\n * @param type - The input type as the builder printed it.\n * @returns The primitive, or `undefined` when the type is not one.\n */\nfunction optionalPrimitive(type: string): string | undefined {\n const members: string[] = type.split('|').map((member: string) => member.trim());\n const rest: string[] = members.filter(\n (member: string) => member !== 'undefined' && member !== 'null',\n );\n\n return rest.length === 1 && rest.length < members.length && PRIMITIVE_TYPES.has(rest[0])\n ? rest[0]\n : undefined;\n}\n","@if (defaultValues() || waitingForDefaults()) {\n <div\n class=\"ng-doc-playground-properties-wrapper\"\n [class.no-side-panel]=\"hideSidePanel()\"\n [class.inspector-bottom]=\"inspectorPosition() === 'bottom'\">\n <div class=\"ng-doc-playground-demos\">\n <ng-content></ng-content>\n </div>\n @if (!hideSidePanel() && defaultValues(); as defaultValues) {\n <div class=\"ng-doc-playground-properties\">\n <div class=\"ng-doc-playground-header\">\n <h4>{{ texts.title }}</h4>\n @if (showResetButton()) {\n <button type=\"button\" class=\"ng-doc-playground-reset\" (click)=\"resetForm.emit()\">\n {{ texts.reset }}\n </button>\n }\n </div>\n @if (!recreateLocked()) {\n <div class=\"ng-doc-playground-setting\">\n <ng-doc-checkbox [ngModel]=\"recreateDemo()\" (ngModelChange)=\"recreateDemo.set($event)\">\n {{ texts.recreate }}\n </ng-doc-checkbox>\n <ng-doc-icon\n class=\"ng-doc-playground-info\"\n icon=\"info\"\n role=\"img\"\n [attr.aria-label]=\"texts.recreateHint\"\n [ngDocTooltip]=\"texts.recreateHint\"\n [positions]=\"['bottom-right', 'left-center']\"></ng-doc-icon>\n </div>\n }\n <div class=\"ng-doc-playground-divider\"></div>\n @for (section of propertySections(); track $index) {\n <h5 class=\"ng-doc-title\">{{ section.title }}</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (propertyControl of section.controls; track propertyControl.propertyName) {\n <ng-doc-playground-property\n [name]=\"propertyControl.property.label ?? propertyControl.property.inputName\"\n [property]=\"propertyControl.property\"\n [typeControl]=\"propertyControl.typeControl\"\n [defaultValue]=\"defaultValues[propertyControl.propertyName]\"\n [control]=\"\n getFormControl | bind: this | execute: 'properties' : propertyControl.propertyName\n \">\n </ng-doc-playground-property>\n }\n </div>\n }\n @if ((dynamicContent() | keyvalue)?.length) {\n <h5 class=\"ng-doc-title\">{{ texts.content }}</h5>\n <div class=\"ng-doc-playground-property-list\">\n @for (content of dynamicContent() | keyvalue; track content.key) {\n <ng-doc-playground-property\n [name]=\"content.value.label\"\n [property]=\"content.value\"\n [typeControl]=\"contentTypeControl\"\n [control]=\"getFormControl | bind: this | execute: 'content' : content.key\">\n </ng-doc-playground-property>\n }\n </div>\n }\n </div>\n }\n </div>\n}\n","import { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n inject,\n Injector,\n input,\n InputSignal,\n linkedSignal,\n Signal,\n signal,\n untracked,\n WritableSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport {\n ɵdecodePlaygroundValue,\n ɵNgDocPlaygroundFragment,\n ɵNgDocPlaygroundFrameMessage,\n ɵplaygroundStateToFragment,\n ɵwithDemoTheme,\n} from '@ng-doc/app/demo-app';\nimport { NgDocPlaygroundTexts } from '@ng-doc/app/interfaces';\nimport { getTokenForType } from '@ng-doc/app/providers/type-control';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\nimport { isSameObject } from '@ng-doc/core/helpers/is-same-object';\nimport { objectKeys } from '@ng-doc/core/helpers/object-keys';\nimport { ɵplaygroundTargetSlugs } from '@ng-doc/core/helpers/playground-target-slugs';\nimport {\n NgDocPlaygroundConfig,\n NgDocPlaygroundOptions,\n NgDocPlaygroundProperties,\n} from '@ng-doc/core/interfaces';\nimport { NgDocAsArrayPipe } from '@ng-doc/ui-kit';\n\nimport { ɵNG_DOC_PLAYGROUND_CONTAINER } from './playground-container';\nimport {\n NgDocPlaygroundDemoComponent,\n ɵNgDocPlaygroundFrame,\n} from './playground-demo/playground-demo.component';\nimport { NgDocPlaygroundForm } from './playground-form';\nimport { NgDocPlaygroundPropertiesComponent } from './playground-properties/playground-properties.component';\n\n/**\n * A playground: an inspector with a control per input and content slot of its target, and a demo\n * per selector (or the pipe) rendered with the chosen values.\n *\n * An isolated playground (the `isolated` option, or `isolatedPlaygrounds`) shows each demo in an\n * iframe of its page in the demo application, which the Vite engine builds. The inspector stays\n * here and passes the values in the iframe's URL fragment; the page reports the target's defaults\n * back. When a value can't be put in the URL, the playground renders its demos in the page\n * instead, with a note that names the input.\n */\n@Component({\n selector: 'ng-doc-playground',\n templateUrl: './playground.component.html',\n styleUrls: ['./playground.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgDocPlaygroundPropertiesComponent, NgDocPlaygroundDemoComponent, NgDocAsArrayPipe],\n // The generated playground classes this playground creates report their defaults to it.\n providers: [{ provide: ɵNG_DOC_PLAYGROUND_CONTAINER, useExisting: NgDocPlaygroundComponent }],\n})\nexport class NgDocPlaygroundComponent<\n T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties,\n> implements AfterViewInit\n{\n private readonly rootPage = inject(NgDocRootPage);\n private readonly formBuilder = inject(FormBuilder);\n private readonly texts: NgDocPlaygroundTexts = inject(NG_DOC_TEXTS).playground;\n\n /** The name of the playground in the page configuration. */\n readonly id: InputSignal<string> = input.required<string>();\n\n /** The name of the pipe, when the target is a pipe. */\n readonly pipeName: InputSignal<string> = input<string>('');\n\n /** The selectors of the target to render a demo for. */\n readonly selectors: InputSignal<string[]> = input<string[]>([]);\n\n /** The inputs of the target. */\n readonly properties: InputSignal<T | undefined> = input<T | undefined>(undefined);\n\n /** Options of the playground action; they extend the playground configuration. */\n readonly options: InputSignal<NgDocPlaygroundOptions> = input<NgDocPlaygroundOptions>({});\n\n /** The values of the inputs and content slots. */\n readonly formGroup: WritableSignal<FormGroup<NgDocPlaygroundForm> | undefined> =\n signal(undefined);\n\n /** The default values of the target's inputs, reported by the first demo. */\n readonly defaultValues: WritableSignal<Record<string, unknown> | undefined> = signal(undefined);\n\n /** The playground configuration of the page, extended by the options. */\n readonly configuration: Signal<NgDocPlaygroundConfig> = computed(() =>\n Object.assign({}, this.rootPage.page?.playgrounds?.[this.id()], this.options()),\n );\n\n /**\n * Whether the demo is created again each time a value changes. It starts from the `recreate`\n * option; the reader can change it unless the option is `'always'`.\n */\n readonly recreateDemo: WritableSignal<boolean> = linkedSignal(\n () => !!this.configuration().recreate,\n );\n\n /** Whether the Recreate setting is fixed on, and hidden, by the `'always'` option. */\n readonly recreateLocked: Signal<boolean> = computed(\n () => this.configuration().recreate === 'always',\n );\n\n /**\n * The note that says why the playground renders in the page although it is isolated: the input\n * whose value can't be sent to its iframes, or what failed. Once set, it stays for the rest of\n * the visit.\n */\n readonly fallback: WritableSignal<string | undefined> = signal(undefined);\n\n /** Whether the demos are shown in iframes of their pages in the demo application. */\n readonly isolated: Signal<boolean> = computed(\n () =>\n !!this.rootPage.demoRoute &&\n !this.fallback() &&\n !this.uncloneableControl() &&\n !this.pagelessSelector() &&\n (this.configuration().isolated ?? this.rootPage.isolatedPlaygrounds ?? false),\n );\n\n /** The note that says why an isolated playground renders in the page. */\n readonly fallbackNote: Signal<string | undefined> = computed(() => {\n const note = this.uncloneableControl() ?? this.pagelessSelector() ?? this.fallback();\n\n return note && (this.configuration().isolated ?? this.rootPage.isolatedPlaygrounds)\n ? note\n : undefined;\n });\n\n /**\n * The theme of the iframes: the `theme` option, until the reader picks another with the theme\n * button beside a demo; `undefined` follows the page.\n */\n readonly frameTheme: WritableSignal<string | undefined> = linkedSignal(\n () => this.configuration().theme,\n );\n\n /** The iframe of each target, by selector or pipe name, while the playground is isolated. */\n readonly frames: Signal<Map<string, ɵNgDocPlaygroundFrame> | undefined> = computed(() => {\n const encoded = this.fragment();\n\n if (!this.isolated() || !encoded.ok) return undefined;\n const targets = this.targets();\n const slugs = ɵplaygroundTargetSlugs(targets);\n\n return new Map(\n targets.map((target: string, index: number) => [\n target,\n {\n url: this.pageUrl(slugs[index]),\n fragment: ɵwithDemoTheme(encoded.fragment, this.frameTheme())!,\n title: this.texts.frameTitle({ id: this.id(), target }),\n },\n ]),\n );\n });\n\n private readonly injector = inject(Injector);\n private readonly platformLocation = inject(PlatformLocation);\n private readonly appBaseHref = inject(APP_BASE_HREF, { optional: true });\n private readonly formValue = signal<{\n properties?: Record<string, unknown>;\n content?: Record<string, boolean>;\n }>({});\n private defaultProperties: Record<string, unknown> = {};\n private defaultContent: Record<string, boolean> = {};\n private viewInitialized = false;\n\n /** Every target of the playground, in the order of its page's routes: its selectors, or the pipe. */\n private readonly targets: Signal<string[]> = computed(() =>\n this.pipeName() ? [this.pipeName()] : this.selectors(),\n );\n\n /** The state of the iframes as a URL fragment. */\n private readonly fragment: Signal<ɵNgDocPlaygroundFragment> = computed(() => {\n const names = objectKeys(this.properties() ?? {}).map(String);\n const value = this.formValue();\n const configuration = this.configuration();\n // Before the iframe reported the defaults, it gets the playground's own values only.\n const properties =\n value.properties ??\n Object.fromEntries(\n Object.entries(Object.assign({}, configuration.defaults, configuration.inputs)).filter(\n ([name]) => names.includes(name),\n ),\n );\n\n return ɵplaygroundStateToFragment({\n inputs: names,\n properties,\n content: Object.entries(value.content ?? {})\n .filter(([, shown]) => shown)\n .map(([slot]) => slot),\n recreate: this.recreateDemo(),\n data: this.options().data,\n });\n });\n\n /**\n * An input whose control is declared not cloneable (`cloneable: false` of `provideTypeControl`):\n * the playground renders in the page from the start.\n */\n private readonly uncloneableControl: Signal<string | undefined> = computed(() => {\n const controls = this.configuration().controls ?? {};\n\n for (const [name, property] of Object.entries(this.properties() ?? {})) {\n const control = controls[name];\n const type = typeof control === 'string' ? control : control?.type ?? property.type;\n const token = getTokenForType(type);\n\n if (token && this.injector.get(token, null)?.options?.cloneable === false) {\n return this.texts.inPageControl({ input: name });\n }\n }\n return undefined;\n });\n\n /**\n * A selector of the `selectors` option that is not one of the target's: it has no page, so the\n * playground renders in the page from the start.\n */\n private readonly pagelessSelector: Signal<string | undefined> = computed(() => {\n if (this.pipeName()) return undefined;\n const option = this.configuration().selectors;\n const rendered = option === undefined ? [] : Array.isArray(option) ? option : [option];\n const selector = rendered.find((item: string) => !this.selectors().includes(item));\n\n return selector === undefined ? undefined : this.texts.inPageSelector({ selector });\n });\n\n constructor() {\n // A value that can't be put in the URL makes the playground render in the page.\n effect(() => {\n const encoded = this.fragment();\n\n if (!encoded.ok && this.isolated()) {\n untracked(() =>\n this.fallback.set(\n encoded.path\n ? this.texts.inPageValue({ input: encoded.path, reason: encoded.reason })\n : this.texts.inPageTooLong,\n ),\n );\n }\n });\n // A playground that fell back before its form existed creates it once a demo in the page has\n // reported the defaults. A playground in the page from the start creates it in\n // `ngAfterViewInit`, as before.\n effect(() => {\n if (this.fallback() && this.defaultValues() && !this.formGroup() && this.viewInitialized) {\n untracked(() => this.createForm());\n }\n });\n }\n\n /**\n * Takes a message of a demo's iframe: the target's defaults, which create the form, or a\n * failure, which makes the playground render in the page.\n * @param message - The message.\n * @internal\n */\n onFrameMessage(message: ɵNgDocPlaygroundFrameMessage): void {\n if (message.type === 'playground-error') {\n this.fallback.set(this.texts.inPageFrameError({ message: message.message }));\n return;\n }\n if (message.type !== 'playground-ready' || this.formGroup()) return;\n if (message.uncloneable.length) {\n this.fallback.set(this.texts.inPageDefault({ input: message.uncloneable[0] }));\n return;\n }\n this.defaultValues.set(\n Object.fromEntries(\n Object.entries(message.defaults).map(([name, value]) => [\n name,\n ɵdecodePlaygroundValue(value),\n ]),\n ),\n );\n this.createForm();\n }\n\n /**\n * Makes the playground render in the page when the page in an iframe loaded but did not report\n * the target, such as a page the build didn't make.\n * @internal\n */\n onFrameSilent(): void {\n if (!this.fallback()) this.fallback.set(this.texts.inPageFrameSilent);\n }\n\n ngAfterViewInit(): void {\n this.viewInitialized = true;\n // An isolated playground creates its form once its iframe reported the defaults.\n if (this.isolated()) return;\n this.createForm();\n }\n\n private createForm(): void {\n this.defaultProperties = this.getPropertiesFormValues();\n this.defaultContent = this.getContentFormValues();\n\n // `FormBuilder` reads an array as `[value, validators]`, so each value is wrapped: the default\n // of an array input is the value of its control.\n const propertiesForm: FormGroup = this.formBuilder.group(\n Object.fromEntries(\n Object.entries(this.defaultProperties).map(([key, value]) => [key, [value]]),\n ),\n );\n const contentForm: FormGroup = this.formBuilder.group(this.defaultContent);\n const formGroup: FormGroup<NgDocPlaygroundForm> = this.formBuilder.group({\n properties: propertiesForm,\n content: contentForm,\n });\n\n // `patchValue` is needed to set `undefined` values, otherwise they will be ignored by the Angular form\n formGroup.patchValue({\n properties: Object.assign({}, this.defaultProperties, this.configuration().inputs),\n content: this.defaultContent,\n });\n this.formGroup.set(formGroup);\n formGroup.valueChanges\n .pipe(takeUntilDestroyed(this.injector.get(DestroyRef)))\n .subscribe(() => this.formValue.set(formGroup.getRawValue()));\n this.formValue.set(formGroup.getRawValue());\n }\n\n /**\n * The URL of a target's page in the demo application, under the document's base href.\n * @param slug\n */\n private pageUrl(slug: string): string {\n const baseHref: string = (\n this.appBaseHref ??\n this.platformLocation.getBaseHrefFromDOM() ??\n '/'\n ).replace(/^\\/+|\\/+$/g, '');\n const path: string = [\n ...baseHref.split('/'),\n ...(this.rootPage.demoRoute ?? '').split('/'),\n 'playground',\n this.id(),\n slug,\n ]\n .filter(Boolean)\n .map((segment: string) => encodeURIComponent(segment))\n .join('/');\n\n return `/${path}`;\n }\n\n protected isDefaultState(): boolean {\n const formGroup = this.formGroup();\n\n if (!formGroup) {\n return false;\n }\n\n return (\n isSameObject(formGroup.value.properties ?? {}, this.defaultValues() ?? {}) &&\n isSameObject(formGroup.value.content ?? {}, this.defaultContent ?? {})\n );\n }\n\n private getPropertiesFormValues(): Record<string, unknown> {\n const defaultValues = this.defaultValues();\n const formValues: Record<string, unknown> = objectKeys(this.properties() ?? {}).reduce(\n (controls: Record<string, unknown>, key: string) => {\n controls[key] = defaultValues ? defaultValues[key] : undefined;\n\n return controls;\n },\n {} as Record<string, unknown>,\n );\n\n return Object.assign({}, formValues, this.configuration().defaults);\n }\n\n private getContentFormValues(): Record<string, boolean> {\n return objectKeys(this.configuration().content ?? {}).reduce(\n (controls: Record<string, boolean>, key: string) => {\n controls[key] = false;\n\n return controls;\n },\n {} as Record<keyof T, boolean>,\n );\n }\n\n /** Sets every input and content slot back to its default value. */\n resetForm(): void {\n const formGroup = this.formGroup();\n\n formGroup?.reset({}, { emitEvent: false });\n formGroup?.patchValue({\n properties: this.defaultProperties,\n content: this.defaultContent,\n });\n }\n}\n","@if (configuration(); as configuration) {\n @if (fallbackNote(); as note) {\n <p class=\"ng-doc-playground-note\" role=\"note\">{{ note }}</p>\n }\n <ng-doc-playground-properties\n [form]=\"formGroup()!\"\n [properties]=\"properties()\"\n [ignoreInputs]=\"configuration.hiddenInputs\"\n [dynamicContent]=\"configuration.content\"\n [hideSidePanel]=\"configuration.hideSidePanel ?? false\"\n [inspectorPosition]=\"configuration.inspectorPosition ?? 'right'\"\n [defaultValues]=\"defaultValues()\"\n [waitingForDefaults]=\"isolated()\"\n [showResetButton]=\"!isDefaultState()\"\n [(recreateDemo)]=\"recreateDemo\"\n [recreateLocked]=\"recreateLocked()\"\n (resetForm)=\"resetForm()\">\n @for (selector of configuration.selectors ?? selectors() | asArray; track selector) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [selector]=\"selector\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\"\n [expanded]=\"configuration.expanded ?? false\"\n [frame]=\"frames()?.get(selector)\"\n [frameDefaults]=\"defaultValues()\"\n [(frameTheme)]=\"frameTheme\"\n [configuredTheme]=\"configuration.theme\"\n (frameMessage)=\"onFrameMessage($event)\"\n (frameSilent)=\"onFrameSilent()\">\n </ng-doc-playground-demo>\n }\n @if (pipeName()) {\n <ng-doc-playground-demo\n [id]=\"id()\"\n [pipeName]=\"pipeName()\"\n [properties]=\"properties()\"\n [configuration]=\"configuration\"\n [recreateDemo]=\"recreateDemo()\"\n [form]=\"formGroup()\"\n [frame]=\"frames()?.get(pipeName())\"\n [frameDefaults]=\"defaultValues()\"\n [(frameTheme)]=\"frameTheme\"\n [configuredTheme]=\"configuration.theme\"\n (frameMessage)=\"onFrameMessage($event)\"\n (frameSilent)=\"onFrameSilent()\">\n </ng-doc-playground-demo>\n }\n </ng-doc-playground-properties>\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n DestroyRef,\n DOCUMENT,\n inject,\n Injector,\n PLATFORM_ID,\n signal,\n Type,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n ɵencodePlaygroundValue,\n ɵNG_DOC_DEMO_MESSAGE_SOURCE,\n ɵNgDocPlaygroundEncodedValue,\n ɵNgDocPlaygroundFrameMessage,\n ɵNgDocPlaygroundState,\n ɵplaygroundStateFromFragment,\n} from '@ng-doc/app/demo-app';\nimport { NgDocPlaygroundTexts } from '@ng-doc/app/interfaces';\nimport { getPlaygroundDemoToken } from '@ng-doc/app/providers/playground-demo';\nimport { NG_DOC_TEXTS } from '@ng-doc/app/tokens';\n\nimport { NgDocBasePlayground } from '../base-playground';\nimport { ɵNG_DOC_PLAYGROUND_CONTAINER, ɵNgDocPlaygroundContainer } from '../playground-container';\n\n/** A frame message without the fields every message has. */\ntype MessageBody<T> = T extends unknown ? Omit<T, 'source' | 'version'> : never;\n\n/**\n * The route data of the page of an isolated playground: the playground's name in the page's\n * `playgrounds`, and the target it shows, a selector or a pipe's name.\n * @internal\n */\nexport interface ɵNgDocPlaygroundRouteData {\n readonly id: string;\n readonly selector?: string;\n readonly pipeName?: string;\n}\n\nconst EMPTY_STATE: ɵNgDocPlaygroundState = {\n inputs: [],\n properties: {},\n content: [],\n recreate: false,\n};\n\n/**\n * Shows one target of a playground on a page of the demo application, for an isolated playground:\n * the generated playground class of the route's playground and target, without the inspector,\n * which stays on the documentation page. The state comes from the URL fragment, and a new\n * fragment applies a new state without a reload (the documentation page replaces it with\n * `location.replace`). The page tells the documentation page, with `postMessage`, the target's\n * default input values once it exists, each state it applied, and what failed.\n *\n * Like the demo host, it skips hydration: the server renders the target with its defaults, and\n * the browser renders it again with the fragment's state, which only the browser has.\n */\n@Component({\n selector: 'ng-doc-playground-host',\n template: `\n <ng-container #outlet />\n @if (missing) {\n <p role=\"alert\">{{ texts.missing }}</p>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { ngSkipHydration: 'true' },\n providers: [{ provide: ɵNG_DOC_PLAYGROUND_CONTAINER, useExisting: NgDocPlaygroundHostComponent }],\n})\nexport class NgDocPlaygroundHostComponent implements ɵNgDocPlaygroundContainer {\n /** The target's inputs, by name, from the state: a pipe's parameters are positional. */\n readonly properties = signal<Readonly<Record<string, unknown>> | undefined>(undefined);\n\n /** The default values of the target's inputs, reported by the generated class. */\n readonly defaultValues = signal<Record<string, unknown> | undefined>(undefined);\n\n /** Whether the route names a playground or a target the page doesn't have. */\n protected readonly missing: boolean;\n\n protected readonly texts: NgDocPlaygroundTexts = inject(NG_DOC_TEXTS).playground;\n private readonly injector = inject(Injector);\n private readonly outlet = viewChild.required('outlet', { read: ViewContainerRef });\n private readonly window: Window | null = isPlatformBrowser(inject(PLATFORM_ID))\n ? inject(DOCUMENT).defaultView\n : null;\n private readonly playground?: Type<NgDocBasePlayground>;\n private reference?: ComponentRef<NgDocBasePlayground>;\n\n constructor() {\n const data: ɵNgDocPlaygroundRouteData | undefined =\n inject(ActivatedRoute).snapshot.data['ngDocPlayground'];\n const target = data?.selector ?? data?.pipeName;\n const token = data ? getPlaygroundDemoToken<typeof NgDocBasePlayground>(data.id) : undefined;\n const classes = token ? this.injector.get(token, []) : [];\n\n this.playground = classes.find((type) => type.selector === target) as\n | Type<NgDocBasePlayground>\n | undefined;\n this.missing = !this.playground;\n\n // The router updates the URL after it activates the route, so the fragment is read after\n // the first render.\n afterNextRender(() => this.start(this.readState() ?? EMPTY_STATE));\n const window = this.window;\n if (window) {\n const onHashChange = () => {\n const state = this.readState();\n\n // A malformed fragment is reported and leaves the target as it is.\n if (state) this.apply(state);\n };\n\n window.addEventListener('hashchange', onHashChange);\n inject(DestroyRef).onDestroy(() => window.removeEventListener('hashchange', onHashChange));\n }\n }\n\n /**\n * Creates the target with the first state, and reports its defaults once it has rendered.\n * @param state\n */\n private start(state: ɵNgDocPlaygroundState): void {\n this.properties.set(Object.fromEntries(state.inputs.map((name) => [name, true])));\n if (!this.playground) {\n this.post({\n type: 'playground-error',\n phase: 'create',\n message: this.texts.missing,\n });\n return;\n }\n if (!this.create(state)) return;\n // The generated class reads the target's defaults when it is first checked, which the next\n // render has done.\n afterNextRender(\n () => {\n const defaults: Record<string, ɵNgDocPlaygroundEncodedValue> = {};\n const uncloneable: string[] = [];\n\n for (const [name, value] of Object.entries(this.defaultValues() ?? {})) {\n const encoded = ɵencodePlaygroundValue(value);\n\n if (encoded.ok) defaults[name] = encoded.value;\n else uncloneable.push(name);\n }\n this.post({ type: 'playground-ready', defaults, uncloneable });\n this.applied();\n },\n { injector: this.injector },\n );\n }\n\n /**\n * Creates the target and sets the state; reports a failure instead of throwing.\n * @param state\n */\n private create(state: ɵNgDocPlaygroundState): boolean {\n if (!this.playground) return false;\n try {\n this.reference?.destroy();\n this.reference = this.outlet().createComponent(this.playground);\n this.setState(state);\n return true;\n } catch (error) {\n this.post({ type: 'playground-error', phase: 'create', message: describe(error) });\n return false;\n }\n }\n\n /**\n * Applies a state to the existing target, or creates it again when the state asks to.\n * @param state\n */\n private apply(state: ɵNgDocPlaygroundState): void {\n if (!this.reference) return;\n if (state.recreate) {\n if (this.create(state)) this.applied();\n return;\n }\n try {\n this.setState(state);\n this.applied();\n } catch (error) {\n this.post({ type: 'playground-error', phase: 'apply', message: describe(error) });\n }\n }\n\n private setState(state: ɵNgDocPlaygroundState): void {\n this.reference?.setInput('properties', state.properties);\n this.reference?.setInput('actionData', state.data ?? {});\n this.reference?.setInput(\n 'content',\n Object.fromEntries(state.content.map((slot) => [slot, true])),\n );\n this.reference?.changeDetectorRef.markForCheck();\n }\n\n /** The state of the URL fragment; a malformed one is reported and reads as `undefined`. */\n private readState(): ɵNgDocPlaygroundState | undefined {\n const fragment = this.window?.location.hash ?? '';\n\n if (!fragment || fragment === '#') return EMPTY_STATE;\n try {\n return ɵplaygroundStateFromFragment(fragment);\n } catch (error) {\n this.post({ type: 'playground-error', phase: 'apply', message: describe(error) });\n return undefined;\n }\n }\n\n private applied(): void {\n this.post({\n type: 'playground-applied',\n fragment: (this.window?.location.hash ?? '').replace(/^#/, ''),\n });\n }\n\n private post(message: MessageBody<ɵNgDocPlaygroundFrameMessage>): void {\n const window = this.window;\n\n // Only a page of the same origin may receive it: the demo pages are part of the site.\n if (window && window.parent !== window) {\n window.parent.postMessage(\n { source: ɵNG_DOC_DEMO_MESSAGE_SOURCE, version: 1, ...message },\n window.location.origin,\n );\n }\n }\n}\n\n/**\n *\n * @param error\n */\nfunction describe(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵplaygroundTargetSlugs","ɵwithDemoTheme","ɵplaygroundStateToFragment","ɵdecodePlaygroundValue","ɵencodePlaygroundValue","ɵplaygroundStateFromFragment","ɵNG_DOC_DEMO_MESSAGE_SOURCE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA;;;AAGG;MACU,4BAA4B,GAAG,IAAI,cAAc,CAC5D,6BAA6B;;ACJ/B;;;;AAIG;MAEmB,mBAAmB,CAAA;aACvB,IAAA,CAAA,QAAQ,GAAW,SAAX,CAAqB;AAkC7C,IAAA,WAAA,GAAA;;;QAlBS,IAAA,CAAA,UAAU,GAAqC,KAAK,CAAsB,EAAE;uFAAC;;QAG7E,IAAA,CAAA,UAAU,GAAyC,KAAK,CAA0B,EAAE;uFAAC;;;QAIrF,IAAA,CAAA,OAAO,GAAqC,KAAK,CAAsB,EAAE;oFAAC;;QAGnF,IAAA,CAAA,aAAa,GAA4B,EAAE;AAE1B,QAAA,IAAA,CAA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