HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/design.system/node_modules/@microsoft/tsdoc/lib/nodes/DocLinkTag.js.map
{"version":3,"file":"DocLinkTag.js","sourceRoot":"","sources":["../../src/nodes/DocLinkTag.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;;;;;;;;;;;;;;;;AAE3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAGjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA+BvD;;GAEG;AACH;IAAgC,8BAAgB;IAgB9C;;;OAGG;IACH,oBAAmB,UAA+D;QAChF,YAAA,MAAK,YAAC,UAAU,CAAC,SAAC;QAElB,IAAI,KAAI,CAAC,oBAAoB,KAAK,OAAO,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QAED,KAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,eAAe,CAAC;QAEnD,IAAI,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,UAAU,CAAC,eAAe,KAAK,SAAS,IAAI,UAAU,CAAC,qBAAqB,KAAK,SAA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CAAC;gBACjC,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE,CAAC;oBACxC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;gBAC5D,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;;;OAAA;IAED,gBAAgB;IACN,4CAAuB,GAAjC;QACE,WAAW;QACX,OAAO;YACL,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,sBAAsB;YAC3B,IAAI,CAAC,+BAA+B;YACpC,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,wBAAwB;YAC7B,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,4BAA4B;SAClC,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAlKD,CAAgC,gBAAgB,GAkK/C","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, DocNode } from './DocNode';\r\nimport type { DocDeclarationReference } from './DocDeclarationReference';\r\nimport {\r\n  DocInlineTagBase,\r\n  type IDocInlineTagBaseParsedParameters,\r\n  type IDocInlineTagBaseParameters\r\n} from './DocInlineTagBase';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\n\r\n/**\r\n * Constructor parameters for {@link DocLinkTag}.\r\n */\r\nexport interface IDocLinkTagParameters extends IDocInlineTagBaseParameters {\r\n  codeDestination?: DocDeclarationReference;\r\n\r\n  urlDestination?: string;\r\n\r\n  linkText?: string;\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link DocLinkTag}.\r\n */\r\nexport interface IDocLinkTagParsedParameters extends IDocInlineTagBaseParsedParameters {\r\n  codeDestination?: DocDeclarationReference;\r\n\r\n  urlDestinationExcerpt?: TokenSequence;\r\n\r\n  spacingAfterDestinationExcerpt?: TokenSequence;\r\n\r\n  pipeExcerpt?: TokenSequence;\r\n  spacingAfterPipeExcerpt?: TokenSequence;\r\n\r\n  linkTextExcerpt?: TokenSequence;\r\n  spacingAfterLinkTextExcerpt?: TokenSequence;\r\n}\r\n\r\n/**\r\n * Represents an `{@link}` tag.\r\n */\r\nexport class DocLinkTag extends DocInlineTagBase {\r\n  private readonly _codeDestination: DocDeclarationReference | undefined;\r\n\r\n  private _urlDestination: string | undefined;\r\n  private readonly _urlDestinationExcerpt: DocExcerpt | undefined;\r\n\r\n  private readonly _spacingAfterDestinationExcerpt: DocExcerpt | undefined;\r\n\r\n  private readonly _pipeExcerpt: DocExcerpt | undefined;\r\n  private readonly _spacingAfterPipeExcerpt: DocExcerpt | undefined;\r\n\r\n  private _linkText: string | undefined;\r\n  private readonly _spacingAfterLinkTextExcerpt: DocExcerpt | undefined;\r\n\r\n  private readonly _linkTextExcerpt: DocExcerpt | undefined;\r\n\r\n  /**\r\n   * Don't call this directly.  Instead use {@link TSDocParser}\r\n   * @internal\r\n   */\r\n  public constructor(parameters: IDocLinkTagParameters | IDocLinkTagParsedParameters) {\r\n    super(parameters);\r\n\r\n    if (this.tagNameWithUpperCase !== '@LINK') {\r\n      throw new Error('DocLinkTag requires the tag name to be \"{@link}\"');\r\n    }\r\n\r\n    this._codeDestination = parameters.codeDestination;\r\n\r\n    if (DocNode.isParsedParameters(parameters)) {\r\n      if (parameters.codeDestination !== undefined && parameters.urlDestinationExcerpt !== undefined) {\r\n        throw new Error('Either the codeDestination or the urlDestination may be specified, but not both');\r\n      }\r\n\r\n      if (parameters.urlDestinationExcerpt) {\r\n        this._urlDestinationExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.LinkTag_UrlDestination,\r\n          content: parameters.urlDestinationExcerpt\r\n        });\r\n      }\r\n      if (parameters.spacingAfterDestinationExcerpt) {\r\n        this._spacingAfterDestinationExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.Spacing,\r\n          content: parameters.spacingAfterDestinationExcerpt\r\n        });\r\n      }\r\n\r\n      if (parameters.pipeExcerpt) {\r\n        this._pipeExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.LinkTag_Pipe,\r\n          content: parameters.pipeExcerpt\r\n        });\r\n      }\r\n      if (parameters.spacingAfterPipeExcerpt) {\r\n        this._spacingAfterPipeExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.Spacing,\r\n          content: parameters.spacingAfterPipeExcerpt\r\n        });\r\n      }\r\n\r\n      if (parameters.linkTextExcerpt) {\r\n        this._linkTextExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.LinkTag_LinkText,\r\n          content: parameters.linkTextExcerpt\r\n        });\r\n      }\r\n      if (parameters.spacingAfterLinkTextExcerpt) {\r\n        this._spacingAfterLinkTextExcerpt = new DocExcerpt({\r\n          configuration: this.configuration,\r\n          excerptKind: ExcerptKind.Spacing,\r\n          content: parameters.spacingAfterLinkTextExcerpt\r\n        });\r\n      }\r\n    } else {\r\n      if (parameters.codeDestination !== undefined && parameters.urlDestination !== undefined) {\r\n        throw new Error('Either the codeDestination or the urlDestination may be specified, but not both');\r\n      }\r\n\r\n      this._urlDestination = parameters.urlDestination;\r\n      this._linkText = parameters.linkText;\r\n    }\r\n  }\r\n\r\n  /** @override */\r\n  public get kind(): DocNodeKind | string {\r\n    return DocNodeKind.LinkTag;\r\n  }\r\n\r\n  /**\r\n   * If the link tag refers to a declaration, this returns the declaration reference object;\r\n   * otherwise this property is undefined.\r\n   * @remarks\r\n   * Either the `codeDestination` or the `urlDestination` property will be defined, but never both.\r\n   */\r\n  public get codeDestination(): DocDeclarationReference | undefined {\r\n    return this._codeDestination;\r\n  }\r\n\r\n  /**\r\n   * If the link tag was an ordinary URI, this returns the URL string;\r\n   * otherwise this property is undefined.\r\n   * @remarks\r\n   * Either the `codeDestination` or the `urlDestination` property will be defined, but never both.\r\n   */\r\n  public get urlDestination(): string | undefined {\r\n    if (this._urlDestination === undefined) {\r\n      if (this._urlDestinationExcerpt !== undefined) {\r\n        this._urlDestination = this._urlDestinationExcerpt.content.toString();\r\n      }\r\n    }\r\n    return this._urlDestination;\r\n  }\r\n\r\n  /**\r\n   * An optional text string that is the hyperlink text.  If omitted, the documentation\r\n   * renderer will use a default string based on the link itself (e.g. the URL text\r\n   * or the declaration identifier).\r\n   *\r\n   * @remarks\r\n   *\r\n   * In HTML, the hyperlink can include leading/trailing space characters around the link text.\r\n   * For example, this HTML will cause a web browser to `y` and also the space character before\r\n   * and after it:\r\n   *\r\n   * ```html\r\n   * x<a href=\"#Button\"> y </a> z\r\n   * ```\r\n   *\r\n   * Unlike HTML, TSDoc trims leading/trailing spaces.  For example, this TSDoc will be\r\n   * displayed `xy z` and underline only the `y` character:\r\n   *\r\n   * ```\r\n   * x{@link Button | y } z\r\n   * ```\r\n   */\r\n  public get linkText(): string | undefined {\r\n    if (this._linkText === undefined) {\r\n      if (this._linkTextExcerpt !== undefined) {\r\n        this._linkText = this._linkTextExcerpt.content.toString();\r\n      }\r\n    }\r\n    return this._linkText;\r\n  }\r\n\r\n  /** @override */\r\n  protected getChildNodesForContent(): ReadonlyArray<DocNode | undefined> {\r\n    // abstract\r\n    return [\r\n      this._codeDestination,\r\n      this._urlDestinationExcerpt,\r\n      this._spacingAfterDestinationExcerpt,\r\n      this._pipeExcerpt,\r\n      this._spacingAfterPipeExcerpt,\r\n      this._linkTextExcerpt,\r\n      this._spacingAfterLinkTextExcerpt\r\n    ];\r\n  }\r\n}\r\n"]}