@ng-doc/builder 22.0.0-beta.2 → 22.1.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/README.md +19 -28
- package/application/index.js +2 -2
- package/application/index.js.map +1 -1
- package/application/schema.json +1 -2
- package/builders.json +23 -13
- package/classes/observable-map.d.ts +1 -0
- package/classes/observable-map.js +14 -3
- package/classes/observable-map.js.map +1 -1
- package/classes/observable-set.js +2 -1
- package/classes/observable-set.js.map +1 -1
- package/dev-server/index.js +5 -3
- package/dev-server/index.js.map +1 -1
- package/engine/builders/api-list/api-list-component.builder.js +4 -4
- package/engine/builders/api-list/api-list-component.builder.js.map +1 -1
- package/engine/builders/api-list/api-page-template.builder.js +2 -2
- package/engine/builders/api-list/api-page-template.builder.js.map +1 -1
- package/engine/builders/global/keywords.builder.d.ts +1 -4
- package/engine/builders/global/keywords.builder.js +5 -9
- package/engine/builders/global/keywords.builder.js.map +1 -1
- package/engine/builders/global/search-indexes.builder.js +1 -1
- package/engine/builders/global/search-indexes.builder.js.map +1 -1
- package/engine/builders/helpers/create-entry-metadata.js +2 -1
- package/engine/builders/helpers/create-entry-metadata.js.map +1 -1
- package/engine/builders/helpers/create-import-path.js.map +1 -1
- package/engine/builders/helpers/get-entry-relative-path.js.map +1 -1
- package/engine/builders/helpers/get-playground-metadata.js +7 -1
- package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
- package/engine/builders/page/demo-assets.builder.js +10 -5
- package/engine/builders/page/demo-assets.builder.js.map +1 -1
- package/engine/builders/page/playground.builder.js +1 -0
- package/engine/builders/page/playground.builder.js.map +1 -1
- package/engine/builders/shared/content.builder.js +5 -3
- package/engine/builders/shared/content.builder.js.map +1 -1
- package/engine/builders/shared/page-component.builder.js +16 -6
- package/engine/builders/shared/page-component.builder.js.map +1 -1
- package/engine/builders/shared/page-wrapper.builder.js +10 -5
- package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
- package/engine/core/operators/distinct-pending.js.map +1 -1
- package/engine/core/operators/factory.js +1 -4
- package/engine/core/operators/factory.js.map +1 -1
- package/engine/core/operators/merge-factory.js +19 -17
- package/engine/core/operators/merge-factory.js.map +1 -1
- package/engine/core/operators/when-builders-done.js.map +1 -1
- package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
- package/engine/core/triggers/on-dependencies-change.js +2 -2
- package/engine/core/triggers/on-dependencies-change.js.map +1 -1
- package/generator/artifacts/index.d.ts +317 -0
- package/generator/bootstrap/bin.d.ts +18 -0
- package/generator/bootstrap/bin.js +7298 -0
- package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
- package/generator/bootstrap/cli.d.ts +42 -0
- package/generator/bootstrap/cli.js +7147 -0
- package/generator/bootstrap/constants.d.ts +4 -0
- package/generator/bootstrap/index.d.ts +111 -0
- package/generator/bootstrap/index.js +5034 -0
- package/generator/bootstrap/prerender-command.d.ts +31 -0
- package/generator/bootstrap/process-tree.d.ts +49 -0
- package/generator/build-metafile.json +12009 -0
- package/generator/build-provenance.json +121 -0
- package/generator/compiler/assemble.d.ts +41 -0
- package/generator/compiler/classify.d.ts +161 -0
- package/generator/compiler/closure-store.d.ts +55 -0
- package/generator/compiler/common.d.ts +32 -0
- package/generator/compiler/describe.d.ts +21 -0
- package/generator/compiler/dry-run.d.ts +108 -0
- package/generator/compiler/fast-start.d.ts +104 -0
- package/generator/compiler/fold.d.ts +116 -0
- package/generator/compiler/index.d.ts +131 -0
- package/generator/compiler/index.js +19009 -0
- package/generator/compiler/link.d.ts +38 -0
- package/generator/compiler/memo.d.ts +44 -0
- package/generator/compiler/plan.d.ts +116 -0
- package/generator/compiler/progress.d.ts +54 -0
- package/generator/compiler/render.d.ts +27 -0
- package/generator/compiler/retention.d.ts +181 -0
- package/generator/compiler/semantic-closure.d.ts +46 -0
- package/generator/compiler/targeted.d.ts +280 -0
- package/generator/content/code-snippet.d.ts +20 -0
- package/generator/content/content-compiler.d.ts +122 -0
- package/generator/content/format-cache.d.ts +108 -0
- package/generator/content/highlight-cache.d.ts +115 -0
- package/generator/content/html-pipeline.d.ts +179 -0
- package/generator/content/html-pool.d.ts +245 -0
- package/generator/content/html-worker.js +2181 -0
- package/generator/content-module-ids.d.ts +8 -0
- package/generator/contracts.d.ts +1102 -0
- package/generator/contracts.js +15 -0
- package/generator/discovery/index.d.ts +79 -0
- package/generator/graph/index.d.ts +211 -0
- package/generator/graph/unit-index.d.ts +216 -0
- package/generator/kernel/canonical.d.ts +57 -0
- package/generator/kernel/flags.d.ts +51 -0
- package/generator/kernel/footprint.d.ts +88 -0
- package/generator/kernel/observations.d.ts +68 -0
- package/generator/kernel/paths.d.ts +22 -0
- package/generator/kernel/runtime-identity.d.ts +11 -0
- package/generator/outputs/index.d.ts +80 -0
- package/generator/package.json +3 -0
- package/generator/progress/ci.d.ts +22 -0
- package/generator/progress/detect.d.ts +60 -0
- package/generator/progress/events.d.ts +126 -0
- package/generator/progress/format.d.ts +83 -0
- package/generator/progress/gate.d.ts +49 -0
- package/generator/progress/host.d.ts +29 -0
- package/generator/progress/lines.d.ts +42 -0
- package/generator/progress/live.d.ts +115 -0
- package/generator/progress/model.d.ts +85 -0
- package/generator/progress/reporter.d.ts +87 -0
- package/generator/progress/settings.d.ts +60 -0
- package/generator/semantic/angular.d.ts +29 -0
- package/generator/semantic/api-enumeration.d.ts +19 -0
- package/generator/semantic/api-summary.d.ts +33 -0
- package/generator/semantic/dependencies.d.ts +20 -0
- package/generator/semantic/derived-classes.d.ts +58 -0
- package/generator/semantic/documentation-cache.d.ts +23 -0
- package/generator/semantic/formatting.d.ts +27 -0
- package/generator/semantic/fragments.d.ts +37 -0
- package/generator/semantic/owned-roots.d.ts +59 -0
- package/generator/semantic/program-builder.d.ts +55 -0
- package/generator/semantic/program-index.d.ts +124 -0
- package/generator/semantic/program-inputs.d.ts +26 -0
- package/generator/semantic/program-observations.d.ts +158 -0
- package/generator/semantic/program-retention.d.ts +147 -0
- package/generator/semantic/program-state.d.ts +196 -0
- package/generator/semantic/program-verify.d.ts +22 -0
- package/generator/semantic/recorder.d.ts +89 -0
- package/generator/semantic/rendering.d.ts +34 -0
- package/generator/semantic/semantic-closure.d.ts +129 -0
- package/generator/semantic/semantic-service.d.ts +186 -0
- package/generator/semantic/type-text.d.ts +5 -0
- package/generator/session/build-session.d.ts +206 -0
- package/generator/session/input-verification.d.ts +38 -0
- package/generator/session/parcel-event-source.d.ts +22 -0
- package/generator/session/progress.d.ts +72 -0
- package/generator/session/unchanged-saves.d.ts +63 -0
- package/generator/session/watch-inputs.d.ts +6 -0
- package/generator/session/watch-signals.d.ts +10 -0
- package/generator/templates/api/base.html.nunj +26 -0
- package/generator/templates/api/class-declaration.html.nunj +59 -0
- package/generator/templates/api/details/class-declaration.html.nunj +47 -0
- package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
- package/generator/templates/api/details/function-declaration.html.nunj +14 -0
- package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
- package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
- package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
- package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
- package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
- package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
- package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
- package/generator/templates/api/details.html.nunj +9 -0
- package/generator/templates/api/enum-declaration.html.nunj +12 -0
- package/generator/templates/api/function-declaration.html.nunj +35 -0
- package/generator/templates/api/interface-declaration.html.nunj +37 -0
- package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
- package/generator/templates/api/variable-declaration.html.nunj +8 -0
- package/generator/templates/api-header.html.nunj +11 -0
- package/generator/templates/api-list.ts.nunj +22 -0
- package/generator/templates/api-page-content.html.nunj +1 -0
- package/generator/templates/api-scope.ts.nunj +22 -0
- package/generator/templates/category.ts.nunj +22 -0
- package/generator/templates/code.html.nunj +3 -0
- package/generator/templates/context.ts.nunj +55 -0
- package/generator/templates/demo-app.ts.nunj +37 -0
- package/generator/templates/demo-assets.ts.nunj +25 -0
- package/generator/templates/demo-routes.ts.nunj +23 -0
- package/generator/templates/helpers/accessor.html.nunj +76 -0
- package/generator/templates/helpers/accessors.html.nunj +7 -0
- package/generator/templates/helpers/badge.html.nunj +4 -0
- package/generator/templates/helpers/call-signature.html.nunj +70 -0
- package/generator/templates/helpers/code.html.nunj +3 -0
- package/generator/templates/helpers/constructor.html.nunj +32 -0
- package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
- package/generator/templates/helpers/decorators.html.nunj +11 -0
- package/generator/templates/helpers/members.html.nunj +29 -0
- package/generator/templates/helpers/method.html.nunj +89 -0
- package/generator/templates/helpers/methods.html.nunj +7 -0
- package/generator/templates/helpers/modifier.html.nunj +4 -0
- package/generator/templates/helpers/no-content.html.nunj +3 -0
- package/generator/templates/helpers/overload.html.nunj +57 -0
- package/generator/templates/helpers/parameters.html.nunj +44 -0
- package/generator/templates/helpers/properties.html.nunj +61 -0
- package/generator/templates/helpers/status.html.nunj +33 -0
- package/generator/templates/helpers/tag.html.nunj +4 -0
- package/generator/templates/helpers/type.html.nunj +11 -0
- package/generator/templates/index.ts.nunj +7 -0
- package/generator/templates/page-header.html.nunj +5 -0
- package/generator/templates/page-wrapper.ts.nunj +69 -0
- package/generator/templates/page.ts.nunj +104 -0
- package/generator/templates/parts/examples.html.nunj +11 -0
- package/generator/templates/parts/member-examples.html.nunj +12 -0
- package/generator/templates/parts/member-remarks.html.nunj +8 -0
- package/generator/templates/parts/page-tags.html.nunj +10 -0
- package/generator/templates/parts/remarks.html.nunj +10 -0
- package/generator/templates/parts/see-also.html.nunj +23 -0
- package/generator/templates/parts/usage-notes.html.nunj +8 -0
- package/generator/templates/playgrounds.ts.nunj +63 -0
- package/generator/templates/routes.ts.nunj +53 -0
- package/generator/templates/symbol/decorators.html.nunj +12 -0
- package/generator/templates/symbol/details.html.nunj +62 -0
- package/generator/templates/symbol/extended-by.html.nunj +17 -0
- package/generator/templates/symbol/header.html.nunj +22 -0
- package/generator/templates/symbol/members.html.nunj +303 -0
- package/generator/templates/symbol/page.html.nunj +76 -0
- package/generator/templates/symbol/see-also.html.nunj +16 -0
- package/generator/vite/angular/ANALOG-LICENSE +21 -0
- package/generator/vite/angular/analog-provenance.json +880 -0
- package/generator/vite/angular/index.d.ts +14 -0
- package/generator/vite/angular/index.js +7300 -0
- package/generator/vite/angular-compatibility.d.ts +6 -0
- package/generator/vite/angular-composition.d.ts +68 -0
- package/generator/vite/angular-version.d.ts +38 -0
- package/generator/vite/application-builder.js +336 -0
- package/generator/vite/application-builder.schema.json +46 -0
- package/generator/vite/application.d.ts +105 -0
- package/generator/vite/assets.d.ts +11 -0
- package/generator/vite/bounded-close.d.ts +33 -0
- package/generator/vite/component-updates.d.ts +21 -0
- package/generator/vite/configuration.d.ts +3 -0
- package/generator/vite/demo-application.d.ts +34 -0
- package/generator/vite/dev-server-builder.js +339 -0
- package/generator/vite/dev-server-builder.schema.json +27 -0
- package/generator/vite/dev-styles.d.ts +65 -0
- package/generator/vite/diagnostics.d.ts +4 -0
- package/generator/vite/external-probes.d.ts +40 -0
- package/generator/vite/host-updates.d.ts +212 -0
- package/generator/vite/index.d.ts +13 -0
- package/generator/vite/index.js +11949 -0
- package/generator/vite/lease.d.ts +6 -0
- package/generator/vite/lifecycle.d.ts +120 -0
- package/generator/vite/mime.d.ts +2 -0
- package/generator/vite/missing-paths.d.ts +44 -0
- package/generator/vite/options.d.ts +87 -0
- package/generator/vite/output-watch.d.ts +41 -0
- package/generator/vite/paths.d.ts +7 -0
- package/generator/vite/plugin.d.ts +3 -0
- package/generator/vite/prerender-entry.js +465 -0
- package/generator/vite/prerender-runtime.d.ts +79 -0
- package/generator/vite/prerender.d.ts +29 -0
- package/generator/vite/production.d.ts +66 -0
- package/generator/vite/progress.d.ts +33 -0
- package/generator/vite/restore-theme.js +13 -0
- package/generator/vite/route-inventory.d.ts +24 -0
- package/generator/vite/ssr-renderer-control.d.ts +1 -0
- package/generator/vite/ssr-renderer-entry.js +444 -0
- package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
- package/generator/vite/ssr-renderer.d.ts +74 -0
- package/generator/vite/theme-index.d.ts +13 -0
- package/generator/vite/tsconfig-paths.d.ts +64 -0
- package/generator/vite/vite-event-source.d.ts +198 -0
- package/generator/vite/vite-version.d.ts +26 -0
- package/generator/vite/watch-inputs.d.ts +39 -0
- package/generator/worker/entry.d.ts +1 -0
- package/generator/worker/entry.js +614 -0
- package/generator/worker/index.d.ts +156 -0
- package/generator/worker/index.js +1030 -0
- package/generator/worker/protocol.d.ts +160 -0
- package/helpers/angular/get-component-decorator.js +6 -6
- package/helpers/angular/get-component-decorator.js.map +1 -1
- package/helpers/angular/get-directive-decorator.js +3 -3
- package/helpers/angular/get-directive-decorator.js.map +1 -1
- package/helpers/angular/get-pipe-decorator.js +3 -3
- package/helpers/angular/get-pipe-decorator.js.map +1 -1
- package/helpers/build-indexes.js +5 -2
- package/helpers/build-indexes.js.map +1 -1
- package/helpers/construct-page-keyword.js +2 -1
- package/helpers/construct-page-keyword.js.map +1 -1
- package/helpers/extract-selectors.d.ts +1 -1
- package/helpers/extract-selectors.js +5 -3
- package/helpers/extract-selectors.js.map +1 -1
- package/helpers/filter-useless-members.d.ts +1 -1
- package/helpers/format-cache.d.ts +34 -0
- package/helpers/format-cache.js +26 -0
- package/helpers/format-cache.js.map +1 -0
- package/helpers/format-code.d.ts +2 -1
- package/helpers/format-code.js +20 -4
- package/helpers/format-code.js.map +1 -1
- package/helpers/import-fresh-esm.js.map +1 -1
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +2 -0
- package/helpers/index.js.map +1 -1
- package/helpers/keyword-heading-title.d.ts +7 -0
- package/helpers/keyword-heading-title.js +21 -0
- package/helpers/keyword-heading-title.js.map +1 -0
- package/helpers/markdown-to-html.js +3 -3
- package/helpers/markdown-to-html.js.map +1 -1
- package/helpers/navigation-title-order.d.ts +8 -0
- package/helpers/navigation-title-order.js +15 -0
- package/helpers/navigation-title-order.js.map +1 -0
- package/helpers/playground/get-playground-inputs.js +8 -4
- package/helpers/playground/get-playground-inputs.js.map +1 -1
- package/helpers/playground/get-playground-template-inputs.js +2 -1
- package/helpers/playground/get-playground-template-inputs.js.map +1 -1
- package/helpers/presentation.d.ts +7 -7
- package/helpers/presentation.js +23 -23
- package/helpers/presentation.js.map +1 -1
- package/helpers/print.js +32 -5
- package/helpers/print.js.map +1 -1
- package/helpers/process-snippets.d.ts +1 -1
- package/helpers/process-snippets.js +3 -3
- package/helpers/process-snippets.js.map +1 -1
- package/helpers/snippets-from-asset.d.ts +1 -1
- package/helpers/snippets-from-asset.js +2 -2
- package/helpers/snippets-from-asset.js.map +1 -1
- package/helpers/sort-navigation-entities.js +2 -1
- package/helpers/sort-navigation-entities.js.map +1 -1
- package/helpers/stable-generated-id.d.ts +2 -0
- package/helpers/stable-generated-id.js +12 -0
- package/helpers/stable-generated-id.js.map +1 -0
- package/helpers/text-order.d.ts +8 -0
- package/helpers/text-order.js +26 -0
- package/helpers/text-order.js.map +1 -0
- package/helpers/to-template-string.d.ts +5 -1
- package/helpers/to-template-string.js +7 -2
- package/helpers/to-template-string.js.map +1 -1
- package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
- package/helpers/typescript/member/get-inherited-parent.js +2 -2
- package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
- package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
- package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
- package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
- package/helpers/typescript/property/get-property-assignment.js.map +1 -1
- package/interfaces/code-block-options.d.ts +5 -0
- package/interfaces/configuration.d.ts +84 -1
- package/package.json +87 -29
- package/parsers/helpers/number.d.ts +1 -1
- package/parsers/helpers/number.js +2 -2
- package/parsers/helpers/number.js.map +1 -1
- package/parsers/helpers/param-value.d.ts +1 -1
- package/parsers/helpers/param-value.js +2 -2
- package/parsers/helpers/param-value.js.map +1 -1
- package/parsers/helpers/param.js +3 -3
- package/parsers/helpers/param.js.map +1 -1
- package/parsers/parse-code-block-params.d.ts +11 -2
- package/parsers/parse-code-block-params.js +50 -18
- package/parsers/parse-code-block-params.js.map +1 -1
- package/parsers/parse-snippet.js +10 -10
- package/parsers/parse-snippet.js.map +1 -1
- package/schematics/collection.json +34 -23
- package/schematics/migrate-to-vite/analyze.d.ts +76 -0
- package/schematics/migrate-to-vite/analyze.js +859 -0
- package/schematics/migrate-to-vite/analyze.js.map +1 -0
- package/schematics/migrate-to-vite/index.d.ts +9 -0
- package/schematics/migrate-to-vite/index.js +585 -0
- package/schematics/migrate-to-vite/index.js.map +1 -0
- package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
- package/schematics/migrate-to-vite/legacy-folder.js +340 -0
- package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
- package/schematics/migrate-to-vite/report.d.ts +32 -0
- package/schematics/migrate-to-vite/report.js +97 -0
- package/schematics/migrate-to-vite/report.js.map +1 -0
- package/schematics/migrate-to-vite/schema.d.ts +13 -0
- package/schematics/migrate-to-vite/schema.js +3 -0
- package/schematics/migrate-to-vite/schema.js.map +1 -0
- package/schematics/migrate-to-vite/schema.json +31 -0
- package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
- package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
- package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
- package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
- package/schematics/migrate-to-vite/setup/index.js +13 -0
- package/schematics/migrate-to-vite/setup/index.js.map +1 -0
- package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
- package/schematics/migrate-to-vite/setup/json-file.js +115 -0
- package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
- package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
- package/schematics/migrate-to-vite/setup/source.js +202 -0
- package/schematics/migrate-to-vite/setup/source.js.map +1 -0
- package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
- package/schematics/migrate-to-vite/setup/targets.js +48 -0
- package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
- package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
- package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
- package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
- package/schematics/migrate-to-vite/setup/workspace.d.ts +105 -0
- package/schematics/migrate-to-vite/setup/workspace.js +245 -0
- package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
- package/schematics/migrate-to-vite/state.d.ts +65 -0
- package/schematics/migrate-to-vite/state.js +92 -0
- package/schematics/migrate-to-vite/state.js.map +1 -0
- package/schematics/migrate-to-vite/testing/fixtures.d.ts +30 -0
- package/schematics/migrate-to-vite/testing/fixtures.js +306 -0
- package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
- package/schematics/migrate-to-vite/update-note.d.ts +6 -0
- package/schematics/migrate-to-vite/update-note.js +23 -0
- package/schematics/migrate-to-vite/update-note.js.map +1 -0
- package/schematics/migration.json +5 -0
- package/schematics/migrations/standalone-pages/index.js +7 -6
- package/schematics/migrations/standalone-pages/index.js.map +1 -1
- package/schematics/vite-setup/index.d.ts +24 -0
- package/schematics/vite-setup/index.js +212 -0
- package/schematics/vite-setup/index.js.map +1 -0
- package/schematics/vite-setup/schema.d.ts +7 -0
- package/schematics/vite-setup/schema.js +3 -0
- package/schematics/vite-setup/schema.js.map +1 -0
- package/schematics/vite-setup/schema.json +19 -0
- package/scripts/restore-theme.js +9 -2
- package/templates/api/class-declaration.html.nunj +5 -3
- package/templates/context.ts.nunj +3 -0
- package/templates/demo-app.ts.nunj +37 -0
- package/templates/demo-routes.ts.nunj +23 -0
- package/templates/helpers/badge.html.nunj +1 -1
- package/templates/helpers/status.html.nunj +4 -8
- package/templates/index.ts.nunj +5 -0
- package/templates/page-wrapper.ts.nunj +30 -2
- package/templates/page.ts.nunj +33 -1
- package/templates/parts/page-tags.html.nunj +1 -1
- package/templates/playgrounds.ts.nunj +8 -9
- package/templates/routes.ts.nunj +10 -1
- package/templates/symbol/decorators.html.nunj +12 -0
- package/templates/symbol/details.html.nunj +62 -0
- package/templates/symbol/extended-by.html.nunj +17 -0
- package/templates/symbol/header.html.nunj +22 -0
- package/templates/symbol/members.html.nunj +303 -0
- package/templates/symbol/page.html.nunj +76 -0
- package/templates/symbol/see-also.html.nunj +16 -0
- package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
- package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
- package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
- package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
- package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
- package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
- package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
- package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
|
@@ -0,0 +1,2181 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __esm = (fn, res) => function __init() {
|
|
4
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
|
+
};
|
|
6
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
7
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
8
|
+
};
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// libs/builder/generator/contracts.ts
|
|
15
|
+
var init_contracts = __esm({
|
|
16
|
+
"libs/builder/generator/contracts.ts"() {
|
|
17
|
+
"use strict";
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// libs/builder/generator/kernel/canonical.ts
|
|
22
|
+
import { createHash } from "node:crypto";
|
|
23
|
+
function compareCodeUnits(left, right) {
|
|
24
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
25
|
+
}
|
|
26
|
+
function sha256Hex(value) {
|
|
27
|
+
return createHash("sha256").update(value).digest("hex");
|
|
28
|
+
}
|
|
29
|
+
function canonicalJson(value) {
|
|
30
|
+
return canonical(value, /* @__PURE__ */ new Set()) ?? "null";
|
|
31
|
+
}
|
|
32
|
+
function canonical(value, path) {
|
|
33
|
+
if (value !== null && typeof value === "object" && typeof value.toJSON === "function")
|
|
34
|
+
value = value.toJSON();
|
|
35
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
36
|
+
if (path.has(value)) throw new TypeError("Converting circular structure to canonical JSON");
|
|
37
|
+
path.add(value);
|
|
38
|
+
let text;
|
|
39
|
+
if (Array.isArray(value)) {
|
|
40
|
+
text = `[${Array.from(value, (item) => canonical(item, path) ?? "null").join(",")}]`;
|
|
41
|
+
} else {
|
|
42
|
+
const fields = [];
|
|
43
|
+
for (const key of Object.keys(value).sort(compareCodeUnits)) {
|
|
44
|
+
const item = canonical(value[key], path);
|
|
45
|
+
if (item !== void 0) fields.push(`${JSON.stringify(key)}:${item}`);
|
|
46
|
+
}
|
|
47
|
+
text = `{${fields.join(",")}}`;
|
|
48
|
+
}
|
|
49
|
+
path.delete(value);
|
|
50
|
+
return text;
|
|
51
|
+
}
|
|
52
|
+
function digestOf(value) {
|
|
53
|
+
return sha256Hex(canonicalJson(value));
|
|
54
|
+
}
|
|
55
|
+
var init_canonical = __esm({
|
|
56
|
+
"libs/builder/generator/kernel/canonical.ts"() {
|
|
57
|
+
"use strict";
|
|
58
|
+
init_contracts();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// libs/builder/generator/worker/protocol.ts
|
|
63
|
+
function encode(value) {
|
|
64
|
+
const result = JSON.stringify(
|
|
65
|
+
value,
|
|
66
|
+
function(key, item) {
|
|
67
|
+
const original = this[key];
|
|
68
|
+
if (typeof item === "function" || typeof item === "symbol" || typeof item === "bigint" || typeof item === "number" && !Number.isFinite(item) || original !== null && typeof original === "object" && !Array.isArray(original) && (Object.getPrototypeOf(original) !== Object.prototype && Object.getPrototypeOf(original) !== null || typeof original.toJSON === "function"))
|
|
69
|
+
throw new Error("Worker transport requires JSON values");
|
|
70
|
+
return item;
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
if (result === void 0) throw new Error("Worker transport requires a JSON value");
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
function decode(value) {
|
|
77
|
+
if (typeof value !== "string") throw new Error("Worker message must be JSON text");
|
|
78
|
+
const parsed = JSON.parse(value);
|
|
79
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
80
|
+
throw new Error("Worker message must be an object");
|
|
81
|
+
}
|
|
82
|
+
return parsed;
|
|
83
|
+
}
|
|
84
|
+
var init_protocol = __esm({
|
|
85
|
+
"libs/builder/generator/worker/protocol.ts"() {
|
|
86
|
+
"use strict";
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// libs/utils/html/minify.ts
|
|
91
|
+
import rehypeMinifyWhitespace from "rehype-minify-whitespace";
|
|
92
|
+
import rehypeParse from "rehype-parse";
|
|
93
|
+
import rehypeStringify from "rehype-stringify";
|
|
94
|
+
import { unified } from "unified";
|
|
95
|
+
function minify(html) {
|
|
96
|
+
return unified().use(rehypeParse, { fragment: true }).use(rehypeStringify).use(rehypeMinifyWhitespace).processSync(html).toString();
|
|
97
|
+
}
|
|
98
|
+
var init_minify = __esm({
|
|
99
|
+
"libs/utils/html/minify.ts"() {
|
|
100
|
+
"use strict";
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// libs/core/constants/angular-entities.ts
|
|
105
|
+
var init_angular_entities = __esm({
|
|
106
|
+
"libs/core/constants/angular-entities.ts"() {
|
|
107
|
+
"use strict";
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// libs/core/constants/declarations.ts
|
|
112
|
+
var init_declarations = __esm({
|
|
113
|
+
"libs/core/constants/declarations.ts"() {
|
|
114
|
+
"use strict";
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// libs/core/constants/defaults.ts
|
|
119
|
+
var NG_DOC_ELEMENT;
|
|
120
|
+
var init_defaults = __esm({
|
|
121
|
+
"libs/core/constants/defaults.ts"() {
|
|
122
|
+
"use strict";
|
|
123
|
+
NG_DOC_ELEMENT = "ngde";
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// libs/core/constants/dynamic-selector.ts
|
|
128
|
+
var init_dynamic_selector = __esm({
|
|
129
|
+
"libs/core/constants/dynamic-selector.ts"() {
|
|
130
|
+
"use strict";
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// libs/core/constants/empty.ts
|
|
135
|
+
var init_empty = __esm({
|
|
136
|
+
"libs/core/constants/empty.ts"() {
|
|
137
|
+
"use strict";
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// libs/core/constants/syntax-theme.ts
|
|
142
|
+
function ngDocSyntaxTheme() {
|
|
143
|
+
return {
|
|
144
|
+
name: NG_DOC_SYNTAX_THEME_NAME,
|
|
145
|
+
type: "light",
|
|
146
|
+
colors: {
|
|
147
|
+
"editor.foreground": syntax("plain"),
|
|
148
|
+
"editor.background": "var(--ng-doc-code-background)"
|
|
149
|
+
},
|
|
150
|
+
// A more specific scope wins over a shorter one, so the order below does not matter.
|
|
151
|
+
tokenColors: [
|
|
152
|
+
{
|
|
153
|
+
scope: ["comment", "punctuation.definition.comment", "string.quoted.docstring"],
|
|
154
|
+
settings: { foreground: syntax("comment"), fontStyle: "italic" }
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
scope: [
|
|
158
|
+
"punctuation",
|
|
159
|
+
"meta.brace",
|
|
160
|
+
"keyword.operator",
|
|
161
|
+
"punctuation.definition.tag",
|
|
162
|
+
"punctuation.definition.template-expression",
|
|
163
|
+
"punctuation.section.embedded"
|
|
164
|
+
],
|
|
165
|
+
settings: { foreground: syntax("punctuation") }
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
scope: [
|
|
169
|
+
"keyword",
|
|
170
|
+
"storage",
|
|
171
|
+
"keyword.operator.new",
|
|
172
|
+
"keyword.operator.expression",
|
|
173
|
+
"keyword.operator.word",
|
|
174
|
+
"variable.language",
|
|
175
|
+
"markup.heading"
|
|
176
|
+
],
|
|
177
|
+
settings: { foreground: syntax("keyword") }
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
scope: [
|
|
181
|
+
"entity.name.type",
|
|
182
|
+
"entity.name.class",
|
|
183
|
+
"entity.name.namespace",
|
|
184
|
+
"entity.other.inherited-class",
|
|
185
|
+
"support.type",
|
|
186
|
+
"support.class",
|
|
187
|
+
"markup.underline.link"
|
|
188
|
+
],
|
|
189
|
+
settings: { foreground: syntax("type") }
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
scope: [
|
|
193
|
+
"entity.name.function",
|
|
194
|
+
"support.function",
|
|
195
|
+
"variable.function",
|
|
196
|
+
"entity.other.attribute-name"
|
|
197
|
+
],
|
|
198
|
+
settings: { foreground: syntax("function") }
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
scope: [
|
|
202
|
+
"string",
|
|
203
|
+
"punctuation.definition.string",
|
|
204
|
+
"markup.inline.raw",
|
|
205
|
+
"markup.fenced_code"
|
|
206
|
+
],
|
|
207
|
+
settings: { foreground: syntax("string") }
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
// Code embedded in a string, such as a template literal's `${…}`.
|
|
211
|
+
scope: ["meta.template.expression", "meta.embedded"],
|
|
212
|
+
settings: { foreground: syntax("plain") }
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
scope: [
|
|
216
|
+
"constant.numeric",
|
|
217
|
+
"constant.language",
|
|
218
|
+
"constant.character",
|
|
219
|
+
"constant.other",
|
|
220
|
+
"keyword.other.unit"
|
|
221
|
+
],
|
|
222
|
+
settings: { foreground: syntax("number") }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
scope: ["entity.name.tag", "support.class.component"],
|
|
226
|
+
settings: { foreground: syntax("tag") }
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
// The `@` and the decorator name; its arguments keep their own colours.
|
|
230
|
+
scope: ["punctuation.decorator", "meta.decorator entity.name.function"],
|
|
231
|
+
settings: { foreground: syntax("decorator") }
|
|
232
|
+
},
|
|
233
|
+
{ scope: ["markup.bold", "markup.heading"], settings: { fontStyle: "bold" } },
|
|
234
|
+
{ scope: ["markup.italic"], settings: { fontStyle: "italic" } }
|
|
235
|
+
]
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
var NG_DOC_SYNTAX_THEME_NAME, syntax;
|
|
239
|
+
var init_syntax_theme = __esm({
|
|
240
|
+
"libs/core/constants/syntax-theme.ts"() {
|
|
241
|
+
"use strict";
|
|
242
|
+
NG_DOC_SYNTAX_THEME_NAME = "css-variables";
|
|
243
|
+
syntax = (token) => `var(--ng-doc-syntax-${token})`;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// libs/core/constants/index.ts
|
|
248
|
+
var init_constants = __esm({
|
|
249
|
+
"libs/core/constants/index.ts"() {
|
|
250
|
+
"use strict";
|
|
251
|
+
init_angular_entities();
|
|
252
|
+
init_declarations();
|
|
253
|
+
init_defaults();
|
|
254
|
+
init_dynamic_selector();
|
|
255
|
+
init_empty();
|
|
256
|
+
init_syntax_theme();
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
// libs/core/helpers/is-iterable.ts
|
|
261
|
+
function isIterable(value) {
|
|
262
|
+
return value !== null && typeof value[Symbol.iterator] === "function" && typeof value !== "string";
|
|
263
|
+
}
|
|
264
|
+
var init_is_iterable = __esm({
|
|
265
|
+
"libs/core/helpers/is-iterable.ts"() {
|
|
266
|
+
"use strict";
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
// libs/core/helpers/is-present.ts
|
|
271
|
+
function isPresent(value) {
|
|
272
|
+
return value !== void 0 && value !== null && (typeof value !== "string" || value !== "");
|
|
273
|
+
}
|
|
274
|
+
var init_is_present = __esm({
|
|
275
|
+
"libs/core/helpers/is-present.ts"() {
|
|
276
|
+
"use strict";
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
// libs/core/helpers/as-array.ts
|
|
281
|
+
function asArray(...items) {
|
|
282
|
+
return items.map((data) => {
|
|
283
|
+
if (!isPresent(data)) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
return Array.isArray(data) ? data : isIterable(data) ? Array.from(data) : [data];
|
|
287
|
+
}).flat();
|
|
288
|
+
}
|
|
289
|
+
var init_as_array = __esm({
|
|
290
|
+
"libs/core/helpers/as-array.ts"() {
|
|
291
|
+
"use strict";
|
|
292
|
+
init_is_iterable();
|
|
293
|
+
init_is_present();
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// libs/core/helpers/is-node-tag.ts
|
|
298
|
+
var init_is_node_tag = __esm({
|
|
299
|
+
"libs/core/helpers/is-node-tag.ts"() {
|
|
300
|
+
"use strict";
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
// libs/core/helpers/object-keys.ts
|
|
305
|
+
var init_object_keys = __esm({
|
|
306
|
+
"libs/core/helpers/object-keys.ts"() {
|
|
307
|
+
"use strict";
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// libs/core/helpers/build-playground-demo-template.ts
|
|
312
|
+
import * as CSSWhat from "css-what";
|
|
313
|
+
import { SelectorType } from "css-what";
|
|
314
|
+
var init_build_playground_demo_template = __esm({
|
|
315
|
+
"libs/core/helpers/build-playground-demo-template.ts"() {
|
|
316
|
+
"use strict";
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// libs/core/helpers/capitalize.ts
|
|
321
|
+
var init_capitalize = __esm({
|
|
322
|
+
"libs/core/helpers/capitalize.ts"() {
|
|
323
|
+
"use strict";
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// libs/core/helpers/escape-html.ts
|
|
328
|
+
var init_escape_html = __esm({
|
|
329
|
+
"libs/core/helpers/escape-html.ts"() {
|
|
330
|
+
"use strict";
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
// libs/core/helpers/escape-regexp.ts
|
|
335
|
+
var init_escape_regexp = __esm({
|
|
336
|
+
"libs/core/helpers/escape-regexp.ts"() {
|
|
337
|
+
"use strict";
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// libs/core/helpers/extract-value.ts
|
|
342
|
+
var init_extract_value = __esm({
|
|
343
|
+
"libs/core/helpers/extract-value.ts"() {
|
|
344
|
+
"use strict";
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
// libs/core/helpers/extract-function-defaults.ts
|
|
349
|
+
var init_extract_function_defaults = __esm({
|
|
350
|
+
"libs/core/helpers/extract-function-defaults.ts"() {
|
|
351
|
+
"use strict";
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
// libs/core/helpers/get-assigned-inputs.ts
|
|
356
|
+
var init_get_assigned_inputs = __esm({
|
|
357
|
+
"libs/core/helpers/get-assigned-inputs.ts"() {
|
|
358
|
+
"use strict";
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
// libs/core/helpers/is-keyboard-event.ts
|
|
363
|
+
var init_is_keyboard_event = __esm({
|
|
364
|
+
"libs/core/helpers/is-keyboard-event.ts"() {
|
|
365
|
+
"use strict";
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
// libs/core/helpers/is-route.ts
|
|
370
|
+
var init_is_route = __esm({
|
|
371
|
+
"libs/core/helpers/is-route.ts"() {
|
|
372
|
+
"use strict";
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
// libs/core/helpers/is-same-object.ts
|
|
377
|
+
var init_is_same_object = __esm({
|
|
378
|
+
"libs/core/helpers/is-same-object.ts"() {
|
|
379
|
+
"use strict";
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
// libs/core/helpers/kebab-case.ts
|
|
384
|
+
var init_kebab_case = __esm({
|
|
385
|
+
"libs/core/helpers/kebab-case.ts"() {
|
|
386
|
+
"use strict";
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// libs/core/helpers/stringify.ts
|
|
391
|
+
var init_stringify = __esm({
|
|
392
|
+
"libs/core/helpers/stringify.ts"() {
|
|
393
|
+
"use strict";
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
// libs/core/helpers/uid.ts
|
|
398
|
+
var init_uid = __esm({
|
|
399
|
+
"libs/core/helpers/uid.ts"() {
|
|
400
|
+
"use strict";
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
// libs/core/helpers/unique.ts
|
|
405
|
+
var init_unique = __esm({
|
|
406
|
+
"libs/core/helpers/unique.ts"() {
|
|
407
|
+
"use strict";
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
// libs/core/helpers/index.ts
|
|
412
|
+
var init_helpers = __esm({
|
|
413
|
+
"libs/core/helpers/index.ts"() {
|
|
414
|
+
"use strict";
|
|
415
|
+
init_as_array();
|
|
416
|
+
init_build_playground_demo_template();
|
|
417
|
+
init_capitalize();
|
|
418
|
+
init_escape_html();
|
|
419
|
+
init_escape_regexp();
|
|
420
|
+
init_extract_function_defaults();
|
|
421
|
+
init_extract_value();
|
|
422
|
+
init_get_assigned_inputs();
|
|
423
|
+
init_is_iterable();
|
|
424
|
+
init_is_keyboard_event();
|
|
425
|
+
init_is_node_tag();
|
|
426
|
+
init_is_present();
|
|
427
|
+
init_is_route();
|
|
428
|
+
init_is_same_object();
|
|
429
|
+
init_kebab_case();
|
|
430
|
+
init_object_keys();
|
|
431
|
+
init_stringify();
|
|
432
|
+
init_uid();
|
|
433
|
+
init_unique();
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
// libs/core/interfaces/api.ts
|
|
438
|
+
var init_api = __esm({
|
|
439
|
+
"libs/core/interfaces/api.ts"() {
|
|
440
|
+
"use strict";
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
// libs/core/interfaces/api-list.ts
|
|
445
|
+
var init_api_list = __esm({
|
|
446
|
+
"libs/core/interfaces/api-list.ts"() {
|
|
447
|
+
"use strict";
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// libs/core/interfaces/api-list-item.ts
|
|
452
|
+
var init_api_list_item = __esm({
|
|
453
|
+
"libs/core/interfaces/api-list-item.ts"() {
|
|
454
|
+
"use strict";
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
// libs/core/interfaces/api-scope.ts
|
|
459
|
+
var init_api_scope = __esm({
|
|
460
|
+
"libs/core/interfaces/api-scope.ts"() {
|
|
461
|
+
"use strict";
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
// libs/core/interfaces/base-entity.ts
|
|
466
|
+
var init_base_entity = __esm({
|
|
467
|
+
"libs/core/interfaces/base-entity.ts"() {
|
|
468
|
+
"use strict";
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
// libs/core/interfaces/category.ts
|
|
473
|
+
var init_category = __esm({
|
|
474
|
+
"libs/core/interfaces/category.ts"() {
|
|
475
|
+
"use strict";
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
// libs/core/interfaces/content-module.ts
|
|
480
|
+
var init_content_module = __esm({
|
|
481
|
+
"libs/core/interfaces/content-module.ts"() {
|
|
482
|
+
"use strict";
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
// libs/core/interfaces/demo-options.ts
|
|
487
|
+
var init_demo_options = __esm({
|
|
488
|
+
"libs/core/interfaces/demo-options.ts"() {
|
|
489
|
+
"use strict";
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
// libs/core/interfaces/js-doc-metadata.ts
|
|
494
|
+
var init_js_doc_metadata = __esm({
|
|
495
|
+
"libs/core/interfaces/js-doc-metadata.ts"() {
|
|
496
|
+
"use strict";
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
// libs/core/interfaces/keyword-map.ts
|
|
501
|
+
var KEYWORD_ALLOWED_LANGUAGES;
|
|
502
|
+
var init_keyword_map = __esm({
|
|
503
|
+
"libs/core/interfaces/keyword-map.ts"() {
|
|
504
|
+
"use strict";
|
|
505
|
+
KEYWORD_ALLOWED_LANGUAGES = ["html"];
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
// libs/core/interfaces/page.ts
|
|
510
|
+
var init_page = __esm({
|
|
511
|
+
"libs/core/interfaces/page.ts"() {
|
|
512
|
+
"use strict";
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
// libs/core/interfaces/page-anchor.ts
|
|
517
|
+
var init_page_anchor = __esm({
|
|
518
|
+
"libs/core/interfaces/page-anchor.ts"() {
|
|
519
|
+
"use strict";
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
// libs/core/interfaces/page-info.ts
|
|
524
|
+
var init_page_info = __esm({
|
|
525
|
+
"libs/core/interfaces/page-info.ts"() {
|
|
526
|
+
"use strict";
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
// libs/core/interfaces/playground-config.ts
|
|
531
|
+
var init_playground_config = __esm({
|
|
532
|
+
"libs/core/interfaces/playground-config.ts"() {
|
|
533
|
+
"use strict";
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// libs/core/interfaces/playground-content.ts
|
|
538
|
+
var init_playground_content = __esm({
|
|
539
|
+
"libs/core/interfaces/playground-content.ts"() {
|
|
540
|
+
"use strict";
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
// libs/core/interfaces/playground-data.ts
|
|
545
|
+
var init_playground_data = __esm({
|
|
546
|
+
"libs/core/interfaces/playground-data.ts"() {
|
|
547
|
+
"use strict";
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
// libs/core/interfaces/playground-options.ts
|
|
552
|
+
var init_playground_options = __esm({
|
|
553
|
+
"libs/core/interfaces/playground-options.ts"() {
|
|
554
|
+
"use strict";
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
|
|
558
|
+
// libs/core/interfaces/section-index.ts
|
|
559
|
+
var init_section_index = __esm({
|
|
560
|
+
"libs/core/interfaces/section-index.ts"() {
|
|
561
|
+
"use strict";
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
// libs/core/interfaces/index.ts
|
|
566
|
+
var init_interfaces = __esm({
|
|
567
|
+
"libs/core/interfaces/index.ts"() {
|
|
568
|
+
"use strict";
|
|
569
|
+
init_api();
|
|
570
|
+
init_api_list();
|
|
571
|
+
init_api_list_item();
|
|
572
|
+
init_api_scope();
|
|
573
|
+
init_base_entity();
|
|
574
|
+
init_category();
|
|
575
|
+
init_content_module();
|
|
576
|
+
init_demo_options();
|
|
577
|
+
init_js_doc_metadata();
|
|
578
|
+
init_keyword_map();
|
|
579
|
+
init_page();
|
|
580
|
+
init_page_anchor();
|
|
581
|
+
init_page_info();
|
|
582
|
+
init_playground_config();
|
|
583
|
+
init_playground_content();
|
|
584
|
+
init_playground_data();
|
|
585
|
+
init_playground_options();
|
|
586
|
+
init_section_index();
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
// libs/core/types/code-type.ts
|
|
591
|
+
var init_code_type = __esm({
|
|
592
|
+
"libs/core/types/code-type.ts"() {
|
|
593
|
+
"use strict";
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
// libs/core/types/constructor.ts
|
|
598
|
+
var init_constructor = __esm({
|
|
599
|
+
"libs/core/types/constructor.ts"() {
|
|
600
|
+
"use strict";
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
// libs/core/types/entity-type.ts
|
|
605
|
+
var init_entity_type = __esm({
|
|
606
|
+
"libs/core/types/entity-type.ts"() {
|
|
607
|
+
"use strict";
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
// libs/core/types/extracted-value.ts
|
|
612
|
+
var init_extracted_value = __esm({
|
|
613
|
+
"libs/core/types/extracted-value.ts"() {
|
|
614
|
+
"use strict";
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
|
|
618
|
+
// libs/core/types/function.ts
|
|
619
|
+
var init_function = __esm({
|
|
620
|
+
"libs/core/types/function.ts"() {
|
|
621
|
+
"use strict";
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
|
|
625
|
+
// libs/core/types/heading.ts
|
|
626
|
+
var init_heading = __esm({
|
|
627
|
+
"libs/core/types/heading.ts"() {
|
|
628
|
+
"use strict";
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
|
|
632
|
+
// libs/core/types/input-type.ts
|
|
633
|
+
var init_input_type = __esm({
|
|
634
|
+
"libs/core/types/input-type.ts"() {
|
|
635
|
+
"use strict";
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
// libs/core/types/keywords-loader.ts
|
|
640
|
+
var init_keywords_loader = __esm({
|
|
641
|
+
"libs/core/types/keywords-loader.ts"() {
|
|
642
|
+
"use strict";
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
// libs/core/types/page-type.ts
|
|
647
|
+
var init_page_type = __esm({
|
|
648
|
+
"libs/core/types/page-type.ts"() {
|
|
649
|
+
"use strict";
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
// libs/core/types/style-type.ts
|
|
654
|
+
var init_style_type = __esm({
|
|
655
|
+
"libs/core/types/style-type.ts"() {
|
|
656
|
+
"use strict";
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
|
|
660
|
+
// libs/core/types/index.ts
|
|
661
|
+
var init_types = __esm({
|
|
662
|
+
"libs/core/types/index.ts"() {
|
|
663
|
+
"use strict";
|
|
664
|
+
init_code_type();
|
|
665
|
+
init_constructor();
|
|
666
|
+
init_entity_type();
|
|
667
|
+
init_extracted_value();
|
|
668
|
+
init_function();
|
|
669
|
+
init_heading();
|
|
670
|
+
init_input_type();
|
|
671
|
+
init_keywords_loader();
|
|
672
|
+
init_page_type();
|
|
673
|
+
init_style_type();
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
// libs/core/index.ts
|
|
678
|
+
var init_core = __esm({
|
|
679
|
+
"libs/core/index.ts"() {
|
|
680
|
+
"use strict";
|
|
681
|
+
init_constants();
|
|
682
|
+
init_helpers();
|
|
683
|
+
init_interfaces();
|
|
684
|
+
init_types();
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
// libs/utils/html/helpers/attr-value.ts
|
|
689
|
+
function attrValue(node, attr) {
|
|
690
|
+
const attrKey = attr.toLowerCase();
|
|
691
|
+
return node.properties?.[attrKey] ? String(node.properties[attrKey]) : void 0;
|
|
692
|
+
}
|
|
693
|
+
var init_attr_value = __esm({
|
|
694
|
+
"libs/utils/html/helpers/attr-value.ts"() {
|
|
695
|
+
"use strict";
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
// libs/utils/html/helpers/has-class.ts
|
|
700
|
+
function hasClass(node, cls) {
|
|
701
|
+
const className = node.properties?.["className"]?.toString() ?? "";
|
|
702
|
+
return !!className && className.includes(cls);
|
|
703
|
+
}
|
|
704
|
+
var init_has_class = __esm({
|
|
705
|
+
"libs/utils/html/helpers/has-class.ts"() {
|
|
706
|
+
"use strict";
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
// libs/utils/html/helpers/has-link-ancestor.ts
|
|
711
|
+
import { isElement } from "hast-util-is-element";
|
|
712
|
+
function hasLinkAncestor(ancestors) {
|
|
713
|
+
return ancestors.some((ancestor) => isElement(ancestor, "a"));
|
|
714
|
+
}
|
|
715
|
+
var init_has_link_ancestor = __esm({
|
|
716
|
+
"libs/utils/html/helpers/has-link-ancestor.ts"() {
|
|
717
|
+
"use strict";
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
// libs/utils/html/helpers/is-code-block.ts
|
|
722
|
+
function isCodeBlock(parent, node) {
|
|
723
|
+
return parent?.type === "element" && parent.tagName === "pre" && node.tagName === "code";
|
|
724
|
+
}
|
|
725
|
+
var init_is_code_block = __esm({
|
|
726
|
+
"libs/utils/html/helpers/is-code-block.ts"() {
|
|
727
|
+
"use strict";
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
|
|
731
|
+
// libs/utils/html/helpers/is-code-node.ts
|
|
732
|
+
import { isElement as isElement2 } from "hast-util-is-element";
|
|
733
|
+
function isCodeNode(node) {
|
|
734
|
+
return isElement2(node, "code") || isElement2(node, "ng-doc-code");
|
|
735
|
+
}
|
|
736
|
+
var init_is_code_node = __esm({
|
|
737
|
+
"libs/utils/html/helpers/is-code-node.ts"() {
|
|
738
|
+
"use strict";
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
|
|
742
|
+
// libs/utils/html/helpers/is-element.ts
|
|
743
|
+
function isElement3(node) {
|
|
744
|
+
return node?.type === "element";
|
|
745
|
+
}
|
|
746
|
+
var init_is_element = __esm({
|
|
747
|
+
"libs/utils/html/helpers/is-element.ts"() {
|
|
748
|
+
"use strict";
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
|
|
752
|
+
// libs/utils/html/helpers/is-heading.ts
|
|
753
|
+
import { isElement as isElement4 } from "hast-util-is-element";
|
|
754
|
+
function isHeading(node) {
|
|
755
|
+
return isElement4(node, HEADINGS);
|
|
756
|
+
}
|
|
757
|
+
var HEADINGS;
|
|
758
|
+
var init_is_heading = __esm({
|
|
759
|
+
"libs/utils/html/helpers/is-heading.ts"() {
|
|
760
|
+
"use strict";
|
|
761
|
+
HEADINGS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
// libs/utils/html/helpers/index.ts
|
|
766
|
+
var init_helpers2 = __esm({
|
|
767
|
+
"libs/utils/html/helpers/index.ts"() {
|
|
768
|
+
"use strict";
|
|
769
|
+
init_attr_value();
|
|
770
|
+
init_has_class();
|
|
771
|
+
init_has_link_ancestor();
|
|
772
|
+
init_is_code_block();
|
|
773
|
+
init_is_code_node();
|
|
774
|
+
init_is_element();
|
|
775
|
+
init_is_heading();
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
// libs/utils/html/plugins/keyword-positions.ts
|
|
780
|
+
function scanInlineCode(text) {
|
|
781
|
+
if (WHOLE_KEYWORD.test(text)) {
|
|
782
|
+
return { whole: true, position: () => REFERENCE };
|
|
783
|
+
}
|
|
784
|
+
if (HTML_START.test(text) || !(CODE_PUNCTUATION.test(text) || DECLARATION_START.test(text))) {
|
|
785
|
+
return void 0;
|
|
786
|
+
}
|
|
787
|
+
const scan = scanTypeScript(text);
|
|
788
|
+
return isProse(text, scan.masked) ? void 0 : scan;
|
|
789
|
+
}
|
|
790
|
+
function scanCodeBlock(text, mode) {
|
|
791
|
+
return mode === "html" ? scanHtml(text) : scanTypeScript(text);
|
|
792
|
+
}
|
|
793
|
+
function scanTypeScript(text) {
|
|
794
|
+
const masked = maskTypeScript(text);
|
|
795
|
+
const locals = localBindings(text, masked);
|
|
796
|
+
return {
|
|
797
|
+
whole: false,
|
|
798
|
+
masked,
|
|
799
|
+
position(start, end, key) {
|
|
800
|
+
if (masked[start] === TEMPLATE) {
|
|
801
|
+
const before = text[start - 1] ?? "";
|
|
802
|
+
const element = key.includes("-") && (before === "<" || before === "/" && text[start - 2] === "<");
|
|
803
|
+
const controlFlow = CONTROL_FLOW.test(key) && !WORD_CHARACTER.test(before);
|
|
804
|
+
return element || controlFlow ? REFERENCE : NOT_A_REFERENCE;
|
|
805
|
+
}
|
|
806
|
+
if (masked[start] !== CODE) {
|
|
807
|
+
return NOT_A_REFERENCE;
|
|
808
|
+
}
|
|
809
|
+
const previous = previousSignificant(text, start, masked);
|
|
810
|
+
const next = nextSignificant(text, end, masked);
|
|
811
|
+
const nextCharacter = text[next] ?? "";
|
|
812
|
+
if (SYNTAX_WORDS.has(key) || RESERVED_WORDS.has(key) && nextCharacter !== "(") {
|
|
813
|
+
return NOT_A_REFERENCE;
|
|
814
|
+
}
|
|
815
|
+
if (text[previous] === "." && text[previous - 1] !== ".") {
|
|
816
|
+
const ownerEnd = text[previous - 1] === "?" ? previous - 1 : previous;
|
|
817
|
+
const owner = text.slice(0, ownerEnd).match(IDENTIFIER_BEFORE)?.[0];
|
|
818
|
+
const word = text.slice(start, end);
|
|
819
|
+
return owner && !/[.#]/.test(word) ? { link: true, keyword: `${owner}.${key.toLowerCase()}` } : NOT_A_REFERENCE;
|
|
820
|
+
}
|
|
821
|
+
if (isDeclaredName(text, masked, previous, next)) {
|
|
822
|
+
return NOT_A_REFERENCE;
|
|
823
|
+
}
|
|
824
|
+
return locals.has(key) ? NOT_A_REFERENCE : REFERENCE;
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
function isDeclaredName(text, masked, previous, next) {
|
|
829
|
+
const after = text[next];
|
|
830
|
+
const afterNext = text[nextSignificant(text, next + 1, masked)];
|
|
831
|
+
if (after === ":" && text[next + 1] !== ":") {
|
|
832
|
+
const ternary = text[previous] === "?" && text[previous + 1] !== ".";
|
|
833
|
+
return !ternary && previousWord(text, previous) !== "case";
|
|
834
|
+
}
|
|
835
|
+
if ((after === "?" || after === "!") && afterNext === ":") {
|
|
836
|
+
return true;
|
|
837
|
+
}
|
|
838
|
+
if (after === "?" && (afterNext === ")" || afterNext === ",")) {
|
|
839
|
+
return true;
|
|
840
|
+
}
|
|
841
|
+
if (after === "=" && text[next + 1] !== "=" && text[next + 1] !== ">") {
|
|
842
|
+
return !TYPE_CONTEXT.includes(text[previous] ?? "") && !TYPE_WORDS.includes(previousWord(text, previous));
|
|
843
|
+
}
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
846
|
+
function scanHtml(text) {
|
|
847
|
+
const masked = maskHtml(text);
|
|
848
|
+
return {
|
|
849
|
+
whole: false,
|
|
850
|
+
position: (start) => masked[start] === CODE ? REFERENCE : NOT_A_REFERENCE
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
function maskTypeScript(text) {
|
|
854
|
+
const masked = new Uint8Array(text.length);
|
|
855
|
+
const templates = [];
|
|
856
|
+
let depth = 0;
|
|
857
|
+
let index = 0;
|
|
858
|
+
const string = (quote) => {
|
|
859
|
+
const start = index++;
|
|
860
|
+
while (index < text.length && text[index] !== quote && text[index] !== "\n") {
|
|
861
|
+
index += text[index] === "\\" ? 2 : 1;
|
|
862
|
+
}
|
|
863
|
+
masked.fill(STRING, start, Math.min(++index, text.length));
|
|
864
|
+
};
|
|
865
|
+
const template = () => {
|
|
866
|
+
const start = index++;
|
|
867
|
+
while (index < text.length && text[index] !== "`") {
|
|
868
|
+
if (text[index] === "\\") {
|
|
869
|
+
index += 2;
|
|
870
|
+
} else if (text[index] === "$" && text[index + 1] === "{") {
|
|
871
|
+
masked.fill(TEMPLATE, start, index);
|
|
872
|
+
templates.push(depth);
|
|
873
|
+
index += 2;
|
|
874
|
+
return;
|
|
875
|
+
} else {
|
|
876
|
+
index++;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
masked.fill(TEMPLATE, start, Math.min(++index, text.length));
|
|
880
|
+
};
|
|
881
|
+
while (index < text.length) {
|
|
882
|
+
const character = text[index];
|
|
883
|
+
if (character === "/" && text[index + 1] === "/") {
|
|
884
|
+
const end = text.indexOf("\n", index);
|
|
885
|
+
const stop = end < 0 ? text.length : end;
|
|
886
|
+
masked.fill(COMMENT, index, stop);
|
|
887
|
+
index = stop;
|
|
888
|
+
} else if (character === "/" && text[index + 1] === "*") {
|
|
889
|
+
const end = text.indexOf("*/", index + 2);
|
|
890
|
+
const stop = end < 0 ? text.length : end + 2;
|
|
891
|
+
masked.fill(COMMENT, index, stop);
|
|
892
|
+
index = stop;
|
|
893
|
+
} else if (character === "'" || character === '"') {
|
|
894
|
+
string(character);
|
|
895
|
+
} else if (character === "`") {
|
|
896
|
+
template();
|
|
897
|
+
} else if (character === "{") {
|
|
898
|
+
depth++;
|
|
899
|
+
index++;
|
|
900
|
+
} else if (character === "}") {
|
|
901
|
+
if (templates.length && templates[templates.length - 1] === depth) {
|
|
902
|
+
templates.pop();
|
|
903
|
+
template();
|
|
904
|
+
} else {
|
|
905
|
+
depth--;
|
|
906
|
+
index++;
|
|
907
|
+
}
|
|
908
|
+
} else {
|
|
909
|
+
index++;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
return masked;
|
|
913
|
+
}
|
|
914
|
+
function maskHtml(text) {
|
|
915
|
+
const masked = new Uint8Array(text.length);
|
|
916
|
+
let index = 0;
|
|
917
|
+
while (index < text.length) {
|
|
918
|
+
if (text.startsWith("<!--", index)) {
|
|
919
|
+
const end = text.indexOf("-->", index + 4);
|
|
920
|
+
const stop = end < 0 ? text.length : end + 3;
|
|
921
|
+
masked.fill(COMMENT, index, stop);
|
|
922
|
+
index = stop;
|
|
923
|
+
} else if (text[index] === "<" && /[A-Za-z/]/.test(text[index + 1] ?? "")) {
|
|
924
|
+
index = maskTag(text, index + 1, masked);
|
|
925
|
+
} else {
|
|
926
|
+
index++;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
return masked;
|
|
930
|
+
}
|
|
931
|
+
function maskTag(text, index, masked) {
|
|
932
|
+
while (index < text.length && text[index] !== ">") {
|
|
933
|
+
if (text[index] !== "=") {
|
|
934
|
+
index++;
|
|
935
|
+
continue;
|
|
936
|
+
}
|
|
937
|
+
index++;
|
|
938
|
+
while (text[index] === " " || text[index] === " " || text[index] === "\n") index++;
|
|
939
|
+
const quote = text[index];
|
|
940
|
+
const start = index;
|
|
941
|
+
if (quote === '"' || quote === "'") {
|
|
942
|
+
const end = text.indexOf(quote, index + 1);
|
|
943
|
+
index = end < 0 ? text.length : end + 1;
|
|
944
|
+
} else {
|
|
945
|
+
while (index < text.length && !/[\s>]/.test(text[index] ?? "")) index++;
|
|
946
|
+
}
|
|
947
|
+
masked.fill(STRING, start, index);
|
|
948
|
+
}
|
|
949
|
+
return index + 1;
|
|
950
|
+
}
|
|
951
|
+
function localBindings(text, masked) {
|
|
952
|
+
const names = /* @__PURE__ */ new Set();
|
|
953
|
+
for (const match of text.matchAll(/\b(?:const|let|var)\s+([\p{L}_$][\p{L}\w$]*)/gu)) {
|
|
954
|
+
if (!masked[match.index]) names.add(match[1] ?? "");
|
|
955
|
+
}
|
|
956
|
+
for (const match of text.matchAll(
|
|
957
|
+
/\bimport\s+(?:type\s+)?([^;]*?)\s+from\s+(['"])\.{1,2}\/[^'"]*\2/gu
|
|
958
|
+
)) {
|
|
959
|
+
if (masked[match.index]) continue;
|
|
960
|
+
for (const name of (match[1] ?? "").matchAll(
|
|
961
|
+
/([\p{L}_$][\p{L}\w$]*)(?:\s+as\s+([\p{L}_$][\p{L}\w$]*))?/gu
|
|
962
|
+
)) {
|
|
963
|
+
const local = name[2] ?? name[1] ?? "";
|
|
964
|
+
if (local !== "type" && local !== "as") names.add(local);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
return names;
|
|
968
|
+
}
|
|
969
|
+
function isProse(text, masked) {
|
|
970
|
+
for (const match of text.matchAll(/[\p{L}_$][\p{L}\w$]*(?: [\p{L}_$][\p{L}\w$]*){2,}/gu)) {
|
|
971
|
+
const words = match[0].split(" ");
|
|
972
|
+
const plain = words.filter((word) => !SYNTAX_WORDS.has(word) && !RESERVED_WORDS.has(word));
|
|
973
|
+
if (!masked[match.index] && plain.length >= 3) {
|
|
974
|
+
return true;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
return false;
|
|
978
|
+
}
|
|
979
|
+
function previousSignificant(text, index, masked) {
|
|
980
|
+
let position = index - 1;
|
|
981
|
+
while (position >= 0 && insignificant(text, position, masked)) position--;
|
|
982
|
+
return position;
|
|
983
|
+
}
|
|
984
|
+
function nextSignificant(text, index, masked) {
|
|
985
|
+
let position = index;
|
|
986
|
+
while (position < text.length && insignificant(text, position, masked)) position++;
|
|
987
|
+
return position;
|
|
988
|
+
}
|
|
989
|
+
function insignificant(text, index, masked) {
|
|
990
|
+
return masked[index] === COMMENT || /\s/.test(text[index] ?? "");
|
|
991
|
+
}
|
|
992
|
+
function previousWord(text, index) {
|
|
993
|
+
let start = index;
|
|
994
|
+
while (start >= 0 && WORD_CHARACTER.test(text[start] ?? "")) start--;
|
|
995
|
+
return text.slice(start + 1, index + 1);
|
|
996
|
+
}
|
|
997
|
+
var WORD_CHARACTER, IDENTIFIER_BEFORE, WHOLE_KEYWORD, CODE_PUNCTUATION, DECLARATION_START, HTML_START, SYNTAX_WORDS, RESERVED_WORDS, TYPE_CONTEXT, TYPE_WORDS, CODE, STRING, COMMENT, TEMPLATE, CONTROL_FLOW, NOT_A_REFERENCE, REFERENCE;
|
|
998
|
+
var init_keyword_positions = __esm({
|
|
999
|
+
"libs/utils/html/plugins/keyword-positions.ts"() {
|
|
1000
|
+
"use strict";
|
|
1001
|
+
WORD_CHARACTER = /[*\p{L}\w$@-]/u;
|
|
1002
|
+
IDENTIFIER_BEFORE = /[\p{L}\w$@-]+$/u;
|
|
1003
|
+
WHOLE_KEYWORD = /^\s*[*\p{L}\w$@-]+(?:[.#][\p{L}\w-]+)?(?:\?[\w=&]+)?\s*$/u;
|
|
1004
|
+
CODE_PUNCTUATION = /[(){}[\]<>|:=@]/;
|
|
1005
|
+
DECLARATION_START = /^\s*(?:export|import|class|interface|type|const|let|var|function|enum|abstract|declare)\s/;
|
|
1006
|
+
HTML_START = /^\s*<\/?[A-Za-z]/;
|
|
1007
|
+
SYNTAX_WORDS = /* @__PURE__ */ new Set([
|
|
1008
|
+
"await",
|
|
1009
|
+
"break",
|
|
1010
|
+
"case",
|
|
1011
|
+
"catch",
|
|
1012
|
+
"continue",
|
|
1013
|
+
"debugger",
|
|
1014
|
+
"delete",
|
|
1015
|
+
"do",
|
|
1016
|
+
"else",
|
|
1017
|
+
"false",
|
|
1018
|
+
"finally",
|
|
1019
|
+
"for",
|
|
1020
|
+
"function",
|
|
1021
|
+
"if",
|
|
1022
|
+
"instanceof",
|
|
1023
|
+
"new",
|
|
1024
|
+
"null",
|
|
1025
|
+
"return",
|
|
1026
|
+
"super",
|
|
1027
|
+
"switch",
|
|
1028
|
+
"this",
|
|
1029
|
+
"throw",
|
|
1030
|
+
"true",
|
|
1031
|
+
"try",
|
|
1032
|
+
"typeof",
|
|
1033
|
+
"void",
|
|
1034
|
+
"while",
|
|
1035
|
+
"with",
|
|
1036
|
+
"yield"
|
|
1037
|
+
]);
|
|
1038
|
+
RESERVED_WORDS = /* @__PURE__ */ new Set([
|
|
1039
|
+
"abstract",
|
|
1040
|
+
"accessor",
|
|
1041
|
+
"any",
|
|
1042
|
+
"as",
|
|
1043
|
+
"asserts",
|
|
1044
|
+
"async",
|
|
1045
|
+
"bigint",
|
|
1046
|
+
"boolean",
|
|
1047
|
+
"class",
|
|
1048
|
+
"const",
|
|
1049
|
+
"constructor",
|
|
1050
|
+
"declare",
|
|
1051
|
+
"default",
|
|
1052
|
+
"enum",
|
|
1053
|
+
"export",
|
|
1054
|
+
"extends",
|
|
1055
|
+
"from",
|
|
1056
|
+
"get",
|
|
1057
|
+
"implements",
|
|
1058
|
+
"import",
|
|
1059
|
+
"in",
|
|
1060
|
+
"infer",
|
|
1061
|
+
"interface",
|
|
1062
|
+
"is",
|
|
1063
|
+
"keyof",
|
|
1064
|
+
"let",
|
|
1065
|
+
"module",
|
|
1066
|
+
"namespace",
|
|
1067
|
+
"never",
|
|
1068
|
+
"number",
|
|
1069
|
+
"object",
|
|
1070
|
+
"of",
|
|
1071
|
+
"out",
|
|
1072
|
+
"override",
|
|
1073
|
+
"package",
|
|
1074
|
+
"private",
|
|
1075
|
+
"protected",
|
|
1076
|
+
"public",
|
|
1077
|
+
"readonly",
|
|
1078
|
+
"require",
|
|
1079
|
+
"satisfies",
|
|
1080
|
+
"set",
|
|
1081
|
+
"static",
|
|
1082
|
+
"string",
|
|
1083
|
+
"symbol",
|
|
1084
|
+
"type",
|
|
1085
|
+
"undefined",
|
|
1086
|
+
"unique",
|
|
1087
|
+
"unknown",
|
|
1088
|
+
"var"
|
|
1089
|
+
]);
|
|
1090
|
+
TYPE_CONTEXT = [":", "|", "&", "<"];
|
|
1091
|
+
TYPE_WORDS = ["type", "extends", "keyof", "typeof"];
|
|
1092
|
+
CODE = 0;
|
|
1093
|
+
STRING = 1;
|
|
1094
|
+
COMMENT = 2;
|
|
1095
|
+
TEMPLATE = 3;
|
|
1096
|
+
CONTROL_FLOW = /^@[a-z]+$/;
|
|
1097
|
+
NOT_A_REFERENCE = Object.freeze({ link: false });
|
|
1098
|
+
REFERENCE = Object.freeze({ link: true });
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
// libs/utils/html/plugins/keywords.plugin.ts
|
|
1103
|
+
import { isElement as isElement5 } from "hast-util-is-element";
|
|
1104
|
+
import { toString } from "hast-util-to-string";
|
|
1105
|
+
import { SKIP, visitParents } from "unist-util-visit-parents";
|
|
1106
|
+
function keywordsPlugin(config) {
|
|
1107
|
+
return (tree) => visitParents(tree, "element", (node, ancestors) => {
|
|
1108
|
+
if (!isCodeNode(node)) {
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
const isInlineCode = !isElement5(ancestors[ancestors.length - 1], "pre");
|
|
1112
|
+
const lang = asArray(node.properties?.["className"] ?? []).find((className) => className.startsWith("language-"))?.replace("language-", "") ?? "";
|
|
1113
|
+
if (!isInlineCode && !LANGUAGES.includes(lang)) {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
const offsets = textOffsets(node);
|
|
1117
|
+
const text = Array.from(offsets.keys()).map((textNode) => textNode.value).join("");
|
|
1118
|
+
const scan = isInlineCode ? scanInlineCode(text) : scanCodeBlock(text, HTML_LANGUAGES.includes(lang) ? "html" : "typescript");
|
|
1119
|
+
if (!scan) {
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
visitParents(node, "text", (node2, ancestors2) => {
|
|
1123
|
+
if (hasLinkAncestor(ancestors2)) {
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
const parent = ancestors2[ancestors2.length - 1];
|
|
1127
|
+
const index = parent.children.indexOf(node2);
|
|
1128
|
+
const nodes = getNodes(
|
|
1129
|
+
node2,
|
|
1130
|
+
parent,
|
|
1131
|
+
isInlineCode,
|
|
1132
|
+
config,
|
|
1133
|
+
lang,
|
|
1134
|
+
scan,
|
|
1135
|
+
offsets.get(node2) ?? 0
|
|
1136
|
+
);
|
|
1137
|
+
Array.prototype.splice.apply(parent.children, [index, 1].concat(nodes));
|
|
1138
|
+
return [SKIP, index + nodes.length];
|
|
1139
|
+
});
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
function textOffsets(node) {
|
|
1143
|
+
const offsets = /* @__PURE__ */ new Map();
|
|
1144
|
+
let offset = 0;
|
|
1145
|
+
visitParents(node, "text", (text) => {
|
|
1146
|
+
offsets.set(text, offset);
|
|
1147
|
+
offset += text.value.length;
|
|
1148
|
+
});
|
|
1149
|
+
return offsets;
|
|
1150
|
+
}
|
|
1151
|
+
function getNodes(node, parent, isInlineCode, config, language, scan, offset) {
|
|
1152
|
+
const { addUsedKeyword, getKeyword } = config;
|
|
1153
|
+
let start = offset;
|
|
1154
|
+
return toString(node).split(SPLIT_REGEXP).map((word) => {
|
|
1155
|
+
const wordStart = start;
|
|
1156
|
+
start += word.length;
|
|
1157
|
+
const match = word.match(MATCH_KEYWORD_REGEXP);
|
|
1158
|
+
if (!match) {
|
|
1159
|
+
return { type: "text", value: word };
|
|
1160
|
+
}
|
|
1161
|
+
const {
|
|
1162
|
+
key = "",
|
|
1163
|
+
delimiter = "",
|
|
1164
|
+
anchor = "",
|
|
1165
|
+
queryParams = ""
|
|
1166
|
+
} = match.groups;
|
|
1167
|
+
const position = scan.position(wordStart, wordStart + word.length, key);
|
|
1168
|
+
if (!position.link) {
|
|
1169
|
+
return { type: "text", value: word };
|
|
1170
|
+
}
|
|
1171
|
+
const isMember = position.keyword !== void 0;
|
|
1172
|
+
const usedKeyword = position.keyword ?? `${key}${delimiter}${anchor?.toLowerCase()}`;
|
|
1173
|
+
const rootKeyword = isMember ? void 0 : getKeyword?.(key);
|
|
1174
|
+
const keyword = getKeyword?.(usedKeyword);
|
|
1175
|
+
const isGuideKeyword = key.startsWith("*");
|
|
1176
|
+
const isLanguageAllowed = !keyword?.languages && ALWAYS_ALLOWED_LANGUAGES.includes(language) || !!keyword?.languages?.includes(language);
|
|
1177
|
+
if (!isInlineCode && keyword && !isLanguageAllowed) {
|
|
1178
|
+
return { type: "text", value: word };
|
|
1179
|
+
}
|
|
1180
|
+
if (isGuideKeyword && key.length === 1) {
|
|
1181
|
+
return { type: "text", value: word };
|
|
1182
|
+
}
|
|
1183
|
+
addUsedKeyword?.(usedKeyword);
|
|
1184
|
+
const notFoundGuideKeyword = isGuideKeyword && !keyword;
|
|
1185
|
+
const notFoundApiAnchorKeyword = !!rootKeyword && !!anchor && !keyword;
|
|
1186
|
+
if (getKeyword && scan.whole && (notFoundGuideKeyword || notFoundApiAnchorKeyword)) {
|
|
1187
|
+
throw new Error(`Route with keyword "${word}" is missing.`);
|
|
1188
|
+
}
|
|
1189
|
+
if (parent.properties) {
|
|
1190
|
+
if (isInlineCode && keyword?.type === "link") {
|
|
1191
|
+
parent.tagName = "a";
|
|
1192
|
+
parent.properties = {
|
|
1193
|
+
href: `${keyword.path}${queryParams ?? ""}`,
|
|
1194
|
+
className: [NG_DOC_ELEMENT]
|
|
1195
|
+
};
|
|
1196
|
+
return { type: "text", value: keyword.title };
|
|
1197
|
+
} else if (isInlineCode && keyword) {
|
|
1198
|
+
parent.properties["className"] = [NG_DOC_ELEMENT, "ng-doc-code-with-link"];
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
return keyword ? createLinkNode(
|
|
1202
|
+
isInlineCode && !isMember ? keyword.title : word,
|
|
1203
|
+
keyword.path,
|
|
1204
|
+
keyword.type,
|
|
1205
|
+
keyword.description
|
|
1206
|
+
) : { type: "text", value: word };
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
function createLinkNode(text, href, type, description) {
|
|
1210
|
+
return {
|
|
1211
|
+
type: "element",
|
|
1212
|
+
tagName: "a",
|
|
1213
|
+
properties: {
|
|
1214
|
+
href,
|
|
1215
|
+
class: ["ng-doc-code-anchor", NG_DOC_ELEMENT],
|
|
1216
|
+
"data-link-type": type,
|
|
1217
|
+
ngDocTooltip: description
|
|
1218
|
+
},
|
|
1219
|
+
children: [{ type: "text", value: text }]
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
var ALWAYS_ALLOWED_LANGUAGES, HTML_LANGUAGES, LANGUAGES, SPLIT_REGEXP, MATCH_KEYWORD_REGEXP;
|
|
1223
|
+
var init_keywords_plugin = __esm({
|
|
1224
|
+
"libs/utils/html/plugins/keywords.plugin.ts"() {
|
|
1225
|
+
"use strict";
|
|
1226
|
+
init_core();
|
|
1227
|
+
init_helpers2();
|
|
1228
|
+
init_keyword_positions();
|
|
1229
|
+
ALWAYS_ALLOWED_LANGUAGES = ["typescript", "ts", "angular-ts"];
|
|
1230
|
+
HTML_LANGUAGES = [...KEYWORD_ALLOWED_LANGUAGES];
|
|
1231
|
+
LANGUAGES = [...ALWAYS_ALLOWED_LANGUAGES, ...HTML_LANGUAGES];
|
|
1232
|
+
SPLIT_REGEXP = /([*\p{L}\w$@-]+(?:[.#][\p{L}\w-]+)?(?:\?[\w=&]+)?)/u;
|
|
1233
|
+
MATCH_KEYWORD_REGEXP = /(?<key>[*\p{L}\w$@-]+)((?<delimiter>[.#])(?<anchor>[\p{L}\w-]+))?(?<queryParams>\?[\w=&]+)?/u;
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
// libs/utils/html/post-process-html.ts
|
|
1238
|
+
import rehypeParse2 from "rehype-parse";
|
|
1239
|
+
import rehypeStringify2 from "rehype-stringify";
|
|
1240
|
+
import { unified as unified2 } from "unified";
|
|
1241
|
+
async function postProcessHtml(html) {
|
|
1242
|
+
const usedKeywords = /* @__PURE__ */ new Set();
|
|
1243
|
+
try {
|
|
1244
|
+
const content = await unified2().use(rehypeParse2, { fragment: true }).use(rehypeStringify2).use(keywordsPlugin, { addUsedKeyword: usedKeywords.add.bind(usedKeywords) }).process(html).then((file) => file.toString());
|
|
1245
|
+
return { content, usedKeywords: Array.from(usedKeywords) };
|
|
1246
|
+
} catch (error) {
|
|
1247
|
+
return { content: html, usedKeywords: [], error };
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
var init_post_process_html = __esm({
|
|
1251
|
+
"libs/utils/html/post-process-html.ts"() {
|
|
1252
|
+
"use strict";
|
|
1253
|
+
init_keywords_plugin();
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
|
|
1257
|
+
// libs/utils/html/plugins/add-heading-anchors.plugin.ts
|
|
1258
|
+
import { visit } from "unist-util-visit";
|
|
1259
|
+
function addHeadingAnchors(route) {
|
|
1260
|
+
return (tree) => visit(tree, "element", (node) => {
|
|
1261
|
+
if (route && isHeading(node) && node.properties && node.properties["id"] && !hasClass(node, NO_ANCHOR_CLASS)) {
|
|
1262
|
+
node.children.push({
|
|
1263
|
+
type: "element",
|
|
1264
|
+
tagName: "ng-doc-heading-anchor",
|
|
1265
|
+
properties: {
|
|
1266
|
+
className: ["ng-doc-anchor"],
|
|
1267
|
+
anchor: node.properties["id"]
|
|
1268
|
+
},
|
|
1269
|
+
children: []
|
|
1270
|
+
});
|
|
1271
|
+
node.properties = {
|
|
1272
|
+
...node.properties,
|
|
1273
|
+
href: route,
|
|
1274
|
+
headingLink: "true"
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
var NO_ANCHOR_CLASS;
|
|
1280
|
+
var init_add_heading_anchors_plugin = __esm({
|
|
1281
|
+
"libs/utils/html/plugins/add-heading-anchors.plugin.ts"() {
|
|
1282
|
+
"use strict";
|
|
1283
|
+
init_helpers2();
|
|
1284
|
+
NO_ANCHOR_CLASS = "no-anchor";
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
|
|
1288
|
+
// libs/utils/html/plugins/cached-shiki.plugin.ts
|
|
1289
|
+
import { toString as toString2 } from "hast-util-to-string";
|
|
1290
|
+
import { visit as visit2 } from "unist-util-visit";
|
|
1291
|
+
function cachedShikiPlugin(settings) {
|
|
1292
|
+
const { cache, themes, languages, identity, defaultLanguage } = settings;
|
|
1293
|
+
const id = `${themes.light}
|
|
1294
|
+
${themes.dark}
|
|
1295
|
+
${languages ?? ""}
|
|
1296
|
+
${settings.grammars ?? "all"}`;
|
|
1297
|
+
return async (tree) => {
|
|
1298
|
+
const blocks = [];
|
|
1299
|
+
visit2(tree, "element", (node, index, parent) => {
|
|
1300
|
+
if (!parent || index == null || node.tagName !== "pre") return;
|
|
1301
|
+
const head = node.children[0];
|
|
1302
|
+
if (!head || head.type !== "element" || head.tagName !== "code" || !head.properties) return;
|
|
1303
|
+
const classes = head.properties["className"];
|
|
1304
|
+
const languageClass = Array.isArray(classes) ? classes.find((item) => typeof item === "string" && item.startsWith(languagePrefix)) : void 0;
|
|
1305
|
+
const lang = typeof languageClass === "string" ? languageClass.slice(languagePrefix.length) : defaultLanguage;
|
|
1306
|
+
if (!lang) return;
|
|
1307
|
+
const data = head.data;
|
|
1308
|
+
const meta = data?.meta ?? head.properties["metastring"]?.toString() ?? "";
|
|
1309
|
+
const code = toString2(head);
|
|
1310
|
+
blocks.push({
|
|
1311
|
+
node,
|
|
1312
|
+
parent,
|
|
1313
|
+
key: cache.key({
|
|
1314
|
+
options: identity,
|
|
1315
|
+
themes,
|
|
1316
|
+
...languages === void 0 ? {} : { languages },
|
|
1317
|
+
lang,
|
|
1318
|
+
meta,
|
|
1319
|
+
code
|
|
1320
|
+
})
|
|
1321
|
+
});
|
|
1322
|
+
});
|
|
1323
|
+
let highlighter;
|
|
1324
|
+
const load = async () => highlighter ??= await highlighterFor(id, settings.transformer);
|
|
1325
|
+
if (cache.loads?.(themes) !== true) await load();
|
|
1326
|
+
const values = [];
|
|
1327
|
+
for (const block of blocks) {
|
|
1328
|
+
const cached = cache.get(block.key);
|
|
1329
|
+
const hit = cached === void 0 ? void 0 : fragment(cached);
|
|
1330
|
+
if (hit && !cache.verify) {
|
|
1331
|
+
values.push(hit);
|
|
1332
|
+
continue;
|
|
1333
|
+
}
|
|
1334
|
+
const fresh = await highlight(await load(), block.node);
|
|
1335
|
+
if (hit && fresh !== cached) cache.mismatch?.(block.key);
|
|
1336
|
+
if (fresh !== cached) cache.set(block.key, fresh);
|
|
1337
|
+
values.push(JSON.parse(fresh));
|
|
1338
|
+
}
|
|
1339
|
+
blocks.forEach((block, position) => {
|
|
1340
|
+
const index = block.parent.children.indexOf(block.node);
|
|
1341
|
+
if (index >= 0) block.parent.children.splice(index, 1, ...values[position]);
|
|
1342
|
+
});
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
function highlighterFor(id, transformer) {
|
|
1346
|
+
const known = highlighters.get(id);
|
|
1347
|
+
if (known) return known;
|
|
1348
|
+
const created = (async () => {
|
|
1349
|
+
const transform = transformer();
|
|
1350
|
+
await transform({ type: "root", children: [] });
|
|
1351
|
+
return transform;
|
|
1352
|
+
})();
|
|
1353
|
+
highlighters.set(id, created);
|
|
1354
|
+
created.catch(() => {
|
|
1355
|
+
if (highlighters.get(id) === created) highlighters.delete(id);
|
|
1356
|
+
});
|
|
1357
|
+
return created;
|
|
1358
|
+
}
|
|
1359
|
+
async function highlight(transform, node) {
|
|
1360
|
+
const root = { type: "root", children: [node] };
|
|
1361
|
+
await transform(root);
|
|
1362
|
+
return JSON.stringify(root.children);
|
|
1363
|
+
}
|
|
1364
|
+
function fragment(value) {
|
|
1365
|
+
try {
|
|
1366
|
+
const parsed = JSON.parse(value);
|
|
1367
|
+
return Array.isArray(parsed) && parsed.length > 0 && parsed.every(isReplacement) ? parsed : void 0;
|
|
1368
|
+
} catch {
|
|
1369
|
+
return void 0;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
function isReplacement(value) {
|
|
1373
|
+
if (isNode(value)) return value.type === "element";
|
|
1374
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1375
|
+
const node = value;
|
|
1376
|
+
const children = node["children"];
|
|
1377
|
+
return node["type"] === "root" && Array.isArray(children) && children.length > 0 && children.every((child) => isNode(child) && child.type === "element");
|
|
1378
|
+
}
|
|
1379
|
+
function isNode(value) {
|
|
1380
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1381
|
+
const node = value;
|
|
1382
|
+
if (node["type"] === "text") return typeof node["value"] === "string";
|
|
1383
|
+
const properties = node["properties"];
|
|
1384
|
+
const children = node["children"];
|
|
1385
|
+
return node["type"] === "element" && typeof node["tagName"] === "string" && !!properties && typeof properties === "object" && !Array.isArray(properties) && Array.isArray(children) && children.every(isNode);
|
|
1386
|
+
}
|
|
1387
|
+
var languagePrefix, highlighters;
|
|
1388
|
+
var init_cached_shiki_plugin = __esm({
|
|
1389
|
+
"libs/utils/html/plugins/cached-shiki.plugin.ts"() {
|
|
1390
|
+
"use strict";
|
|
1391
|
+
languagePrefix = "language-";
|
|
1392
|
+
highlighters = /* @__PURE__ */ new Map();
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
|
|
1396
|
+
// libs/utils/html/plugins/highlight-code-lines.ts
|
|
1397
|
+
import { visit as visit3 } from "unist-util-visit";
|
|
1398
|
+
function highlightCodeLines() {
|
|
1399
|
+
return (tree) => {
|
|
1400
|
+
visit3(tree, "element", (node, _i, parent) => {
|
|
1401
|
+
if (isCodeBlock(parent, node) && parent?.type === "element") {
|
|
1402
|
+
const highlightedLines = JSON.parse(
|
|
1403
|
+
attrValue(parent, "highlightedLines") ?? "[]"
|
|
1404
|
+
);
|
|
1405
|
+
highlightedLines.length && node.children.filter(isElement3).forEach((child, i) => {
|
|
1406
|
+
if (child.properties.class === "line" && highlightedLines.includes(i + 1)) {
|
|
1407
|
+
child.properties.class = "line highlighted";
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
});
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
var init_highlight_code_lines = __esm({
|
|
1415
|
+
"libs/utils/html/plugins/highlight-code-lines.ts"() {
|
|
1416
|
+
"use strict";
|
|
1417
|
+
init_helpers2();
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
|
|
1421
|
+
// libs/utils/html/plugins/mark-elements.plugin.ts
|
|
1422
|
+
import { visit as visit4 } from "unist-util-visit";
|
|
1423
|
+
function markElementsPlugin() {
|
|
1424
|
+
return (tree) => {
|
|
1425
|
+
visit4(tree, "element", (node) => {
|
|
1426
|
+
if (node.properties) {
|
|
1427
|
+
node.properties["className"] = [...asArray(node.properties.className), NG_DOC_ELEMENT];
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
var init_mark_elements_plugin = __esm({
|
|
1433
|
+
"libs/utils/html/plugins/mark-elements.plugin.ts"() {
|
|
1434
|
+
"use strict";
|
|
1435
|
+
init_core();
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1439
|
+
// libs/utils/html/plugins/mermaid.plugin.ts
|
|
1440
|
+
import { toString as toString3 } from "hast-util-to-string";
|
|
1441
|
+
import { visit as visit5 } from "unist-util-visit";
|
|
1442
|
+
function mermaidPlugin() {
|
|
1443
|
+
return (tree) => {
|
|
1444
|
+
visit5(tree, "element", (node) => {
|
|
1445
|
+
if (node.tagName === "pre") {
|
|
1446
|
+
const codeNode = node.children[0];
|
|
1447
|
+
if (codeNode.tagName === "code" && codeNode.properties?.["lang"] === "mermaid") {
|
|
1448
|
+
node.properties = { className: ["mermaid"] };
|
|
1449
|
+
node.children = [
|
|
1450
|
+
{
|
|
1451
|
+
type: "text",
|
|
1452
|
+
value: toString3(codeNode)
|
|
1453
|
+
}
|
|
1454
|
+
];
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
};
|
|
1459
|
+
}
|
|
1460
|
+
var init_mermaid_plugin = __esm({
|
|
1461
|
+
"libs/utils/html/plugins/mermaid.plugin.ts"() {
|
|
1462
|
+
"use strict";
|
|
1463
|
+
}
|
|
1464
|
+
});
|
|
1465
|
+
|
|
1466
|
+
// libs/utils/html/plugins/slugger.plugin.ts
|
|
1467
|
+
import GithubSlugger from "github-slugger";
|
|
1468
|
+
import { hasProperty } from "hast-util-has-property";
|
|
1469
|
+
import { headingRank } from "hast-util-heading-rank";
|
|
1470
|
+
import { isElement as isElement6 } from "hast-util-is-element";
|
|
1471
|
+
import { toString as toString4 } from "hast-util-to-string";
|
|
1472
|
+
import { visitParents as visitParents2 } from "unist-util-visit-parents";
|
|
1473
|
+
function sluggerPlugin(addAnchor, headings = ["h1", "h2", "h3", "h4"]) {
|
|
1474
|
+
if (!addAnchor) {
|
|
1475
|
+
return () => {
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
const slugger = new GithubSlugger();
|
|
1479
|
+
return (tree) => {
|
|
1480
|
+
slugger.reset();
|
|
1481
|
+
visitParents2(tree, "element", (node, ancestors) => {
|
|
1482
|
+
const scope = getKeywordScope(ancestors);
|
|
1483
|
+
const isHeading2 = !!headingRank(node) && !hasProperty(node, "id") && !!headings?.includes(node.tagName.toLowerCase());
|
|
1484
|
+
const attrSlug = attrValue(node, "dataSlug");
|
|
1485
|
+
const attrSlugTitle = attrValue(node, "dataSlugTitle");
|
|
1486
|
+
const attrSlugType = attrValue(node, "dataSlugType");
|
|
1487
|
+
const dataToSlug = isHeading2 ? toString4(node).trim() : attrSlug;
|
|
1488
|
+
if (dataToSlug) {
|
|
1489
|
+
if (node.properties) {
|
|
1490
|
+
const id = attrSlug && attrSlugType === "member" ? attrSlug : slugger.slug(dataToSlug);
|
|
1491
|
+
node.properties["id"] = id;
|
|
1492
|
+
if (isHeading2) {
|
|
1493
|
+
hideLeadingEmoji(node);
|
|
1494
|
+
}
|
|
1495
|
+
addAnchor({
|
|
1496
|
+
anchorId: id,
|
|
1497
|
+
anchor: new GithubSlugger().slug(dataToSlug),
|
|
1498
|
+
title: attrSlugTitle || dataToSlug,
|
|
1499
|
+
scope,
|
|
1500
|
+
type: isHeading2 && attrSlugType !== "member" || attrSlug && attrSlugType === "heading" ? "heading" : "member"
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
});
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
function hideLeadingEmoji(heading) {
|
|
1508
|
+
const first = heading.children[0];
|
|
1509
|
+
const emoji = first?.type === "text" ? LEADING_EMOJI.exec(first.value)?.[0] : void 0;
|
|
1510
|
+
if (!emoji) {
|
|
1511
|
+
return;
|
|
1512
|
+
}
|
|
1513
|
+
const rest = { type: "text", value: first.value.slice(emoji.length) };
|
|
1514
|
+
heading.children.splice(
|
|
1515
|
+
0,
|
|
1516
|
+
1,
|
|
1517
|
+
{
|
|
1518
|
+
type: "element",
|
|
1519
|
+
tagName: "span",
|
|
1520
|
+
properties: { ariaHidden: "true" },
|
|
1521
|
+
children: [{ type: "text", value: emoji }]
|
|
1522
|
+
},
|
|
1523
|
+
rest
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
function getKeywordScope(ancestors) {
|
|
1527
|
+
const keywordScope = ancestors.find(
|
|
1528
|
+
(ancestor) => isElement6(ancestor) && ancestor.tagName === "ng-doc-keyword-scope"
|
|
1529
|
+
);
|
|
1530
|
+
const key = keywordScope?.properties?.["id"];
|
|
1531
|
+
return key ? {
|
|
1532
|
+
key: String(key),
|
|
1533
|
+
title: String(keywordScope?.properties?.["title"])
|
|
1534
|
+
} : void 0;
|
|
1535
|
+
}
|
|
1536
|
+
var LEADING_EMOJI;
|
|
1537
|
+
var init_slugger_plugin = __esm({
|
|
1538
|
+
"libs/utils/html/plugins/slugger.plugin.ts"() {
|
|
1539
|
+
"use strict";
|
|
1540
|
+
init_helpers2();
|
|
1541
|
+
LEADING_EMOJI = new RegExp("^(?:\\p{Regional_Indicator}{2}|(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F)(?:\\p{Emoji_Modifier}|\\uFE0F|\\u200D\\p{Extended_Pictographic}\\uFE0F?)*)(?=\\s)", "u");
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
// libs/utils/html/plugins/table-wrapper.ts
|
|
1546
|
+
import { visit as visit6 } from "unist-util-visit";
|
|
1547
|
+
function table_wrapper_default() {
|
|
1548
|
+
return (tree) => {
|
|
1549
|
+
visit6(tree, "element", (node, index, parent) => {
|
|
1550
|
+
const table = node?.tagName === "table";
|
|
1551
|
+
if (table) {
|
|
1552
|
+
const wrapper = {
|
|
1553
|
+
type: "element",
|
|
1554
|
+
tagName: "div",
|
|
1555
|
+
properties: {
|
|
1556
|
+
className: "ng-doc-table-wrapper"
|
|
1557
|
+
},
|
|
1558
|
+
children: [node]
|
|
1559
|
+
};
|
|
1560
|
+
parent.children[index] = wrapper;
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
var init_table_wrapper = __esm({
|
|
1566
|
+
"libs/utils/html/plugins/table-wrapper.ts"() {
|
|
1567
|
+
"use strict";
|
|
1568
|
+
}
|
|
1569
|
+
});
|
|
1570
|
+
|
|
1571
|
+
// libs/utils/html/shiki-grammars.ts
|
|
1572
|
+
import {
|
|
1573
|
+
bundledLanguages,
|
|
1574
|
+
createHighlighter
|
|
1575
|
+
} from "shiki";
|
|
1576
|
+
import { visit as visit7 } from "unist-util-visit";
|
|
1577
|
+
function shikiGrammars() {
|
|
1578
|
+
grammars ??= ShikiGrammars.create().catch((error) => {
|
|
1579
|
+
grammars = void 0;
|
|
1580
|
+
throw error;
|
|
1581
|
+
});
|
|
1582
|
+
return grammars;
|
|
1583
|
+
}
|
|
1584
|
+
function createGrammarlessHighlighter(themes) {
|
|
1585
|
+
return createHighlighter({ themes, langs: [] });
|
|
1586
|
+
}
|
|
1587
|
+
function blockLanguages(tree, defaultLanguage) {
|
|
1588
|
+
const languages = /* @__PURE__ */ new Set();
|
|
1589
|
+
visit7(tree, "element", (node) => {
|
|
1590
|
+
if (node.tagName !== "pre") return;
|
|
1591
|
+
const head = node.children[0];
|
|
1592
|
+
if (!head || head.type !== "element" || head.tagName !== "code" || !head.properties) return;
|
|
1593
|
+
const classes = head.properties["className"];
|
|
1594
|
+
const languageClass = Array.isArray(classes) ? classes.find((item) => typeof item === "string" && item.startsWith(languagePrefix2)) : void 0;
|
|
1595
|
+
languages.add(
|
|
1596
|
+
typeof languageClass === "string" ? languageClass.slice(languagePrefix2.length) : defaultLanguage
|
|
1597
|
+
);
|
|
1598
|
+
});
|
|
1599
|
+
return languages;
|
|
1600
|
+
}
|
|
1601
|
+
function includedScopes(registration) {
|
|
1602
|
+
const scopes = /* @__PURE__ */ new Set();
|
|
1603
|
+
const walk = (value) => {
|
|
1604
|
+
if (Array.isArray(value)) value.forEach(walk);
|
|
1605
|
+
else if (value && typeof value === "object")
|
|
1606
|
+
for (const [key, item] of Object.entries(value)) {
|
|
1607
|
+
if (key === "include" && typeof item === "string") {
|
|
1608
|
+
if (!item.startsWith("#") && !item.startsWith("$")) scopes.add(item.split("#")[0]);
|
|
1609
|
+
} else walk(item);
|
|
1610
|
+
}
|
|
1611
|
+
};
|
|
1612
|
+
walk(registration);
|
|
1613
|
+
return scopes;
|
|
1614
|
+
}
|
|
1615
|
+
function prefixes(scope) {
|
|
1616
|
+
const parts = scope.split(".");
|
|
1617
|
+
return parts.map((_, index) => parts.slice(0, index + 1).join("."));
|
|
1618
|
+
}
|
|
1619
|
+
var ShikiGrammars, grammars, languagePrefix2;
|
|
1620
|
+
var init_shiki_grammars = __esm({
|
|
1621
|
+
"libs/utils/html/shiki-grammars.ts"() {
|
|
1622
|
+
"use strict";
|
|
1623
|
+
ShikiGrammars = class _ShikiGrammars {
|
|
1624
|
+
constructor(registrations) {
|
|
1625
|
+
this.byName = /* @__PURE__ */ new Map();
|
|
1626
|
+
this.byScope = /* @__PURE__ */ new Map();
|
|
1627
|
+
this.injectors = /* @__PURE__ */ new Map();
|
|
1628
|
+
this.order = /* @__PURE__ */ new Map();
|
|
1629
|
+
this.closures = /* @__PURE__ */ new Map();
|
|
1630
|
+
this.loaded = /* @__PURE__ */ new WeakMap();
|
|
1631
|
+
const mention = (name) => {
|
|
1632
|
+
if (!this.order.has(name)) this.order.set(name, this.order.size);
|
|
1633
|
+
};
|
|
1634
|
+
for (const registration of registrations) {
|
|
1635
|
+
mention(registration.name);
|
|
1636
|
+
for (const embedded of registration.embeddedLangs ?? []) mention(embedded);
|
|
1637
|
+
if (this.byScope.has(registration.scopeName)) continue;
|
|
1638
|
+
this.byScope.set(registration.scopeName, registration);
|
|
1639
|
+
this.byName.set(registration.name, registration);
|
|
1640
|
+
for (const alias of registration.aliases ?? []) this.byName.set(alias, registration);
|
|
1641
|
+
for (const target of registration.injectTo ?? []) {
|
|
1642
|
+
const list = this.injectors.get(target) ?? [];
|
|
1643
|
+
list.push(registration);
|
|
1644
|
+
this.injectors.set(target, list);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* The bundled grammars, in the order `@shikijs/rehype` registers them: every bundled language
|
|
1650
|
+
* name, each with the registrations of its module.
|
|
1651
|
+
*/
|
|
1652
|
+
static async create() {
|
|
1653
|
+
const modules = await Promise.all(
|
|
1654
|
+
Object.keys(bundledLanguages).map(
|
|
1655
|
+
(name) => bundledLanguages[name]()
|
|
1656
|
+
)
|
|
1657
|
+
);
|
|
1658
|
+
return new _ShikiGrammars(modules.flatMap((module) => module.default));
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* The grammars that a block of `language` can reach, in registration order; empty for a
|
|
1662
|
+
* language that no bundled grammar names (it falls back to plain text, as before).
|
|
1663
|
+
* @param language
|
|
1664
|
+
*/
|
|
1665
|
+
closure(language) {
|
|
1666
|
+
const known = this.closures.get(language);
|
|
1667
|
+
if (known) return known;
|
|
1668
|
+
const set = /* @__PURE__ */ new Set();
|
|
1669
|
+
const queue = [this.byName.get(language)];
|
|
1670
|
+
while (queue.length) {
|
|
1671
|
+
const registration = queue.pop();
|
|
1672
|
+
if (!registration || set.has(registration)) continue;
|
|
1673
|
+
set.add(registration);
|
|
1674
|
+
for (const name of [
|
|
1675
|
+
...registration.embeddedLangs ?? [],
|
|
1676
|
+
...registration.embeddedLangsLazy ?? []
|
|
1677
|
+
])
|
|
1678
|
+
queue.push(this.byName.get(name));
|
|
1679
|
+
for (const scope of includedScopes(registration)) queue.push(this.byScope.get(scope));
|
|
1680
|
+
for (const prefix of prefixes(registration.scopeName))
|
|
1681
|
+
queue.push(...this.injectors.get(prefix) ?? []);
|
|
1682
|
+
for (const target of registration.injectTo ?? [])
|
|
1683
|
+
queue.push(...this.injectors.get(target) ?? []);
|
|
1684
|
+
}
|
|
1685
|
+
const closure = [...set].sort(
|
|
1686
|
+
(left, right) => this.order.get(left.name) - this.order.get(right.name)
|
|
1687
|
+
);
|
|
1688
|
+
this.closures.set(language, closure);
|
|
1689
|
+
return closure;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Loads the closures of `languages` that `highlighter` does not hold yet.
|
|
1693
|
+
* @param highlighter
|
|
1694
|
+
* @param languages
|
|
1695
|
+
*/
|
|
1696
|
+
load(highlighter, languages) {
|
|
1697
|
+
let loaded = this.loaded.get(highlighter);
|
|
1698
|
+
if (!loaded) this.loaded.set(highlighter, loaded = /* @__PURE__ */ new Set());
|
|
1699
|
+
const missing = /* @__PURE__ */ new Set();
|
|
1700
|
+
for (const language of languages)
|
|
1701
|
+
for (const registration of this.closure(language))
|
|
1702
|
+
if (!loaded.has(registration.name)) missing.add(registration);
|
|
1703
|
+
if (!missing.size) return;
|
|
1704
|
+
const batch = [...missing].sort(
|
|
1705
|
+
(left, right) => this.order.get(left.name) - this.order.get(right.name)
|
|
1706
|
+
);
|
|
1707
|
+
highlighter.loadLanguageSync(batch);
|
|
1708
|
+
for (const registration of batch) loaded.add(registration.name);
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1711
|
+
languagePrefix2 = "language-";
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1714
|
+
|
|
1715
|
+
// libs/utils/html/process-html.ts
|
|
1716
|
+
import rehypeShiki from "@shikijs/rehype";
|
|
1717
|
+
import rehypeShikiFromHighlighter from "@shikijs/rehype/core";
|
|
1718
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1719
|
+
import rehypeMinifyWhitespace2 from "rehype-minify-whitespace";
|
|
1720
|
+
import rehypeParse3 from "rehype-parse";
|
|
1721
|
+
import rehypeStringify3 from "rehype-stringify";
|
|
1722
|
+
import { bundledLanguages as bundledLanguages2, createHighlighter as createHighlighter2 } from "shiki";
|
|
1723
|
+
import { unified as unified3 } from "unified";
|
|
1724
|
+
async function processHtml(html, config) {
|
|
1725
|
+
const anchors = /* @__PURE__ */ new Set();
|
|
1726
|
+
const themes = {
|
|
1727
|
+
light: config.lightTheme ?? "github-light",
|
|
1728
|
+
dark: config.darkTheme ?? "ayu-dark"
|
|
1729
|
+
};
|
|
1730
|
+
const langs = config.langs?.length ? config.langs : void 0;
|
|
1731
|
+
const used = !langs && config.grammars === "used";
|
|
1732
|
+
try {
|
|
1733
|
+
const content = await unified3().use(rehypeParse3, { fragment: true }).use(rehypeStringify3).use(mermaidPlugin).use(
|
|
1734
|
+
config.highlight ? [
|
|
1735
|
+
[
|
|
1736
|
+
cachedShikiPlugin,
|
|
1737
|
+
{
|
|
1738
|
+
cache: config.highlight,
|
|
1739
|
+
themes,
|
|
1740
|
+
...langs ? { languages: languagesId(langs) } : {},
|
|
1741
|
+
...used ? { grammars: "used" } : {},
|
|
1742
|
+
identity: HIGHLIGHT_IDENTITY,
|
|
1743
|
+
defaultLanguage: DEFAULT_LANGUAGE,
|
|
1744
|
+
transformer: () => langs ? withLanguages(themes, langs) : used ? withUsedGrammars(themes) : rehypeShiki(
|
|
1745
|
+
shikiOptions(themes)
|
|
1746
|
+
)
|
|
1747
|
+
}
|
|
1748
|
+
]
|
|
1749
|
+
] : langs ? [[() => withLanguages(themes, langs)]] : used ? [[() => withUsedGrammars(themes)]] : [[rehypeShiki, shikiOptions(themes)]]
|
|
1750
|
+
).use(highlightCodeLines).use(table_wrapper_default).use(sluggerPlugin, anchors.add.bind(anchors), config.headings).use(rehypeMinifyWhitespace2).use(addHeadingAnchors, config.route).use(markElementsPlugin).process(html).then((file) => file.toString());
|
|
1751
|
+
return { content, anchors: Array.from(anchors) };
|
|
1752
|
+
} catch (error) {
|
|
1753
|
+
return { content: html, anchors: [], error };
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
function shikiOptions(themes) {
|
|
1757
|
+
return {
|
|
1758
|
+
defaultLanguage: DEFAULT_LANGUAGE,
|
|
1759
|
+
fallbackLanguage: "text",
|
|
1760
|
+
addLanguageClass: true,
|
|
1761
|
+
parseMetaString: (meta) => JSON.parse(meta?.replace(/\\/g, "") || "{}"),
|
|
1762
|
+
// Shiki stops tokenizing a line after 500 ms by default and silently colours the rest of
|
|
1763
|
+
// it like the last token. A slow or pre-empted process then renders other HTML than a fast
|
|
1764
|
+
// one, so the build output would depend on machine load. No limit keeps it deterministic.
|
|
1765
|
+
tokenizeTimeLimit: 0,
|
|
1766
|
+
themes: {
|
|
1767
|
+
light: shikiTheme(themes.light),
|
|
1768
|
+
dark: shikiTheme(themes.dark)
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1771
|
+
}
|
|
1772
|
+
function shikiTheme(name) {
|
|
1773
|
+
return name === NG_DOC_SYNTAX_THEME_NAME ? ngDocSyntaxTheme() : name;
|
|
1774
|
+
}
|
|
1775
|
+
function languagesId(langs) {
|
|
1776
|
+
let id = languageIds.get(langs);
|
|
1777
|
+
if (id === void 0) {
|
|
1778
|
+
id = createHash2("sha256").update(JSON.stringify(langs)).digest("hex");
|
|
1779
|
+
languageIds.set(langs, id);
|
|
1780
|
+
}
|
|
1781
|
+
return id;
|
|
1782
|
+
}
|
|
1783
|
+
function withLanguages(themes, langs) {
|
|
1784
|
+
const id = `${themes.light}
|
|
1785
|
+
${themes.dark}
|
|
1786
|
+
${languagesId(langs)}`;
|
|
1787
|
+
return async (tree) => {
|
|
1788
|
+
let highlighter = languageHighlighters.get(id);
|
|
1789
|
+
if (!highlighter) {
|
|
1790
|
+
highlighter = createHighlighter2({
|
|
1791
|
+
themes: [shikiTheme(themes.light), shikiTheme(themes.dark)],
|
|
1792
|
+
// Later registrations of a name replace earlier ones, so the given languages win.
|
|
1793
|
+
langs: [...Object.keys(bundledLanguages2), ...langs]
|
|
1794
|
+
});
|
|
1795
|
+
languageHighlighters.set(id, highlighter);
|
|
1796
|
+
const created = highlighter;
|
|
1797
|
+
created.catch(() => {
|
|
1798
|
+
if (languageHighlighters.get(id) === created) languageHighlighters.delete(id);
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
const transform = rehypeShikiFromHighlighter(await highlighter, shikiOptions(themes));
|
|
1802
|
+
await transform(tree);
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1805
|
+
function withUsedGrammars(themes) {
|
|
1806
|
+
const id = `${themes.light}
|
|
1807
|
+
${themes.dark}`;
|
|
1808
|
+
return async (tree) => {
|
|
1809
|
+
let highlighter = usedHighlighters.get(id);
|
|
1810
|
+
if (!highlighter) {
|
|
1811
|
+
highlighter = createGrammarlessHighlighter([
|
|
1812
|
+
shikiTheme(themes.light),
|
|
1813
|
+
shikiTheme(themes.dark)
|
|
1814
|
+
]);
|
|
1815
|
+
usedHighlighters.set(id, highlighter);
|
|
1816
|
+
const created = highlighter;
|
|
1817
|
+
created.catch(() => {
|
|
1818
|
+
if (usedHighlighters.get(id) === created) usedHighlighters.delete(id);
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
const [grammars2, ready] = await Promise.all([shikiGrammars(), highlighter]);
|
|
1822
|
+
grammars2.load(ready, blockLanguages(tree, DEFAULT_LANGUAGE));
|
|
1823
|
+
const transform = rehypeShikiFromHighlighter(ready, shikiOptions(themes));
|
|
1824
|
+
await transform(tree);
|
|
1825
|
+
};
|
|
1826
|
+
}
|
|
1827
|
+
var DEFAULT_LANGUAGE, HIGHLIGHT_IDENTITY, languageHighlighters, languageIds, usedHighlighters;
|
|
1828
|
+
var init_process_html = __esm({
|
|
1829
|
+
"libs/utils/html/process-html.ts"() {
|
|
1830
|
+
"use strict";
|
|
1831
|
+
init_core();
|
|
1832
|
+
init_add_heading_anchors_plugin();
|
|
1833
|
+
init_cached_shiki_plugin();
|
|
1834
|
+
init_highlight_code_lines();
|
|
1835
|
+
init_mark_elements_plugin();
|
|
1836
|
+
init_mermaid_plugin();
|
|
1837
|
+
init_slugger_plugin();
|
|
1838
|
+
init_table_wrapper();
|
|
1839
|
+
init_shiki_grammars();
|
|
1840
|
+
DEFAULT_LANGUAGE = "ts";
|
|
1841
|
+
HIGHLIGHT_IDENTITY = {
|
|
1842
|
+
format: 2,
|
|
1843
|
+
defaultLanguage: DEFAULT_LANGUAGE,
|
|
1844
|
+
fallbackLanguage: "text",
|
|
1845
|
+
addLanguageClass: true,
|
|
1846
|
+
parseMetaString: "json-without-backslashes",
|
|
1847
|
+
tokenizeTimeLimit: 0
|
|
1848
|
+
};
|
|
1849
|
+
languageHighlighters = /* @__PURE__ */ new Map();
|
|
1850
|
+
languageIds = /* @__PURE__ */ new WeakMap();
|
|
1851
|
+
usedHighlighters = /* @__PURE__ */ new Map();
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
|
|
1855
|
+
// libs/utils/html/plugins/remove-not-indexable-content.plugin.ts
|
|
1856
|
+
import { filter } from "unist-util-filter";
|
|
1857
|
+
import { visit as visit8 } from "unist-util-visit";
|
|
1858
|
+
function removeNotIndexableContentPlugin() {
|
|
1859
|
+
return (tree) => {
|
|
1860
|
+
visit8(tree, "element", (node) => {
|
|
1861
|
+
if (isHeading(node) && isHiddenSpan(node.children[0])) {
|
|
1862
|
+
node.children = node.children.slice(1);
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
return filter(tree, { cascade: true }, (node) => {
|
|
1866
|
+
const preWithCode = node?.tagName === "pre" && node?.children?.some(isCodeNode);
|
|
1867
|
+
const notIndexable = node?.properties?.["indexable"] === "false";
|
|
1868
|
+
return !node?.tagName || !preWithCode && !notIndexable;
|
|
1869
|
+
});
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
function isHiddenSpan(node) {
|
|
1873
|
+
return node?.type === "element" && node.tagName === "span" && node.properties?.["ariaHidden"] === "true";
|
|
1874
|
+
}
|
|
1875
|
+
var init_remove_not_indexable_content_plugin = __esm({
|
|
1876
|
+
"libs/utils/html/plugins/remove-not-indexable-content.plugin.ts"() {
|
|
1877
|
+
"use strict";
|
|
1878
|
+
init_helpers2();
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1881
|
+
|
|
1882
|
+
// libs/utils/html/remove-not-indexable-content.ts
|
|
1883
|
+
import { rehype } from "rehype";
|
|
1884
|
+
async function removeNotIndexableContent(html) {
|
|
1885
|
+
return rehype().use(removeNotIndexableContentPlugin).process(html).then((file) => file.toString());
|
|
1886
|
+
}
|
|
1887
|
+
var init_remove_not_indexable_content = __esm({
|
|
1888
|
+
"libs/utils/html/remove-not-indexable-content.ts"() {
|
|
1889
|
+
"use strict";
|
|
1890
|
+
init_remove_not_indexable_content_plugin();
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
|
|
1894
|
+
// libs/utils/html/replace-keywords.ts
|
|
1895
|
+
import rehypeParse4 from "rehype-parse";
|
|
1896
|
+
import rehypeStringify4 from "rehype-stringify";
|
|
1897
|
+
import { unified as unified4 } from "unified";
|
|
1898
|
+
async function replaceKeywords(html, { getKeyword }) {
|
|
1899
|
+
return unified4().use(rehypeParse4, { fragment: true }).use(rehypeStringify4).use(keywordsPlugin, { getKeyword }).process(html).then((file) => file.toString());
|
|
1900
|
+
}
|
|
1901
|
+
var init_replace_keywords = __esm({
|
|
1902
|
+
"libs/utils/html/replace-keywords.ts"() {
|
|
1903
|
+
"use strict";
|
|
1904
|
+
init_keywords_plugin();
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
|
|
1908
|
+
// libs/utils/html/stringify-entities.ts
|
|
1909
|
+
import { stringifyEntities as stringify } from "stringify-entities";
|
|
1910
|
+
function stringifyEntities(content) {
|
|
1911
|
+
return stringify(content);
|
|
1912
|
+
}
|
|
1913
|
+
var init_stringify_entities = __esm({
|
|
1914
|
+
"libs/utils/html/stringify-entities.ts"() {
|
|
1915
|
+
"use strict";
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1919
|
+
// libs/utils/index.ts
|
|
1920
|
+
var utils_exports = {};
|
|
1921
|
+
__export(utils_exports, {
|
|
1922
|
+
minify: () => minify,
|
|
1923
|
+
postProcessHtml: () => postProcessHtml,
|
|
1924
|
+
processHtml: () => processHtml,
|
|
1925
|
+
removeNotIndexableContent: () => removeNotIndexableContent,
|
|
1926
|
+
replaceKeywords: () => replaceKeywords,
|
|
1927
|
+
stringifyEntities: () => stringifyEntities
|
|
1928
|
+
});
|
|
1929
|
+
var init_utils = __esm({
|
|
1930
|
+
"libs/utils/index.ts"() {
|
|
1931
|
+
"use strict";
|
|
1932
|
+
init_minify();
|
|
1933
|
+
init_post_process_html();
|
|
1934
|
+
init_process_html();
|
|
1935
|
+
init_remove_not_indexable_content();
|
|
1936
|
+
init_replace_keywords();
|
|
1937
|
+
init_stringify_entities();
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
|
|
1941
|
+
// libs/builder/generator/content/html-pipeline.ts
|
|
1942
|
+
import { parseFile } from "@orama/plugin-parsedoc";
|
|
1943
|
+
async function renderDocuments(task, highlight2, aborted = notAborted) {
|
|
1944
|
+
const results = [];
|
|
1945
|
+
for (const document of task.documents) {
|
|
1946
|
+
const result = await renderDocument(document, task, highlight2, aborted);
|
|
1947
|
+
results.push(result);
|
|
1948
|
+
if (!("html" in result)) break;
|
|
1949
|
+
}
|
|
1950
|
+
return results;
|
|
1951
|
+
}
|
|
1952
|
+
async function renderDocument(document, { themes, langs, grammars: grammars2 }, highlight2, aborted) {
|
|
1953
|
+
if (aborted()) return { aborted: true, mismatches: 0 };
|
|
1954
|
+
const utilities = await htmlUtilities();
|
|
1955
|
+
if (aborted()) return { aborted: true, mismatches: 0 };
|
|
1956
|
+
const call = highlight2();
|
|
1957
|
+
const result = await utilities.processHtml(document.html, {
|
|
1958
|
+
..."headings" in document ? { headings: document.headings } : {},
|
|
1959
|
+
...document.route === void 0 ? {} : { route: document.route },
|
|
1960
|
+
lightTheme: themes.light,
|
|
1961
|
+
darkTheme: themes.dark,
|
|
1962
|
+
...langs ? { langs } : {},
|
|
1963
|
+
grammars: grammars2 ?? "used",
|
|
1964
|
+
...call ? { highlight: call } : {}
|
|
1965
|
+
});
|
|
1966
|
+
const mismatches = call?.mismatches.length ?? 0;
|
|
1967
|
+
if (result.error) return { failed: "process", message: String(result.error), mismatches };
|
|
1968
|
+
if (aborted()) return { aborted: true, mismatches };
|
|
1969
|
+
const post = await utilities.postProcessHtml(result.content);
|
|
1970
|
+
if (post.error) return { failed: "post-process", message: String(post.error), mismatches };
|
|
1971
|
+
if (aborted()) return { aborted: true, mismatches };
|
|
1972
|
+
return {
|
|
1973
|
+
html: post.content,
|
|
1974
|
+
anchors: result.anchors.map(normalizeAnchor),
|
|
1975
|
+
usedKeywords: post.usedKeywords,
|
|
1976
|
+
mismatches
|
|
1977
|
+
};
|
|
1978
|
+
}
|
|
1979
|
+
async function linkDocument(task, getKeyword, aborted = notAborted) {
|
|
1980
|
+
const consulted = [];
|
|
1981
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1982
|
+
try {
|
|
1983
|
+
const utilities = await htmlUtilities();
|
|
1984
|
+
const html = await utilities.replaceKeywords(task.html, {
|
|
1985
|
+
getKeyword: (key) => {
|
|
1986
|
+
if (!seen.has(key)) {
|
|
1987
|
+
seen.add(key);
|
|
1988
|
+
consulted.push(key);
|
|
1989
|
+
}
|
|
1990
|
+
return getKeyword(key);
|
|
1991
|
+
}
|
|
1992
|
+
});
|
|
1993
|
+
if (aborted()) return { aborted: true, consulted };
|
|
1994
|
+
const indexable = await utilities.removeNotIndexableContent(html);
|
|
1995
|
+
if (aborted()) return { aborted: true, consulted };
|
|
1996
|
+
const searchRecords = await buildSearchRecords(indexable, task);
|
|
1997
|
+
if (aborted()) return { aborted: true, consulted };
|
|
1998
|
+
return { html, searchRecords, consulted };
|
|
1999
|
+
} catch (error) {
|
|
2000
|
+
return { failed: String(error), consulted };
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
function bindingsOf(keywords) {
|
|
2004
|
+
return new Map(keywords.map((keyword) => [keyword.key, keyword]));
|
|
2005
|
+
}
|
|
2006
|
+
async function buildSearchRecords(html, task) {
|
|
2007
|
+
const documents = await parseFile(html, "html", {
|
|
2008
|
+
transformFn: transformSearchNode,
|
|
2009
|
+
mergeStrategy: "split"
|
|
2010
|
+
});
|
|
2011
|
+
const records = [];
|
|
2012
|
+
let section;
|
|
2013
|
+
for (const document of documents) {
|
|
2014
|
+
if (!document?.content?.trim()) continue;
|
|
2015
|
+
if (isSearchHeading(document)) {
|
|
2016
|
+
section = document;
|
|
2017
|
+
continue;
|
|
2018
|
+
}
|
|
2019
|
+
const fragment2 = section?.properties?.["id"];
|
|
2020
|
+
records.push({
|
|
2021
|
+
breadcrumbs: task.breadcrumbs,
|
|
2022
|
+
pageType: task.pageType,
|
|
2023
|
+
// Without the whitespace around them, a no-break space included: a heading's decorative
|
|
2024
|
+
// emoji is joined to its text with one. `helpers/build-indexes.ts` of the legacy engine trims
|
|
2025
|
+
// them the same way; keep both in step, so the two search indexes stay equal.
|
|
2026
|
+
title: task.title.trim(),
|
|
2027
|
+
section: (section?.content ?? "").trim(),
|
|
2028
|
+
route: task.absoluteRoute,
|
|
2029
|
+
...typeof fragment2 === "string" && fragment2 ? { fragment: fragment2 } : {},
|
|
2030
|
+
content: document.content
|
|
2031
|
+
});
|
|
2032
|
+
}
|
|
2033
|
+
return records;
|
|
2034
|
+
}
|
|
2035
|
+
function transformSearchNode(node) {
|
|
2036
|
+
return ["strong", "a", "time", "span", "small", "b", "p", "ul"].includes(node.tag) ? { ...node, raw: `<p>${node.content}</p>` } : node;
|
|
2037
|
+
}
|
|
2038
|
+
function isSearchHeading(document) {
|
|
2039
|
+
return ["h1", "h2", "h3", "h4", "h5", "h6"].includes(document.type) && !!document.properties && !!document.properties["id"];
|
|
2040
|
+
}
|
|
2041
|
+
function normalizeAnchor(anchor) {
|
|
2042
|
+
return {
|
|
2043
|
+
anchorId: anchor.anchorId,
|
|
2044
|
+
anchor: anchor.anchor,
|
|
2045
|
+
title: anchor.title,
|
|
2046
|
+
type: anchor.type,
|
|
2047
|
+
...anchor.scope === void 0 ? {} : { scope: anchor.scope }
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
function recordingHighlight(settings, themes, store) {
|
|
2051
|
+
const records = [];
|
|
2052
|
+
return {
|
|
2053
|
+
records,
|
|
2054
|
+
next: () => {
|
|
2055
|
+
const record = { used: [], fresh: [], mismatched: [] };
|
|
2056
|
+
records.push(record);
|
|
2057
|
+
const mismatches = [];
|
|
2058
|
+
return {
|
|
2059
|
+
key: (block) => digestOf({ context: settings.context, block }),
|
|
2060
|
+
get: (key) => {
|
|
2061
|
+
const value = store.get(key);
|
|
2062
|
+
if (value !== void 0) record.used.push(key);
|
|
2063
|
+
return value;
|
|
2064
|
+
},
|
|
2065
|
+
set: (key, value) => {
|
|
2066
|
+
store.set(key, value);
|
|
2067
|
+
record.used.push(key);
|
|
2068
|
+
record.fresh.push([key, value]);
|
|
2069
|
+
store.prove();
|
|
2070
|
+
},
|
|
2071
|
+
loads: (requested) => requested.light === themes.light && requested.dark === themes.dark && store.proven(),
|
|
2072
|
+
verify: settings.verify,
|
|
2073
|
+
mismatch: (key) => {
|
|
2074
|
+
mismatches.push(key);
|
|
2075
|
+
record.mismatched.push(key);
|
|
2076
|
+
},
|
|
2077
|
+
mismatches
|
|
2078
|
+
};
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
}
|
|
2082
|
+
function serveHtmlThread(port) {
|
|
2083
|
+
const entries = /* @__PURE__ */ new Map();
|
|
2084
|
+
const proven = /* @__PURE__ */ new Set();
|
|
2085
|
+
let keywordSet;
|
|
2086
|
+
const reply = (value) => port.postMessage(encode(value));
|
|
2087
|
+
const render = async (job) => {
|
|
2088
|
+
const task = job["task"];
|
|
2089
|
+
const settings = job["highlight"];
|
|
2090
|
+
const recording = settings ? recordingHighlight(settings, task.themes, {
|
|
2091
|
+
get: (key) => entries.get(key),
|
|
2092
|
+
set: (key, value) => entries.set(key, value),
|
|
2093
|
+
proven: () => proven.has(settings.context),
|
|
2094
|
+
prove: () => proven.add(settings.context)
|
|
2095
|
+
}) : void 0;
|
|
2096
|
+
const documents = await renderDocuments(task, () => recording?.next());
|
|
2097
|
+
return { documents, ...recording ? { highlight: recording.records } : {} };
|
|
2098
|
+
};
|
|
2099
|
+
const link = async (job) => {
|
|
2100
|
+
if (!keywordSet || keywordSet.id !== job["keywords"])
|
|
2101
|
+
throw new Error(`Unknown keyword set ${String(job["keywords"])}`);
|
|
2102
|
+
const bindings = keywordSet.bindings;
|
|
2103
|
+
return linkDocument(job["task"], (key) => bindings.get(key));
|
|
2104
|
+
};
|
|
2105
|
+
port.on("message", (message) => {
|
|
2106
|
+
let id;
|
|
2107
|
+
void (async () => {
|
|
2108
|
+
try {
|
|
2109
|
+
const job = decode(message);
|
|
2110
|
+
id = job["id"];
|
|
2111
|
+
switch (job["type"]) {
|
|
2112
|
+
case "highlight": {
|
|
2113
|
+
if (job["reset"] === true) entries.clear();
|
|
2114
|
+
for (const [key, value] of job["entries"])
|
|
2115
|
+
entries.set(key, value);
|
|
2116
|
+
if (job["proven"] === true) proven.add(job["context"]);
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2119
|
+
case "keywords":
|
|
2120
|
+
keywordSet = {
|
|
2121
|
+
id: job["id"],
|
|
2122
|
+
bindings: bindingsOf(job["keywords"])
|
|
2123
|
+
};
|
|
2124
|
+
return;
|
|
2125
|
+
case "warm": {
|
|
2126
|
+
const cache = {
|
|
2127
|
+
key: () => "",
|
|
2128
|
+
get: () => void 0,
|
|
2129
|
+
set: () => void 0,
|
|
2130
|
+
loads: () => false,
|
|
2131
|
+
verify: false,
|
|
2132
|
+
mismatch: () => void 0,
|
|
2133
|
+
mismatches: []
|
|
2134
|
+
};
|
|
2135
|
+
await renderDocuments(
|
|
2136
|
+
{
|
|
2137
|
+
documents: [{ html: WARM_DOCUMENT }],
|
|
2138
|
+
themes: job["themes"],
|
|
2139
|
+
...job["langs"] ? { langs: job["langs"] } : {},
|
|
2140
|
+
...job["grammars"] === "all" ? { grammars: "all" } : {}
|
|
2141
|
+
},
|
|
2142
|
+
() => job["cache"] === true ? cache : void 0
|
|
2143
|
+
);
|
|
2144
|
+
return;
|
|
2145
|
+
}
|
|
2146
|
+
case "render":
|
|
2147
|
+
reply({ type: "done", id, result: await render(job) });
|
|
2148
|
+
return;
|
|
2149
|
+
case "link":
|
|
2150
|
+
reply({ type: "done", id, result: await link(job) });
|
|
2151
|
+
return;
|
|
2152
|
+
default:
|
|
2153
|
+
throw new Error(`Unknown render thread job ${String(job["type"])}`);
|
|
2154
|
+
}
|
|
2155
|
+
} catch (error) {
|
|
2156
|
+
reply({ type: "failed", id: id ?? null, message: String(error) });
|
|
2157
|
+
}
|
|
2158
|
+
})();
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
var htmlUtilities, notAborted, WARM_DOCUMENT;
|
|
2162
|
+
var init_html_pipeline = __esm({
|
|
2163
|
+
"libs/builder/generator/content/html-pipeline.ts"() {
|
|
2164
|
+
"use strict";
|
|
2165
|
+
init_canonical();
|
|
2166
|
+
init_protocol();
|
|
2167
|
+
htmlUtilities = () => Promise.resolve().then(() => (init_utils(), utils_exports));
|
|
2168
|
+
notAborted = () => false;
|
|
2169
|
+
WARM_DOCUMENT = ["ts", "angular-ts", "angular-html"].map((language) => `<pre><code class="language-${language}">warm</code></pre>`).join("");
|
|
2170
|
+
}
|
|
2171
|
+
});
|
|
2172
|
+
|
|
2173
|
+
// libs/builder/generator/content/html-worker.ts
|
|
2174
|
+
import { parentPort } from "node:worker_threads";
|
|
2175
|
+
var require_html_worker = __commonJS({
|
|
2176
|
+
"libs/builder/generator/content/html-worker.ts"() {
|
|
2177
|
+
init_html_pipeline();
|
|
2178
|
+
if (parentPort) serveHtmlThread(parentPort);
|
|
2179
|
+
}
|
|
2180
|
+
});
|
|
2181
|
+
export default require_html_worker();
|