@grafctory/core - v0.15.0
    Preparing search index...

    Type Alias Variant

    Variant: "browsable" | "hierarchical" | "absolute" | "internal" | "relative"

    Identifier variant per RFC 3986 §§ 4.2-4.3.

    • "browsable": http: or https: with a host, a link a browser can open (https://example.org/path)
    • "hierarchical": Absolute with hierarchical path (http://example.org/path, base:/path)
    • "absolute": Contains scheme (http://example.org/path, urn:example:resource)
    • "internal": Root-relative path starting with a single / (/path)
    • "relative": Reference without scheme or authority (../path, path)
    • Variants form an inclusivity hierarchy: browsable ⊂ hierarchical ⊂ absolute ⊂ internal ⊂ relative

    • The "hierarchical" variant requires an absolute URI with a path starting with /; authority is optional per RFC 3986 § 3 hier-part grammar (path-absolute alternative); reference resolution is supported per RFC 3986 § 5.2.3

    • The "browsable" and "hierarchical" variants are checked on the value as written rather than on its normalized form, so http:path, http:/path and http:///path are neither browsable nor hierarchical even though the URL API repairs all three into http://path/, turning a path segment into a host the value never named

    • The "browsable" and "internal" variants are project-specific, not formally defined in RFC 3986

    • No variant admits an authority supplied by a reference: references opening with // (network-path references per RFC 3986 § 4.2) are rejected whatever the variant

    • For non-hierarchical (opaque) URIs such as urn: or mailto:, reference operations adapt:

      • resolve: Throws RangeError for relative references (no standard resolution)
      • internalize: Returns scheme-specific part if schemes match
      • relativize: Returns scheme-specific part if schemes match