diff --git a/packages/adjacency/src/binary.ts b/packages/adjacency/src/binary.ts index 73f3368c98..86eac01cd9 100644 --- a/packages/adjacency/src/binary.ts +++ b/packages/adjacency/src/binary.ts @@ -112,10 +112,11 @@ export class AdjacencyBitMatrix implements IGraph { } /** - * Creates adjacency matrix backed by a {@link @thi.ng/bitfield#BitMatrix} + * Creates adjacency matrix backed by a + * [`BitMatrix`](https://docs.thi.ng/umbrella/bitfield/classes/BitMatrix.html) * with capacity `n` (max vertices), optionally initialized with given edge - * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true - * (default: false), creates symmetrical adjacencies. + * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true (default: + * false), creates symmetrical adjacencies. * * @param n - max vertices * @param edges - edge pairs diff --git a/packages/adjacency/src/disjoint-set.ts b/packages/adjacency/src/disjoint-set.ts index f645b5f426..68ff72dc98 100644 --- a/packages/adjacency/src/disjoint-set.ts +++ b/packages/adjacency/src/disjoint-set.ts @@ -1,12 +1,12 @@ import { fillRange } from "@thi.ng/arrays/fill-range"; /** - * Typed array based Disjoint Set implementation with quick union and - * path compression, after Sedgewick & Wayne. + * Typed array based Disjoint Set implementation with quick union and path + * compression, after Sedgewick & Wayne. * * @remarks - * - {@link https://en.wikipedia.org/wiki/Disjoint-set_data_structure} - * - {@link https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf} + * - https://en.wikipedia.org/wiki/Disjoint-set_data_structure + * - https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf */ export class DisjointSet { roots: Uint32Array; diff --git a/packages/adjacency/src/mst.ts b/packages/adjacency/src/mst.ts index 4ed8b63d02..ad61da6e8c 100644 --- a/packages/adjacency/src/mst.ts +++ b/packages/adjacency/src/mst.ts @@ -18,9 +18,11 @@ import { DisjointSet } from "./disjoint-set.js"; * criteria. The result edges will be in ascending order, based on the supplied * cost function. The cost function is called once for each edge and return * values will be cached prior to sorting (see - * {@link @thi.ng/arrays#sortByCachedKey} for details). + * [`sortByCachedKey()`](https://docs.thi.ng/umbrella/arrays/functions/sortByCachedKey.html) + * for details). * - * Reference: {@link https://en.wikipedia.org/wiki/Kruskal%27s_algorithm} + * References: + * - https://en.wikipedia.org/wiki/Kruskal%27s_algorithm * * @example * ```ts diff --git a/packages/adjacency/src/sparse.ts b/packages/adjacency/src/sparse.ts index 6aec1680c3..8e8f171836 100644 --- a/packages/adjacency/src/sparse.ts +++ b/packages/adjacency/src/sparse.ts @@ -82,7 +82,8 @@ export class AdjacencyMatrix extends CSR implements IGraph { } /** - * Returns a diagonal sparse matrix {@link @thi.ng/sparse#CSR} containing + * Returns a diagonal sparse matrix + * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) containing * information about the degree of each vertex, i.e. the number of edges * attached to each vertex. * @@ -115,12 +116,13 @@ export class AdjacencyMatrix extends CSR implements IGraph { } /** - * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is - * the degree matrix and `A` this adjacency matrix. + * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is the + * degree matrix and `A` this adjacency matrix. * * @remarks - * - {@link https://en.wikipedia.org/wiki/Laplacian_matrix} - * - {@link https://en.wikipedia.org/wiki/Discrete_Laplace_operator} + * References: + * - https://en.wikipedia.org/wiki/Laplacian_matrix + * - https://en.wikipedia.org/wiki/Discrete_Laplace_operator * * @param deg - degree type for {@link AdjacencyMatrix.degreeMat} */ @@ -173,10 +175,11 @@ export class AdjacencyMatrix extends CSR implements IGraph { } /** - * Creates an adjacency matrix backed by a sparse {@link @thi.ng/sparse#CSR} - * matrix, optionally initialize with given edge pairs. Each edge is a `[src, - * dest]` tuple. If `undirected` is true (default: false), creates symmetrical - * edges (i.e. undirected graph). + * Creates an adjacency matrix backed by a sparse + * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) matrix, + * optionally initialize with given edge pairs. Each edge is a `[src, dest]` + * tuple. If `undirected` is true (default: false), creates symmetrical edges + * (i.e. undirected graph). * * @param n - max number of vertices * @param edges - edge pairs diff --git a/packages/api/src/hiccup.ts b/packages/api/src/hiccup.ts index 134f02f022..540a57da93 100644 --- a/packages/api/src/hiccup.ts +++ b/packages/api/src/hiccup.ts @@ -1,9 +1,9 @@ export interface IToHiccup { /** - * Returns a {@link @thi.ng/hiccup# | @thi.ng/hiccup} compatible representation. The optional - * `ctx` arg is an arbitrary user context object passed to all - * hiccup components during serialization (or during DOM creation / - * update if used with {@link @thi.ng/hdom# | @thi.ng/hdom}) + * Returns a [thi.ng/hiccup](https://thi.ng/hiccup) compatible + * representation. The optional `ctx` arg is an arbitrary user context + * object passed to all hiccup components during serialization (or during + * DOM creation / update if used with [thi.ng/hdom](https://thi.ng/hdom)). * * @param ctx - user context object * @param attribs - user attribs diff --git a/packages/api/src/mixin.ts b/packages/api/src/mixin.ts index 9e4d68b2c5..17bea4cfdb 100644 --- a/packages/api/src/mixin.ts +++ b/packages/api/src/mixin.ts @@ -1,10 +1,12 @@ /** * Class behavior mixin based on: - * {@link http://raganwald.com/2015/06/26/decorators-in-es7.html} + * - http://raganwald.com/2015/06/26/decorators-in-es7.html * * Additionally only injects/overwrites properties in target, which are NOT - * marked with `@nomixin` (i.e. those which haven't set their `configurable` - * property descriptor flag to `false`) + * marked with + * [`@nomixin`](https://docs.thi.ng/umbrella/api/functions/nomixin.html) (i.e. + * those which haven't set their `configurable` property descriptor flag to + * `false`) * * @param behaviour - to mixin * @param sharedBehaviour - diff --git a/packages/api/src/mixins/ienable.ts b/packages/api/src/mixins/ienable.ts index 16871c9433..49ee787c44 100644 --- a/packages/api/src/mixins/ienable.ts +++ b/packages/api/src/mixins/ienable.ts @@ -9,11 +9,10 @@ interface _IEnable extends IEnable { } /** - * Mixin class decorator, injects IEnable default implementation, incl. - * a `_enabled` property. If the target also implements the - * {@link @thi.ng/api#INotify} interface, {@link IEnable.enable} and - * {@link IEnable.disable} will automatically emit the respective - * events. + * Mixin class decorator, injects IEnable default implementation, incl. a + * `_enabled` property. If the target also implements the {@link INotify} + * interface, {@link IEnable.enable} and {@link IEnable.disable} will + * automatically emit the respective events. */ export const IEnableMixin = mixin(>{ _enabled: true, diff --git a/packages/arrays/src/binary-search.ts b/packages/arrays/src/binary-search.ts index c7f53be8e7..b88c7cd880 100644 --- a/packages/arrays/src/binary-search.ts +++ b/packages/arrays/src/binary-search.ts @@ -3,21 +3,20 @@ import { compare } from "@thi.ng/compare/compare"; import { compareNumAsc } from "@thi.ng/compare/numeric"; /** - * Returns the supposed index of `x` in pre-sorted array-like collection - * `buf`. + * Returns the supposed index of `x` in pre-sorted array-like collection `buf`. * * @remarks - * If `x` can't be found, returns `-index-1`, representing the negative - * of the index, were `x` to be inserted into `buf`. E.g if the return - * value is -3, `x` would appear/insert at index 2. + * If `x` can't be found, returns `-index-1`, representing the negative of the + * index, were `x` to be inserted into `buf`. E.g if the return value is -3, `x` + * would appear/insert at index 2. * - * The optional `key` function is used to obtain the actual sort value - * of `x` and each array item (default: identity). + * The optional `key` function is used to obtain the actual sort value of `x` + * and each array item (default: identity). * * The optional `cmp` comparator (default: - * {@link @thi.ng/compare#compare}) is then used to identify the index - * of `x`. The sort order of `buf` MUST be compatible with that of - * `cmp`. + * [`compare()`](https://docs.thi.ng/umbrella/compare/functions/compare.html)) + * is then used to identify the index of `x`. The sort order of `buf` MUST be + * compatible with that of `cmp`. * * @example * ```ts @@ -58,7 +57,7 @@ export const binarySearch = ( /** * Similar to {@link binarySearch}, but optimized for numeric arrays and * supporting custom comparators (default: - * {@link @thi.ng/compare#compareNumAsc}). + * [`compareNumAsc()`](https://docs.thi.ng/umbrella/compare/functions/compareNumAsc.html)). * * @param buf - array * @param x - search value diff --git a/packages/arrays/src/ends-with.ts b/packages/arrays/src/ends-with.ts index 3f273ef12f..91f18bc533 100644 --- a/packages/arrays/src/ends-with.ts +++ b/packages/arrays/src/ends-with.ts @@ -1,14 +1,15 @@ import { equiv as _eq } from "@thi.ng/equiv"; /** - * Returns true if the last items of `buf` are the same items as in - * `needle`. + * Returns true if the last items of `buf` are the same items as in `needle`. * * @remarks - * This means `buf` should have at least the same length as `needle` for - * this to be true. + * This means `buf` should have at least the same length as `needle` for this to + * be true. * - * By default, uses {@link @thi.ng/equiv#equiv} for equality checking. + * By default, uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for + * equality checking. * * {@link startsWith} * diff --git a/packages/arrays/src/find.ts b/packages/arrays/src/find.ts index 2858fdb0db..e817875c46 100644 --- a/packages/arrays/src/find.ts +++ b/packages/arrays/src/find.ts @@ -2,7 +2,7 @@ import type { Predicate2 } from "@thi.ng/api"; import { equiv as _equiv } from "@thi.ng/equiv"; /** - * Similar to `Array.find()`, but uses {@link @thi.ng/equiv#equiv} as + * Similar to `Array.find()`, but uses [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) as * default predicate. * * @param buf - array @@ -19,8 +19,9 @@ export const find = ( }; /** - * Similar to `Array.findIndex()`, but uses {@link @thi.ng/equiv#equiv} - * as default predicate. + * Similar to `Array.findIndex()`, but uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) as + * default predicate. * * @param buf - array * @param x - search value diff --git a/packages/arrays/src/fuzzy-match.ts b/packages/arrays/src/fuzzy-match.ts index a80b434242..15a3a5b403 100644 --- a/packages/arrays/src/fuzzy-match.ts +++ b/packages/arrays/src/fuzzy-match.ts @@ -7,12 +7,14 @@ import { equiv as _eq } from "@thi.ng/equiv"; * * @remarks * The optional `equiv` predicate can be used to customize item equality - * checking. Uses {@link @thi.ng/equiv#equiv} by default. + * checking. Uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) by + * default. * - * Adapted and generalized from: - * {@link https://github.com/bevacqua/fufuzzyzzysearch} (MIT) + * Adapted and generalized from: https://github.com/bevacqua/fufuzzyzzysearch + * (MIT licensed) * - * {@link @thi.ng/transducers#(filterFuzzy:1)} + * [`filterFuzzy()`](https://docs.thi.ng/umbrella/transducers/functions/filterFuzzy.html) * * @param domain - array * @param query - search value diff --git a/packages/arrays/src/is-sorted.ts b/packages/arrays/src/is-sorted.ts index 1071b516e9..d1a06b8303 100644 --- a/packages/arrays/src/is-sorted.ts +++ b/packages/arrays/src/is-sorted.ts @@ -2,13 +2,14 @@ import type { Comparator } from "@thi.ng/api"; import { compare } from "@thi.ng/compare/compare"; /** - * Returns true if the given array and its elements in the selected - * index range (entire array, by default) are in the order defined by - * the given comparator ({@link @thi.ng/compare#compare} by default). + * Returns true if the given array and its elements in the selected index range + * (entire array, by default) are in the order defined by the given comparator + * ([`compare()`](https://docs.thi.ng/umbrella/compare/functions/compare.html) + * by default). * * @remarks - * Always returns true, if effective index range (or array length) has - * less than two elements. No bounds checking. + * Always returns true, if effective index range (or array length) has less than + * two elements. No bounds checking. * * @example * ```ts diff --git a/packages/arrays/src/quicksort.ts b/packages/arrays/src/quicksort.ts index 07f0459934..a40af78a6f 100644 --- a/packages/arrays/src/quicksort.ts +++ b/packages/arrays/src/quicksort.ts @@ -3,19 +3,20 @@ import { compare } from "@thi.ng/compare/compare"; import { swap } from "./swap.js"; /** - * In-place quicksort implementation with optional comparator & index - * based swap function, useful for sorting multiple related arrays in - * parallel, based on a single sort criteria. + * In-place quicksort implementation with optional comparator & index based swap + * function, useful for sorting multiple related arrays in parallel, based on a + * single sort criteria. * * @remarks - * Supports sorting of sub-ranges only, via optionally given - * `start`/`end` indices (both inclusive). + * Supports sorting of sub-ranges only, via optionally given `start`/`end` + * indices (both inclusive). * - * Uses Hoare partitioning scheme. {@link @thi.ng/compare#compare} is - * used as default comparator and {@link swap} from this package as - * default swap function. Also see {@link multiSwap}. + * Uses Hoare partitioning scheme. + * [`compare()`](https://docs.thi.ng/umbrella/compare/functions/compare.html) is + * used as default comparator and {@link swap} from this package as default swap + * function. Also see {@link multiSwap}. * - * {@link https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme} + * - https://en.wikipedia.org/wiki/Quicksort#Hoare_partition_scheme * * @example * ```ts diff --git a/packages/arrays/src/shuffle.ts b/packages/arrays/src/shuffle.ts index ecc760bfc3..ebe8d1318b 100644 --- a/packages/arrays/src/shuffle.ts +++ b/packages/arrays/src/shuffle.ts @@ -5,14 +5,14 @@ import { SYSTEM } from "@thi.ng/random/system"; import type { AnyArray } from "./api.js"; /** - * Shuffles the items in the given index range of array `buf` using - * Fisher-yates and optional `rnd` PRNG. + * Shuffles the items in the given index range of array `buf` using Fisher-yates + * and optional `rnd` PRNG. * * @remarks - * If neither `start` / `end` are given, the entire array will be - * shuffled. Mutates original array. + * If neither `start` / `end` are given, the entire array will be shuffled. + * Mutates original array. * - * See {@link @thi.ng/random#IRandom} + * See [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) * * @param buf - array * @param n - num items diff --git a/packages/arrays/src/starts-with.ts b/packages/arrays/src/starts-with.ts index c580663dab..4d82ea9eef 100644 --- a/packages/arrays/src/starts-with.ts +++ b/packages/arrays/src/starts-with.ts @@ -1,14 +1,15 @@ import { equiv as _eq } from "@thi.ng/equiv"; /** - * Returns true if the first items of `buf` are the same items as in - * `needle`. + * Returns true if the first items of `buf` are the same items as in `needle`. * * @remarks - * This means `buf` should have at least the same length as `needle` for - * this to be true. + * This means `buf` should have at least the same length as `needle` for this to + * be true. * - * By default, uses {@link @thi.ng/equiv#equiv} for equality checking. + * By default, uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for + * equality checking. * * {@link endsWith} * diff --git a/packages/arrays/src/swap.ts b/packages/arrays/src/swap.ts index 6a355d8f85..ee36942f71 100644 --- a/packages/arrays/src/swap.ts +++ b/packages/arrays/src/swap.ts @@ -14,17 +14,17 @@ export const swap = (arr: AnyArray, x: number, y: number) => { }; /** - * Higher-order version of {@link swap} for swapping elements in - * multiple arrays at once and hence useful for sorting multiple arrays - * based on a single criteria. + * Higher-order version of {@link swap} for swapping elements in multiple arrays + * at once and hence useful for sorting multiple arrays based on a single + * criteria. * * @remarks - * The returned function takes the same args as `swap`, and when called - * swaps 2 elements in the array given to that function AND in the - * arrays given to {@link multiSwap} itself. Provides fast routes for up to 3 - * extra arrays, then falls back to a loop-based approach. + * The returned function takes the same args as `swap`, and when called swaps 2 + * elements in the array given to that function AND in the arrays given to + * {@link multiSwap} itself. Provides fast routes for up to 3 extra arrays, then + * falls back to a loop-based approach. * - * {@link (quickSort:1)} + * {@link quickSort} * * @example * ```ts diff --git a/packages/associative/src/api.ts b/packages/associative/src/api.ts index a082330721..f897a07863 100644 --- a/packages/associative/src/api.ts +++ b/packages/associative/src/api.ts @@ -30,10 +30,11 @@ export interface EquivSetConstructor { export interface EquivSetOpts { /** - * Key equivalence predicate. MUST return truthy result if given - * keys are considered equal. + * Key equivalence predicate. MUST return truthy result if given keys are + * considered equal. * - * @defaultValue {@link @thi.ng/equiv#equiv} + * @defaultValue + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) */ equiv: Predicate2; } @@ -65,7 +66,8 @@ export interface HashMapOpts { /** * Optional key equality predicate. * - * @defaultValue {@link @thi.ng/equiv#equiv} + * @defaultValue + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) */ equiv?: Predicate2; /** @@ -90,8 +92,8 @@ export interface HashMapOpts { */ export interface SortedMapOpts { /** - * Key comparison function. Must follow standard comparator contract - * and return: + * Key comparison function. Must follow standard comparator contract and + * return: * - negative if `a < b` * - positive if `a > b` * - `0` if `a == b` @@ -99,7 +101,8 @@ export interface SortedMapOpts { * Note: The {@link SortedMap} implementation only uses `<` and `==` style * comparisons. * - * @defaultValue {@link @thi.ng/compare#compare} + * @defaultValue + * [`compare()`](https://docs.thi.ng/umbrella/compare/functions/compare.html) */ compare: Comparator; /** diff --git a/packages/associative/src/array-set.ts b/packages/associative/src/array-set.ts index a5e288eb93..f2e865131e 100644 --- a/packages/associative/src/array-set.ts +++ b/packages/associative/src/array-set.ts @@ -19,14 +19,17 @@ const __vals = (inst: ArraySet) => __private.get(inst)!.vals; /** * An alternative set implementation to the native ES6 Set type. Uses - * customizable equality/equivalence predicate and so is more useful - * when dealing with structured data. Implements full API of native Set - * and by the default uses {@link @thi.ng/equiv#equiv} for equivalence - * checking. + * customizable equality/equivalence predicate and so is more useful when + * dealing with structured data. Implements full API of native Set and by the + * default uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for + * equivalence checking. * - * Additionally, the type also implements the {@link @thi.ng/api#ICopy}, - * {@link @thi.ng/api#IEmpty} and {@link @thi.ng/api#IEquiv} interfaces - * itself. + * Additionally, the type also implements the + * [`ICopy`](https://docs.thi.ng/umbrella/api/interfaces/ICopy.html), + * [`IEmpty`](https://docs.thi.ng/umbrella/api/interfaces/IEmpty.html) and + * [`IEquiv`](https://docs.thi.ng/umbrella/api/interfaces/IEquiv.html) + * interfaces itself. */ @__inspectable export class ArraySet extends Set implements IEquivSet { diff --git a/packages/associative/src/difference.ts b/packages/associative/src/difference.ts index 1da1a903f2..9262ea7ed7 100644 --- a/packages/associative/src/difference.ts +++ b/packages/associative/src/difference.ts @@ -25,10 +25,12 @@ export const difference = (a: Set, b: Set, out?: Set): Set => { }; /** - * Reducer version of {@link difference}. If `src` is given returns the - * reduced difference of given inputs, else merely returns a reducer to - * be used with {@link @thi.ng/transducers#(reduce:1)} / - * {@link @thi.ng/transducers#(transduce:1)} functions. + * Reducer version of {@link difference}. If `src` is given returns the reduced + * difference of given inputs, else merely returns a reducer to be used with + * [`reduce()`](https://docs.thi.ng/umbrella/transducers/functions/reduce.html) + * / + * [`transduce()`](https://docs.thi.ng/umbrella/transducers/functions/transduce.html) + * functions. * * @param src - input collections */ diff --git a/packages/associative/src/equiv-map.ts b/packages/associative/src/equiv-map.ts index 16dc4cef6c..de9150fc77 100644 --- a/packages/associative/src/equiv-map.ts +++ b/packages/associative/src/equiv-map.ts @@ -30,9 +30,10 @@ export class EquivMap IEquiv { /** - * Creates a new instance with optional initial key-value pairs and - * provided options. If no `opts` are given, uses `ArraySet` for - * storing canonical keys and {@link @thi.ng/equiv#equiv} for + * Creates a new instance with optional initial key-value pairs and provided + * options. If no `opts` are given, uses `ArraySet` for storing canonical + * keys and + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for * checking key equivalence. * * @param pairs - key-value pairs diff --git a/packages/associative/src/intersection.ts b/packages/associative/src/intersection.ts index 7e43b8f6b3..d199c1a6be 100644 --- a/packages/associative/src/intersection.ts +++ b/packages/associative/src/intersection.ts @@ -31,9 +31,12 @@ export const intersection = (a: Set, b: Set, out?: Set): Set => { /** * Reducer version of {@link intersection}. If `src` is given returns the - * reduced intersection of given inputs, else merely returns a reducer - * to be used with {@link @thi.ng/transducers#(reduce:1)} / - * {@link @thi.ng/transducers#(transduce:1)} functions. + * reduced intersection of given inputs, else merely returns a reducer to be + * used with + * [`reduce()`](https://docs.thi.ng/umbrella/transducers/functions/reduce.html) + * / + * [`transduce()`](https://docs.thi.ng/umbrella/transducers/functions/transduce.html) + * functions. * * @param src - input collections */ diff --git a/packages/associative/src/ll-set.ts b/packages/associative/src/ll-set.ts index 6b121351e0..fd443a4f13 100644 --- a/packages/associative/src/ll-set.ts +++ b/packages/associative/src/ll-set.ts @@ -18,15 +18,19 @@ const __private = new WeakMap, SetProps>(); const __vals = (inst: LLSet) => __private.get(inst)!.vals; /** - * Similar to {@link ArraySet}, this class is an alternative - * implementation of the native ES6 Set API using a - * {@link @thi.ng/dcons#DCons} linked list as backing store and a - * customizable value equality / equivalence predicate. By the default - * uses {@link @thi.ng/equiv#equiv} for equivalence checking. + * Similar to {@link ArraySet}, this class is an alternative implementation of + * the native ES6 Set API using a + * [`DCons`](https://docs.thi.ng/umbrella/dcons/classes/DCons.html) linked list + * as backing store and a customizable value equality / equivalence predicate. + * By the default uses + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for + * equivalence checking. * - * Additionally, the type also implements the {@link @thi.ng/api#ICopy}, - * {@link @thi.ng/api#IEmpty} and {@link @thi.ng/api#IEquiv} interfaces - * itself. + * Additionally, the type also implements the + * [`ICopy`](https://docs.thi.ng/umbrella/api/interfaces/ICopy.html), + * [`IEmpty`](https://docs.thi.ng/umbrella/api/interfaces/IEmpty.html) and + * [`IEquiv`](https://docs.thi.ng/umbrella/api/interfaces/IEquiv.html) + * interfaces itself. */ @__inspectable export class LLSet extends Set implements IEquivSet { diff --git a/packages/associative/src/sorted-set.ts b/packages/associative/src/sorted-set.ts index 1a48d1728e..cc23b1cc23 100644 --- a/packages/associative/src/sorted-set.ts +++ b/packages/associative/src/sorted-set.ts @@ -12,22 +12,24 @@ import { SortedMap } from "./sorted-map.js"; const __private = new WeakMap, SortedMap>(); /** - * Sorted set implementation with standard ES6 Set API, customizable - * value equality and comparison semantics and additional functionality: + * Sorted set implementation with standard ES6 Set API, customizable value + * equality and comparison semantics and additional functionality: * - * - range queries (via {@link SortedSet.entries}, - * {@link SortedSet.keys}, {@link SortedSet.values}) + * - range queries (via {@link SortedSet.entries}, {@link SortedSet.keys}, + * {@link SortedSet.values}) * - multiple value addition/deletion via {@link SortedSet.into} and * {@link SortedSet.disj} * - * Furthermore, this class implements the {@link @thi.ng/api#ICopy}, - * IEmpty`, {@link @thi.ng/api#ICompare} and {@link @thi.ng/api#IEquiv} - * interfaces defined by {@link @thi.ng/api# | @thi.ng/api}. The latter two allow - * instances to be used as keys themselves in other data types defined - * in this (and other) package(s). + * Furthermore, this class implements the + * [`ICopy`](https://docs.thi.ng/umbrella/api/interfaces/ICopy.html), IEmpty`, + * [`ICompare`](https://docs.thi.ng/umbrella/api/interfaces/ICompare.html) and + * [`IEquiv`](https://docs.thi.ng/umbrella/api/interfaces/IEquiv.html) + * interfaces defined by [`thi.ng/api`](https://thi.ng/api). The latter two + * allow instances to be used as keys themselves in other data types defined in + * this (and other) package(s). * - * This set uses a {@link SortedMap} as backing store and therefore has - * the same resizing characteristics. + * This set uses a {@link SortedMap} as backing store and therefore has the same + * resizing characteristics. */ @__inspectable export class SortedSet diff --git a/packages/associative/src/sparse-set.ts b/packages/associative/src/sparse-set.ts index 9bfc9d29e8..eca48408ff 100644 --- a/packages/associative/src/sparse-set.ts +++ b/packages/associative/src/sparse-set.ts @@ -17,12 +17,12 @@ const __private = new WeakMap, SparseSetProps>(); const fail = () => illegalArgs(`dense & sparse arrays must be of same size`); /** - * After "An Efficient Representation for Sparse Sets" - * Preston Briggs and Linda Torczon (1993) + * After "An Efficient Representation for Sparse Sets" Preston Briggs and Linda + * Torczon (1993) * - * - {@link https://research.swtch.com/sparse} - * - {@link https://programmingpraxis.com/2012/03/09/sparse-sets/} - * - {@link https://blog.molecular-matters.com/2013/07/24/adventures-in-data-oriented-design-part-3c-external-references/} + * - https://research.swtch.com/sparse + * - https://programmingpraxis.com/2012/03/09/sparse-sets/ + * - https://blog.molecular-matters.com/2013/07/24/adventures-in-data-oriented-design-part-3c-external-references/ */ @__inspectable export abstract class ASparseSet diff --git a/packages/associative/src/union.ts b/packages/associative/src/union.ts index 005d44d1a8..2feacbf608 100644 --- a/packages/associative/src/union.ts +++ b/packages/associative/src/union.ts @@ -22,10 +22,12 @@ export const union = (a: Set, b: Set, out?: Set): Set => { }; /** - * Reducer version of {@link union}. If `src` is given returns the reduced - * union of given inputs, else merely returns a reducer to be used with - * {@link @thi.ng/transducers#(reduce:1)} / - * {@link @thi.ng/transducers#(transduce:1)} functions. + * Reducer version of {@link union}. If `src` is given returns the reduced union + * of given inputs, else merely returns a reducer to be used with + * [`reduce()`](https://docs.thi.ng/umbrella/transducers/functions/reduce.html) + * / + * [`transduce()`](https://docs.thi.ng/umbrella/transducers/functions/transduce.html) + * functions. * * @param src - input collections */ diff --git a/packages/atom/src/cursor.ts b/packages/atom/src/cursor.ts index 14da1ddd7b..988b58dd8c 100644 --- a/packages/atom/src/cursor.ts +++ b/packages/atom/src/cursor.ts @@ -84,33 +84,33 @@ export function defCursorUnsafe( } /** - * A cursor provides read/write access to a path location within a - * nested (Atom-like) parent state. + * A cursor provides read/write access to a path location within a nested + * (Atom-like) parent state. * * @remarks * Cursors behave like Atoms for all practical purposes, i.e. support - * {@link @thi.ng/api#IDeref.deref}, {@link IReset.reset}, - * {@link ISwap.swap}, {@link @thi.ng/api#IWatch.addWatch} etc. However, - * when updating a cursor's value, the parent state will be updated at - * the cursor's path as well (incl. triggering any watches and/or - * validators) attached to the parent. Likewise, when the parent state - * is modified externally, the cursor's value will automatically update - * as well. The update order of cursor's sharing a common parent is - * undefined, but can be overridden by extending this class with a - * custom {@link @thi.ng/api#IWatch.notifyWatches} implementation. + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref}, + * {@link IReset.reset}, {@link ISwap.swap}, + * [`IWatch`](https://docs.thi.ng/umbrella/api/interfaces/IWatch.html).addWatch} + * etc. However, when updating a cursor's value, the parent state will be + * updated at the cursor's path as well (incl. triggering any watches and/or + * validators) attached to the parent. Likewise, when the parent state is + * modified externally, the cursor's value will automatically update as well. + * The update order of cursor's sharing a common parent is undefined, but can be + * overridden by extending this class with a custom + * [`IWatch`](https://docs.thi.ng/umbrella/api/interfaces/IWatch.html).notifyWatches} + * implementation. * - * If creating multiple cursors w/ a shared parent and each cursor - * configured with a custom ID (provided via config object to ctor), - * it's the user's responsibility to ensure the given IDs are unique. - * Cursors are implemented by attaching a watch to the parent and the ID - * is used to identify each watch. + * If creating multiple cursors w/ a shared parent and each cursor configured + * with a custom ID (provided via config object to ctor), it's the user's + * responsibility to ensure the given IDs are unique. Cursors are implemented by + * attaching a watch to the parent and the ID is used to identify each watch. * - * When using the optional validator predicate (also specified via - * config object to ctor), the cursor's validator MUST NOT conflict with - * the one assigned to the parent or else both will go out-of-sync. - * Therefore, when requiring validation and updating values via cursors - * it's recommended to only specify validators for leaf-level cursors in - * the hierarchy. + * When using the optional validator predicate (also specified via config object + * to ctor), the cursor's validator MUST NOT conflict with the one assigned to + * the parent or else both will go out-of-sync. Therefore, when requiring + * validation and updating values via cursors it's recommended to only specify + * validators for leaf-level cursors in the hierarchy. */ export class Cursor implements IAtom, IID, IRelease { readonly id: string; diff --git a/packages/atom/src/history.ts b/packages/atom/src/history.ts index 77dcd6fdee..f68f49e704 100644 --- a/packages/atom/src/history.ts +++ b/packages/atom/src/history.ts @@ -32,13 +32,14 @@ export const defHistory = ( /** * Undo/redo history stack wrapper for atoms and cursors. Implements - * {@link IAtom} interface and so can be used directly in place and - * delegates to wrapped atom/cursor. + * {@link IAtom} interface and so can be used directly in place and delegates to + * wrapped atom/cursor. * * @remarks - * Value changes are only recorded in history if `changed` predicate - * returns truthy value, or else by calling {@link History.record} - * directly. This class too implements the {@link @thi.ng/api#INotify} + * Value changes are only recorded in history if `changed` predicate returns + * truthy value, or else by calling {@link History.record} directly. This class + * too implements the + * [`INotify`](https://docs.thi.ng/umbrella/api/interfaces/INotify.html) * interface to support event listeners for {@link History.undo}, * {@link History.redo} and {@link History.record}. */ diff --git a/packages/atom/src/view.ts b/packages/atom/src/view.ts index c8cbc2e755..e660100b47 100644 --- a/packages/atom/src/view.ts +++ b/packages/atom/src/view.ts @@ -111,28 +111,31 @@ export function defViewUnsafe( } /** - * This class implements readonly access to a deeply nested value with - * in an Atom/Cursor. An optional transformer function can be supplied - * at creation time to produce a derived/materialized view of the actual - * value held in the atom. + * This class implements readonly access to a deeply nested value with in an + * Atom/Cursor. An optional transformer function can be supplied at creation + * time to produce a derived/materialized view of the actual value held in the + * atom. * * @remarks - * Views can be created directly or via the {@link IViewable.addView} - * method of the parent state. Views can be - * {@link @thi.ng/api#IDeref.deref}'d like atoms and polled for value - * changes using {@link IView.changed}. The transformer is only applied - * once per value change and its result cached until the next change. + * Views can be created directly or via the {@link IViewable.addView} method of + * the parent state. Views can be + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref}'d + * like atoms and polled for value changes using {@link IView.changed}. The + * transformer is only applied once per value change and its result cached until + * the next change. * - * If the optional `lazy` is true (default), the transformer will only - * be executed with the first {@link @thi.ng/api#IDeref.deref} after - * each value change. If `lazy` is false, the transformer function will - * be executed immediately after a value change occurred and so can be - * used like a watch which only triggers if there was an actual value - * change (in contrast to normal watches, which execute with each - * update, regardless of value change). + * If the optional `lazy` is true (default), the transformer will only be + * executed with the first + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref} + * after each value change. If `lazy` is false, the transformer function will be + * executed immediately after a value change occurred and so can be used like a + * watch which only triggers if there was an actual value change (in contrast to + * normal watches, which execute with each update, regardless of value change). * - * Related, the actual value change predicate can be customized. If not - * given, the default {@link @thi.ng/equiv#equiv} will be used. + * Related, the actual value change predicate can be customized. If not given, + * the default + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) will be + * used. * * @example * ```ts @@ -226,23 +229,26 @@ export class View implements IView { /** * Returns true, if the view's value has changed since last - * {@link @thi.ng/api#IDeref.deref}. + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref}. */ changed() { return this.isDirty; } /** - * Like {@link @thi.ng/api#IDeref.deref}, but doesn't update view's - * cached state and dirty flag if value has changed. + * Like + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref}, + * but doesn't update view's cached state and dirty flag if value has + * changed. * * @remarks - * If there's an unprocessed value change, returns result of this - * sub's transformer or else the cached value. + * If there's an unprocessed value change, returns result of this sub's + * transformer or else the cached value. * - * **Important:** Use this function only if the view has none or or - * a stateless transformer. Else might cause undefined/inconsistent - * behavior when calling `view` or {@link @thi.ng/api#IDeref.deref} + * **Important:** Use this function only if the view has none or or a + * stateless transformer. Else might cause undefined/inconsistent behavior + * when calling `view` or + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref} * subsequently. */ view() { diff --git a/packages/binary/src/count.ts b/packages/binary/src/count.ts index 3988fbd83b..c2f934ee91 100644 --- a/packages/binary/src/count.ts +++ b/packages/binary/src/count.ts @@ -34,7 +34,7 @@ export const popCountArray = ( /** * Returns number of bit changes between `x` and `y`. * - * {@link https://en.wikipedia.org/wiki/Hamming_distance} + * https://en.wikipedia.org/wiki/Hamming_distance * * @param x - * @param y - @@ -44,7 +44,7 @@ export const hammingDist: FnN2 = (x, y) => popCount(x ^ y); /** * Math.clz32() polyfill (corrected). * - * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32$revision/1426816} + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32$revision/1426816 * * @param x - */ diff --git a/packages/binary/src/float.ts b/packages/binary/src/float.ts index 511f6919ff..750c64ccee 100644 --- a/packages/binary/src/float.ts +++ b/packages/binary/src/float.ts @@ -61,11 +61,13 @@ export const uintBitsToFloat64: FnN2 = (hi, lo) => { }; /** - * Converts given float (f32) into a sortable integer representation, - * using raw bitwise conversion via {@link floatToIntBits}. + * Converts given float (f32) into a sortable integer representation, using raw + * bitwise conversion via {@link floatToIntBits}. * - * {@link https://github.com/tzaeschke/phtree/blob/develop/PhTreeRevisited.pdf} - * (page 3) + * @remarks + * References: + * - https://github.com/tzaeschke/phtree/blob/develop/PhTreeRevisited.pdf (page + * 3) * * @param x - value to convert */ diff --git a/packages/binary/src/gray.ts b/packages/binary/src/gray.ts index 3183761551..bd99f18aa4 100644 --- a/packages/binary/src/gray.ts +++ b/packages/binary/src/gray.ts @@ -1,11 +1,13 @@ import type { FnN } from "@thi.ng/api"; /** - * Converts 32bit unsigned int to Gray code (reflected binary). Gray - * codes of successive values always have a Hamming distance of 1 (i.e. - * only 1 bit changes at a time). + * Converts 32bit unsigned int to Gray code (reflected binary). Gray codes of + * successive values always have a Hamming distance of 1 (i.e. only 1 bit + * changes at a time). * - * {@link https://en.wikipedia.org/wiki/Gray_code} + * @remarks + * Reference: + * - https://en.wikipedia.org/wiki/Gray_code * * @param x - u32 */ @@ -14,7 +16,9 @@ export const encodeGray32: FnN = (x) => (x ^ (x >>> 1)) >>> 0; /** * Converts 32bit Gray code to binary / unsigned int. * - * {@link https://en.wikipedia.org/wiki/Gray_code} + * @remarks + * Reference: + * - https://en.wikipedia.org/wiki/Gray_code */ export const decodeGray32: FnN = (x) => { x = x ^ (x >>> 16); diff --git a/packages/cellular/src/1d.ts b/packages/cellular/src/1d.ts index 99fbc8c147..97cef45976 100644 --- a/packages/cellular/src/1d.ts +++ b/packages/cellular/src/1d.ts @@ -241,7 +241,9 @@ export class MultiCA1D implements IClear { /** * Sets cells in current generation array to a random state using given - * `probability` and optional PRNG ({@link @thi.ng/random#IRandom} instance). + * `probability` and optional PRNG + * ([`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * instance). * * @param target * @param prob @@ -423,7 +425,9 @@ const __rotate = (buf: TypedArray, dir: number) => { /** * Creates a random rule ID for given `kernelSize` and using optionally provided - * `rnd` {@link @thi.ng/random#IRandom} instance. + * `rnd` + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * instance. * * @param kernelSize * @param rnd diff --git a/packages/cellular/src/api.ts b/packages/cellular/src/api.ts index c6e8ef42ea..765e742c17 100644 --- a/packages/cellular/src/api.ts +++ b/packages/cellular/src/api.ts @@ -110,7 +110,8 @@ export interface UpdateImageOpts1D { probabilistic: boolean; /** * PRNG instance to use for perturbance. Default: - * {@link @thi.ng/random#SYSTEM} aka `Math.random`. + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) aka + * `Math.random`. */ rnd: IRandom; /** diff --git a/packages/color/src/analog.ts b/packages/color/src/analog.ts index debc4916f4..5a75cc735d 100644 --- a/packages/color/src/analog.ts +++ b/packages/color/src/analog.ts @@ -53,7 +53,9 @@ const analogNUU = defAnalog(analogN, analogU, analogU); /** * Returns a random analog color based on given `src` color and variance * `delta`. Each channel will be randomized by +/- `delta`, optionally using - * provided {@link @thi.ng/random#IRandom} PRNG. + * provided + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * PRNG. */ export const analog = defmulti< Color | null, @@ -80,7 +82,9 @@ export const analog = defmulti< /** * Similar to {@link analogRGB}. Returns an analog color based on given HSVA * color, with each channel randomly varied by given channel-specific delta - * amounts (and optionally given {@link @thi.ng/random#IRandom} PRNG). + * amounts (and optionally given + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * PRNG). * * @remarks * This function provides more user control than {@link analog}, but the latter @@ -117,7 +121,9 @@ export const analogHsv = ( /** * Similar to {@link analogHSV}. Returns an analog color based on given RGBA * color, with each channel randomly varied by given delta amounts (and - * optionally given {@link @thi.ng/random#IRandom} PRNG). + * optionally given + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * PRNG). * * @remarks * By default the green and blue channel variance will be the same as `deltaR`. diff --git a/packages/color/src/api/ranges.ts b/packages/color/src/api/ranges.ts index ee5c82716d..64a2ad6c1e 100644 --- a/packages/color/src/api/ranges.ts +++ b/packages/color/src/api/ranges.ts @@ -72,7 +72,8 @@ export interface ColorRangeOpts { /** * PRNG instance to use for randomized values * - * @defaultValue {@link @thi.ng/random#SYSTEM} + * @defaultValue + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) */ rnd: IRandom; } diff --git a/packages/color/src/cosine-gradients.ts b/packages/color/src/cosine-gradients.ts index 86b54d6d15..38664ba7c3 100644 --- a/packages/color/src/cosine-gradients.ts +++ b/packages/color/src/cosine-gradients.ts @@ -262,7 +262,8 @@ export const cosineCoeffs: FnU2 = ( * an array of `n+1` linear RGBA color samples. * * @remarks - * @see {@link @thi.ng/transducers#tween} + * See + * [`tween()`](https://docs.thi.ng/umbrella/transducers/functions/tween.html) * * @example * ```ts diff --git a/packages/color/src/gradients.ts b/packages/color/src/gradients.ts index aa344be866..c62325b79a 100644 --- a/packages/color/src/gradients.ts +++ b/packages/color/src/gradients.ts @@ -15,7 +15,8 @@ import { mix as $mix } from "./mix.js"; * array of numbers will be returned. * * @remarks - * @see {@link @thi.ng/transducers#tween} + * See + * [`tween()`](https://docs.thi.ng/umbrella/transducers/functions/tween.html) * * @example * ```ts diff --git a/packages/color/src/linear.ts b/packages/color/src/linear.ts index 6f27eda94a..ca355f6306 100644 --- a/packages/color/src/linear.ts +++ b/packages/color/src/linear.ts @@ -1,7 +1,7 @@ /** * Maps a single linear RGB channel value to sRGB. * - * {@link https://en.wikipedia.org/wiki/SRGB} + * https://en.wikipedia.org/wiki/SRGB * * @param x - channel value */ @@ -11,7 +11,7 @@ export const linearSrgb = (x: number) => /** * Maps a single linear sRGB channel value to linear RGB. * - * {@link https://en.wikipedia.org/wiki/SRGB} + * https://en.wikipedia.org/wiki/SRGB * * @param x - channel value */ diff --git a/packages/color/src/mix.ts b/packages/color/src/mix.ts index 81554e199a..63bdc5f930 100644 --- a/packages/color/src/mix.ts +++ b/packages/color/src/mix.ts @@ -82,8 +82,8 @@ export const mixNNNN: ColorMixFn = mixN4; * Any hue channel will always be interpolated using the smallest angle * difference (using {@link mixH}). * - * The {@link @thi.ng/math#} package provides various easing functions to create - * non-linear interpolations. For example: + * The [thi.ng/math](https://thi.ng/thi.ng/math) package provides various easing + * functions to create non-linear interpolations. For example: * * @example * ```ts diff --git a/packages/color/src/rgb/kelvin-rgba.ts b/packages/color/src/rgb/kelvin-rgba.ts index 118f7388a5..ec3b6bd6b6 100644 --- a/packages/color/src/rgb/kelvin-rgba.ts +++ b/packages/color/src/rgb/kelvin-rgba.ts @@ -16,9 +16,10 @@ const B2 = 0.0032447435545127036; const B3 = 0.453646839257496; /** + * @remarks * Based on: - * - {@link https://github.com/neilbartlett/color-temperature/blob/develop/index.js} - * - {@link http://www.zombieprototypes.com/?p=210} + * - https://github.com/neilbartlett/color-temperature/blob/develop/index.js + * - http://www.zombieprototypes.com/?p=210 * * Uses adjusted coefficients to produce normalized sRGB values. * diff --git a/packages/color/src/rgb/rgb-hcv.ts b/packages/color/src/rgb/rgb-hcv.ts index 41b4d80fac..39272b1e88 100644 --- a/packages/color/src/rgb/rgb-hcv.ts +++ b/packages/color/src/rgb/rgb-hcv.ts @@ -6,7 +6,7 @@ import { clamp } from "../clamp.js"; /** * Based on: - * {@link https://github.com/tobspr/GLSL-Color-Spaces/blob/develop/ColorSpaces.inc.glsl#L159} + * https://github.com/tobspr/GLSL-Color-Spaces/blob/develop/ColorSpaces.inc.glsl#L159 * * @param out - result * @param src - source color diff --git a/packages/color/src/rgb/rgb-hcy.ts b/packages/color/src/rgb/rgb-hcy.ts index 8247603568..053929eebe 100644 --- a/packages/color/src/rgb/rgb-hcy.ts +++ b/packages/color/src/rgb/rgb-hcy.ts @@ -6,7 +6,7 @@ import { rgbHcv } from "./rgb-hcv.js"; /** * Ported from: - * {@link https://github.com/tobspr/GLSL-Color-Spaces/blob/develop/ColorSpaces.inc.glsl#L226} + * https://github.com/tobspr/GLSL-Color-Spaces/blob/develop/ColorSpaces.inc.glsl#L226 * * @param out - result * @param src - source color diff --git a/packages/color/src/rgb/rgb-xyz.ts b/packages/color/src/rgb/rgb-xyz.ts index 7515961f58..a9ffd8f991 100644 --- a/packages/color/src/rgb/rgb-xyz.ts +++ b/packages/color/src/rgb/rgb-xyz.ts @@ -7,7 +7,7 @@ import { __mulV33 } from "../internal/matrix-ops.js"; * Converts RGB to XYZ using provided transformation matrix (default: * {@link RGB_XYZ_D50}). * - * {@link https://en.wikipedia.org/wiki/CIE_1931_color_space} + * https://en.wikipedia.org/wiki/CIE_1931_color_space * * @param out - result * @param src - source color diff --git a/packages/color/src/xyz/xyz-rgb.ts b/packages/color/src/xyz/xyz-rgb.ts index 2b03d4b1e6..7490b03bd6 100644 --- a/packages/color/src/xyz/xyz-rgb.ts +++ b/packages/color/src/xyz/xyz-rgb.ts @@ -6,7 +6,7 @@ import { __mulV33 } from "../internal/matrix-ops.js"; * Converts CIE XYZ to RGB using provided transformation/whitepoint matrix * (default: {@link XYZ_RGB_D50}). * - * {@link https://en.wikipedia.org/wiki/CIE_1931_color_space} + * https://en.wikipedia.org/wiki/CIE_1931_color_space * * @param out - result * @param src - source color diff --git a/packages/compose/src/comp.ts b/packages/compose/src/comp.ts index 015eaf1e9d..c7484e921c 100644 --- a/packages/compose/src/comp.ts +++ b/packages/compose/src/comp.ts @@ -118,7 +118,7 @@ export function comp(...fns: any[]): any { } /** - * Similar to {@link (comp:1)}, but composes given functions in left-to-right order. + * Similar to {@link comp}, but composes given functions in left-to-right order. */ export function compL(a: FnAny): FnAny; export function compL(a: FnAny, b: Fn): FnAny; @@ -204,6 +204,6 @@ export function compL(...fns: any[]): any { } /** - * @deprecated renamed to {@link (compL:1)} + * @deprecated renamed to {@link compL} */ export const compI = compL; diff --git a/packages/csv/src/parse.ts b/packages/csv/src/parse.ts index 8cd4492fe6..b66e84921f 100644 --- a/packages/csv/src/parse.ts +++ b/packages/csv/src/parse.ts @@ -266,7 +266,7 @@ export function parseCSVSimple( /** * Syntax sugar for iterator version of {@link parseCSV}, efficiently splitting * given source string into a line based input using - * {@link @thi.ng/strings#split}. + * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html). * * @param opts - * @param src - @@ -277,7 +277,7 @@ export const parseCSVFromString = (opts: Partial, src: string) => /** * Syntax sugar for iterator version of {@link parseCSVSimple}, efficiently * splitting given source string into a line based input using - * {@link @thi.ng/strings#split}. + * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html). * * @param opts - * @param src - diff --git a/packages/date/src/relative.ts b/packages/date/src/relative.ts index fba5cea908..6a3bbee056 100644 --- a/packages/date/src/relative.ts +++ b/packages/date/src/relative.ts @@ -149,7 +149,7 @@ export const difference = (a: MaybeDate, b: MaybeDate) => * Computes and decomposes difference between given dates. Returns tuple of: * `[sign, years, months, days, hours, mins, secs, millis]`. The `sign` is used * to indicate the relative order of `a` compared to `b`, i.e. same contract as - * {@link @thi.ng/api#ICompare}. + * [`ICompare`](https://docs.thi.ng/umbrella/api/interfaces/ICompare.html). * * @param a - * @param b - diff --git a/packages/dcons/src/dcons.ts b/packages/dcons/src/dcons.ts index 64172e538c..a055b8586f 100644 --- a/packages/dcons/src/dcons.ts +++ b/packages/dcons/src/dcons.ts @@ -269,8 +269,9 @@ export class DCons * * @remarks * Supports configurable iterations and custom PRNG via - * {@link @thi.ng/random#IRandom} (default: - * {@link @thi.ng/random#SYSTEM}). + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * (default: + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html)). * * Default iterations: `ceil(3/2 * log2(n))` * @@ -317,7 +318,7 @@ export class DCons * https://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html * * @remarks - * Uses {@link @thi.ng/compare#compare} as default comparator. + * Uses [`compare()`](https://docs.thi.ng/umbrella/compare/functions/compare.html) as default comparator. * * @param cmp - */ diff --git a/packages/defmulti/src/defmulti-n.ts b/packages/defmulti/src/defmulti-n.ts index 7c6a20bee0..d21e7bb1bf 100644 --- a/packages/defmulti/src/defmulti-n.ts +++ b/packages/defmulti/src/defmulti-n.ts @@ -3,20 +3,19 @@ import type { Implementation } from "./api.js"; import { DEFAULT, defmulti } from "./defmulti.js"; /** - * Returns a multi-dispatch function which delegates to one of the - * provided implementations, based on the arity (number of args) when - * the function is called. + * Returns a multi-dispatch function which delegates to one of the provided + * implementations, based on the arity (number of args) when the function is + * called. * * @remarks - * Internally uses {@link (defmulti:1)}, so new arities can be dynamically - * added (or removed) at a later time. If no `fallback` is provided, - * `defmultiN` also registers a {@link DEFAULT} implementation which - * simply throws an {@link @thi.ng/errors#IllegalArityError} when - * invoked. + * Internally uses {@link defmulti}, so new arities can be dynamically added (or + * removed) at a later time. If no `fallback` is provided, `defmultiN` also + * registers a {@link DEFAULT} implementation which simply throws an + * [`IllegalArityError`](https://docs.thi.ng/umbrella/errors/variables/IllegalArityError.html) + * when invoked. * - * **Note:** Unlike {@link (defmulti:1)} no argument type checking is - * supported, however you can specify the return type for the generated - * function. + * **Note:** Unlike {@link defmulti} no argument type checking is supported, + * however you can specify the return type for the generated function. * * @example * ```ts diff --git a/packages/dgraph-dot/src/index.ts b/packages/dgraph-dot/src/index.ts index dad48b648d..a9f93d5242 100644 --- a/packages/dgraph-dot/src/index.ts +++ b/packages/dgraph-dot/src/index.ts @@ -5,7 +5,8 @@ import { Edge, Graph, GraphAttribs, Node, serializeGraph } from "@thi.ng/dot"; export interface DGraphDotOpts { /** * Graph visualization attributes. See - * {@link @thi.ng/dot#GraphAttribs} for details. + * [`GraphAttribs`](https://docs.thi.ng/umbrella/dot/interfaces/GraphAttribs.html) + * for details. */ attribs?: Partial; /** @@ -21,15 +22,17 @@ export interface DGraphDotOpts { label?: Fn; /** * Optional function applied to each node to provide an object of - * visualization options. See {@link @thi.ng/dot#Node} for details. + * visualization options. See + * [`Node`](https://docs.thi.ng/umbrella/dot/interfaces/Node.html) for + * details. */ spec?: Fn>; } /** - * Takes a {@link @thi.ng/dgraph#DGraph} and object of visualization & - * serialization options. Returns Graphviz DOT format serialization of - * given graph. + * Takes a [`DGraph`](https://docs.thi.ng/umbrella/dgraph/classes/DGraph.html) + * and object of visualization & serialization options. Returns Graphviz DOT + * format serialization of given graph. * * @param src - * @param opts - diff --git a/packages/diff/src/array.ts b/packages/diff/src/array.ts index d0c9ebca57..c5af3d374b 100644 --- a/packages/diff/src/array.ts +++ b/packages/diff/src/array.ts @@ -50,16 +50,17 @@ const simpleDiff = ( }; /** - * Based on "An O(NP) Sequence Comparison Algorithm"" by Wu, Manber, - * Myers and Miller. + * Based on "An O(NP) Sequence Comparison Algorithm"" by Wu, Manber, Myers and + * Miller. * * @remarks * Various optimizations, fixes & refactorings. By default uses - * {@link @thi.ng/equiv#equiv} for equality checks. + * [`equiv()`](https://docs.thi.ng/umbrella/equiv/functions/equiv.html) for + * equality checks. * - * - {@link https://publications.mpi-cbg.de/Wu_1990_6334.pdf} - * - {@link http://www.itu.dk/stud/speciale/bepjea/xwebtex/litt/an-onp-sequence-comparison-algorithm.pdf} - * - {@link https://github.com/cubicdaiya/onp} + * - https://publications.mpi-cbg.de/Wu_1990_6334.pdf + * - http://www.itu.dk/stud/speciale/bepjea/xwebtex/litt/an-onp-sequence-comparison-algorithm.pdf + * - https://github.com/cubicdaiya/onp * * @param a - "old" array * @param b - "new" array diff --git a/packages/distance/src/knearest.ts b/packages/distance/src/knearest.ts index 5fd8aae604..786efb9458 100644 --- a/packages/distance/src/knearest.ts +++ b/packages/distance/src/knearest.ts @@ -13,10 +13,10 @@ import { DIST_SQ, DIST_SQ1, DIST_SQ2, DIST_SQ3 } from "./squared.js"; * * @remarks * The K-nearest neighbors will be accumulated via an internal - * {@link @thi.ng/heaps#Heap} and results can be optionally returned in order of - * proximity (via {@link KNearest.deref} or {@link KNearest.values}). For K=1 it - * will be more efficient to use {@link Nearest} to avoid the additional - * overhead. + * [`Heap`](https://docs.thi.ng/umbrella/heaps/classes/Heap.html) and results + * can be optionally returned in order of proximity (via {@link KNearest.deref} + * or {@link KNearest.values}). For K=1 it will be more efficient to use + * {@link Nearest} to avoid the additional overhead. * * @typeParam D - spatial position for distance metric * @typeParam T - indexed value diff --git a/packages/dlogic/src/index.ts b/packages/dlogic/src/index.ts index 0b38f5c989..655a9cf33e 100644 --- a/packages/dlogic/src/index.ts +++ b/packages/dlogic/src/index.ts @@ -10,7 +10,7 @@ export interface Sum { } /** - * {@link https://en.wikipedia.org/wiki/Inverter_(logic_gate)} + * https://en.wikipedia.org/wiki/Inverter_(logic_gate) * * | X | Q | * |---|---| @@ -22,7 +22,7 @@ export interface Sum { export const not = (x: boolean) => !x; /** - * {@link https://en.wikipedia.org/wiki/NAND_gate} + * https://en.wikipedia.org/wiki/NAND_gate * * | A | B | Q | * |---|---|---| @@ -37,7 +37,7 @@ export const not = (x: boolean) => !x; export const nand: Op2 = (a, b) => !(a && b); /** - * {@link https://en.wikipedia.org/wiki/AND_gate} + * https://en.wikipedia.org/wiki/AND_gate * * | A | B | Q | * |---|---|---| @@ -52,7 +52,7 @@ export const nand: Op2 = (a, b) => !(a && b); export const and: Op2 = (a, b) => a && b; /** - * {@link https://en.wikipedia.org/wiki/OR_gate} + * https://en.wikipedia.org/wiki/OR_gate * * | A | B | Q | * |---|---|---| @@ -67,7 +67,7 @@ export const and: Op2 = (a, b) => a && b; export const or: Op2 = (a, b) => a || b; /** - * {@link https://en.wikipedia.org/wiki/NOR_gate} + * https://en.wikipedia.org/wiki/NOR_gate * * | A | B | Q | * |---|---|---| @@ -82,7 +82,7 @@ export const or: Op2 = (a, b) => a || b; export const nor: Op2 = (a, b) => !(a || b); /** - * {@link https://en.wikipedia.org/wiki/XOR_gate} + * https://en.wikipedia.org/wiki/XOR_gate * * | A | B | Q | * |---|---|---| @@ -97,7 +97,7 @@ export const nor: Op2 = (a, b) => !(a || b); export const xor: Op2 = (a, b) => a !== b; /** - * {@link https://en.wikipedia.org/wiki/XNOR_gate} + * https://en.wikipedia.org/wiki/XNOR_gate * * | A | B | Q | * |---|---|---| @@ -112,7 +112,7 @@ export const xor: Op2 = (a, b) => a !== b; export const xnor: Op2 = (a, b) => a === b; /** - * {@link https://web.archive.org/web/20160304050642/http://www.zigwap.com/digital/gates/imply_gate} + * https://web.archive.org/web/20160304050642/http://www.zigwap.com/digital/gates/imply_gate * * | A | B | Q | * |---|---|---| @@ -126,7 +126,7 @@ export const xnor: Op2 = (a, b) => a === b; export const imply: Op2 = (a, b) => !a || b; /** - * {@link https://en.wikipedia.org/wiki/AND-OR-Invert} + * https://en.wikipedia.org/wiki/AND-OR-Invert * * `q = nor(a, and(b, c))` * @@ -148,7 +148,7 @@ export const imply: Op2 = (a, b) => !a || b; export const aoi21: Op3 = (a, b, c) => !(a || (b && c)); /** - * {@link https://en.wikipedia.org/wiki/AND-OR-Invert} + * https://en.wikipedia.org/wiki/AND-OR-Invert * * `q = nor(and(a, b), and(c, d))` * @@ -191,7 +191,7 @@ export const oai21: Op3 = (a, b, c) => !(a && (b || c)); export const oai22: Op4 = (a, b, c, d) => !((a || b) && (c || d)); /** - * {@link https://en.wikipedia.org/wiki/NAND_logic#MUX} + * https://en.wikipedia.org/wiki/NAND_logic#MUX * * | A | B | S | Q | * |---|---|---|---| @@ -212,7 +212,7 @@ export const mux: Op3 = (a: boolean, b: boolean, s: boolean) => (a && !s) || (b && s); /** - * {@link https://en.wikipedia.org/wiki/NAND_logic#DEMUX} + * https://en.wikipedia.org/wiki/NAND_logic#DEMUX * * | I | S | A | B | * |---|---|---|---| @@ -230,7 +230,7 @@ export const demux: FnU2 = (i, s) => [ ]; /** - * {@link https://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder} + * https://en.wikipedia.org/wiki/Adder_(electronics)#Half_adder * * @param a - * @param b - @@ -241,7 +241,7 @@ export const hadd1: FnU2> = (a, b) => ({ }); /** - * {@link https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder} + * https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder * * @param a - * @param b - @@ -253,7 +253,7 @@ export const fadd1: FnU3> = (a, b, c) => ({ }); /** - * {@link https://en.wikipedia.org/wiki/Adder_(electronics)#Ripple-carry_adder} + * https://en.wikipedia.org/wiki/Adder_(electronics)#Ripple-carry_adder * * @param a - * @param b - diff --git a/packages/dsp/src/agen.ts b/packages/dsp/src/agen.ts index 1d544fbc53..54f4fa3e1d 100644 --- a/packages/dsp/src/agen.ts +++ b/packages/dsp/src/agen.ts @@ -3,8 +3,9 @@ import { __take } from "./internal/take.js"; /** * Abstract base class for unit gens in this package. Provides - * {@link @thi.ng/api#IDeref} to obtain the gen's current value and - * `Iterable` implementations to use gens as ES6 iterables. + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) to obtain + * the gen's current value and `Iterable` implementations to use gens as ES6 + * iterables. */ export abstract class AGen implements IGen { constructor(protected _val: T) {} diff --git a/packages/dsp/src/anti-alias.ts b/packages/dsp/src/anti-alias.ts index a50458c8ac..1595785918 100644 --- a/packages/dsp/src/anti-alias.ts +++ b/packages/dsp/src/anti-alias.ts @@ -3,11 +3,10 @@ import { HALF_PI } from "@thi.ng/math/api"; /** * Reference: - * - {@link https://en.wikipedia.org/wiki/Gibbs_phenomenon} - * - {@link http://www.musicdsp.org/files/bandlimited.pdf} + * - https://en.wikipedia.org/wiki/Gibbs_phenomenon + * - http://www.musicdsp.org/files/bandlimited.pdf * - * Interactive graph: - * {@link https://www.desmos.com/calculator/irugw6gnhy} + * [Interactive graph](https://www.desmos.com/calculator/irugw6gnhy) * * @param n - number of octaves * @param i - curr octave [1..n] @@ -18,9 +17,9 @@ export const gibbs: FnN2 = (n, i) => Math.cos(((i - 1) * HALF_PI) / n) ** 2; * Fejér weight for `k`-th harmonic in a Fourier series of length `n`. * * @remarks - * Used for attenuating the {@link gibbs} factor when summing a Fourier - * series. Linearly attentuates higher harmonics, with the first bin - * receiving a weight on 1 and the last bin `1/n`. + * Used for attenuating the {@link gibbs} factor when summing a Fourier series. + * Linearly attentuates higher harmonics, with the first bin receiving a weight + * on 1 and the last bin `1/n`. * * @param k - * @param n - @@ -30,8 +29,8 @@ export const fejer: FnN2 = (k, n) => (n - k) / n; /** * Polynomial attenuation to create bandlimited version of a signal. * - * - {@link http://research.spa.aalto.fi/publications/papers/smc2010-phaseshaping/} - * - {@link http://www.kvraudio.com/forum/viewtopic.php?t=375517} + * - http://research.spa.aalto.fi/publications/papers/smc2010-phaseshaping/ + * - http://www.kvraudio.com/forum/viewtopic.php?t=375517 * * @param dt - time step * @param t - normalized phase diff --git a/packages/dsp/src/aproc.ts b/packages/dsp/src/aproc.ts index 5a09f656f3..ac9754157a 100644 --- a/packages/dsp/src/aproc.ts +++ b/packages/dsp/src/aproc.ts @@ -4,7 +4,8 @@ import type { IProc, IProc2 } from "./api.js"; /** * Abstract base class for processors in this package. Provides - * {@link @thi.ng/api#IDeref} to obtain the processor's current value. + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) to obtain + * the processor's current value. */ export abstract class AProc implements IProc, IXform { constructor(protected _val: B) {} diff --git a/packages/dsp/src/fft.ts b/packages/dsp/src/fft.ts index 4e28451915..ff7214be53 100644 --- a/packages/dsp/src/fft.ts +++ b/packages/dsp/src/fft.ts @@ -26,17 +26,18 @@ export const copyComplex = (complex: ComplexArray): ComplexArray => [ ]; /** - * If given a {@link ComplexArray}, computes the complex conjugate, - * concatenates it in mirrored order to input (excluding bin 0) and - * returns it as new (complex) array. + * If given a {@link ComplexArray}, computes the complex conjugate, concatenates + * it in mirrored order to input (excluding bin 0) and returns it as new + * (complex) array. * * @remarks * The length of the input buffer(s) is assumed to be a power of 2. * - * If given a {@link @thi.ng/api#NumericArray}, the `isImg` arg chooses - * from one of the following operations: If `true` (default), returns - * new array with *negated* values concatenated in reverse order. If - * `false`, returns new array with *original* values concatenated in + * If given a + * [`NumericArray`](https://docs.thi.ng/umbrella/api/types/NumericArray.html), + * the `isImg` arg chooses from one of the following operations: If `true` + * (default), returns new array with *negated* values concatenated in reverse + * order. If `false`, returns new array with *original* values concatenated in * reverse order. * * @example diff --git a/packages/dsp/src/osc-additive.ts b/packages/dsp/src/osc-additive.ts index 97fb92d26d..18358ae30f 100644 --- a/packages/dsp/src/osc-additive.ts +++ b/packages/dsp/src/osc-additive.ts @@ -40,7 +40,7 @@ export const additive = ( /** * Interactive graph of this oscillator: - * {@link https://www.desmos.com/calculator/irugw6gnhy} + * https://www.desmos.com/calculator/irugw6gnhy * * @param n - number of octaves */ @@ -54,7 +54,7 @@ export const squareAdditive = (n = 8) => /** * Interactive graph of this oscillator: - * {@link https://www.desmos.com/calculator/irugw6gnhy} + * https://www.desmos.com/calculator/irugw6gnhy * * @param n - number of octaves */ diff --git a/packages/dsp/src/osc.ts b/packages/dsp/src/osc.ts index 90e38a6fea..92d2c8bc36 100644 --- a/packages/dsp/src/osc.ts +++ b/packages/dsp/src/osc.ts @@ -18,7 +18,8 @@ import { sum } from "./sum.js"; * freq and its `dc` offset to `baseFreq * TAU`). Also see {@link fmodOsc} for * syntax sugar. The `phase` arg is only used if `freq` is NOT an `IGen`. * - * The oscillator initializes to zero and its {@link @thi.ng/api#IDeref.deref} + * The oscillator initializes to zero and its + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html).deref} * value is only available / valid after the first invocation of * {@link IGen.next}. * diff --git a/packages/dsp/src/white-noise.ts b/packages/dsp/src/white-noise.ts index 323c50bb93..202e3d167e 100644 --- a/packages/dsp/src/white-noise.ts +++ b/packages/dsp/src/white-noise.ts @@ -5,7 +5,8 @@ import { AGen } from "./agen.js"; /** * White noise gen with customizable gain and - * {@link @thi.ng/random#IRandom} source. + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * source. * * @param gain - * @param rnd - diff --git a/packages/ecs/src/api.ts b/packages/ecs/src/api.ts index 737c958640..305b8ce7fc 100644 --- a/packages/ecs/src/api.ts +++ b/packages/ecs/src/api.ts @@ -101,9 +101,12 @@ export interface ECSOpts { */ capacity: number; /** - * Optional {@link @thi.ng/malloc#IMemPoolArray} implementation + * Optional + * [`IMemPoolArray`](https://docs.thi.ng/umbrella/malloc/interfaces/IMemPoolArray.html) + * implementation * - * @defaultValue {@link @thi.ng/malloc#NativePool} + * @defaultValue + * [`NativePool`](https://docs.thi.ng/umbrella/malloc/classes/NativePool.html) */ pool: IMemPoolArray; } diff --git a/packages/fsm/src/fsm.ts b/packages/fsm/src/fsm.ts index 38a0f32fcd..bc88d9bd9e 100644 --- a/packages/fsm/src/fsm.ts +++ b/packages/fsm/src/fsm.ts @@ -11,31 +11,33 @@ import { import { Match, Matcher } from "./api.js"; /** - * Finite-state machine transducer / iterator with support for single - * lookahead value. + * Finite-state machine transducer / iterator with support for single lookahead + * value. * * @remarks - * Takes an object of `states` and their matchers, an arbitrary context - * object and an `initial` state ID (default: "start"). + * Takes an object of `states` and their matchers, an arbitrary context object + * and an `initial` state ID (default: "start"). * - * The returned transducer consumes inputs of type `T` and produces - * results of type `R`. The results are produced by callbacks of the - * given state matchers. Each can produce any number of values. If a - * callback returns a result wrapped w/ - * {@link @thi.ng/transducers#(reduce:1)d}, the FSM causes early termination - * of the overall transducer pipeline. Failed state callbacks too can - * produce outputs, but will afterwards terminate the FSM. + * The returned transducer consumes inputs of type `T` and produces results of + * type `R`. The results are produced by callbacks of the given state matchers. + * Each can produce any number of values. If a callback returns a result wrapped + * w/ + * [`reduced()`](https://docs.thi.ng/umbrella/transducers/functions/reduced.html), + * the FSM causes early termination of the overall transducer pipeline. Failed + * state callbacks too can produce outputs, but will afterwards terminate the + * FSM. * - * An {@link @thi.ng/errors#IllegalStateError} will be thrown if a - * transition to an undefined state ID occurs. + * An + * [`IllegalStateError`](https://docs.thi.ng/umbrella/errors/variables/IllegalStateError.html) + * will be thrown if a transition to an undefined state ID occurs. * - * The optional `update` function will be invoked for each input prior - * to executing the currently active state matcher. It is intended to - * update the context object (e.g. to update input location info for - * generating error messages). + * The optional `update` function will be invoked for each input prior to + * executing the currently active state matcher. It is intended to update the + * context object (e.g. to update input location info for generating error + * messages). * - * If the optional `src` iterable is given, the function returns a - * transforming iterator of the FSM results. + * If the optional `src` iterable is given, the function returns a transforming + * iterator of the FSM results. * * @param states - FSM state matchers * @param ctx - FSM context object diff --git a/packages/fuzzy-viz/src/strategy.ts b/packages/fuzzy-viz/src/strategy.ts index 5d99966296..7559673907 100644 --- a/packages/fuzzy-viz/src/strategy.ts +++ b/packages/fuzzy-viz/src/strategy.ts @@ -10,7 +10,8 @@ import type { AsciiVizOpts, InstrumentFn, VizualizeVarOpts } from "./api.js"; import { varToHiccup } from "./var.js"; /** - * Higher order function. Takes an existing {@link @thi.ng/fuzzy#DefuzzStrategy} + * Higher order function. Takes an existing + * [`DefuzzStrategy`](https://docs.thi.ng/umbrella/fuzzy/types/DefuzzStrategy.html) * and an instrumentation function. Returns new `DefuzzStrategy` which first * executes original `strategy`, then calls `instrument` with the same args AND * the computed result obtained from `strategy`. Returns result of original @@ -19,10 +20,11 @@ import { varToHiccup } from "./var.js"; * @remarks * The instrumentation function is intended to perform side effects (e.g. debug * outputs) and/or produce secondary results (e.g. visualizations). The latter - * can be obtained through the {@link @thi.ng/api#IDeref} mechanism implemented - * by the returned function. Since {@link defuzz} might call the strategy - * multiple times (i.e. if there are multiple output vars used), `.deref()` will - * always return an array of secondary results. + * can be obtained through the + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) mechanism + * implemented by the returned function. Since {@link defuzz} might call the + * strategy multiple times (i.e. if there are multiple output vars used), + * `.deref()` will always return an array of secondary results. * * Note: The secondary results from the instrumentation function will persist & * accumulate. If re-using the instrumented strategy for multiple `defuzz()` diff --git a/packages/fuzzy-viz/src/var.ts b/packages/fuzzy-viz/src/var.ts index 4c04e44801..d5b0acd962 100644 --- a/packages/fuzzy-viz/src/var.ts +++ b/packages/fuzzy-viz/src/var.ts @@ -7,10 +7,11 @@ import { inRange } from "@thi.ng/math/interval"; import type { VizualizeVarOpts } from "./api.js"; /** - * Takes an {@link @thi.ng/fuzzy#LVar} and visualization options. Evaluates all - * of the var's fuzzy sets in the var's value domain and visualizes them as - * polygons. Returns a {@link @thi.ng/hiccup-canvas#} compatible shape component - * tree. + * Takes an [`LVar`](https://docs.thi.ng/umbrella/fuzzy/interfaces/LVar.html) + * and visualization options. Evaluates all of the var's fuzzy sets in the var's + * value domain and visualizes them as polygons. Returns a + * [thi.ng/hiccup-canvas](https://thi.ng/thi.ng/hiccup-canvas) compatible shape + * component tree. * * @param var - * @param opts - diff --git a/packages/geom-accel/src/kd-tree-map.ts b/packages/geom-accel/src/kd-tree-map.ts index 96fc2f5eeb..9a589ee2fc 100644 --- a/packages/geom-accel/src/kd-tree-map.ts +++ b/packages/geom-accel/src/kd-tree-map.ts @@ -33,10 +33,10 @@ export class KdNode { } /** - * {@link https://en.wikipedia.org/wiki/K-d_tree} + * https://en.wikipedia.org/wiki/K-d_tree * * Partially based on: - * {@link https://github.com/ubilabs/kd-tree-javascript} + * https://github.com/ubilabs/kd-tree-javascript * */ export class KdTreeMap diff --git a/packages/geom-accel/src/nd-quadtree-map.ts b/packages/geom-accel/src/nd-quadtree-map.ts index 5505b38780..e0dbca434a 100644 --- a/packages/geom-accel/src/nd-quadtree-map.ts +++ b/packages/geom-accel/src/nd-quadtree-map.ts @@ -176,12 +176,12 @@ export class NdQtNode { } /** - * Point-based quadtree for nD keys and optional value association. - * Supports radial range queries and key removal with tree pruning. See + * Point-based quadtree for nD keys and optional value association. Supports + * radial range queries and key removal with tree pruning. See * {@link ndQuadtreeFromMinMax}. * * @remarks - * Partially ported from Clojure version of {@link http://thi.ng/geom}. + * Partially ported from Clojure version of thi.ng/geom. */ export class NdQuadtreeMap implements @@ -193,14 +193,14 @@ export class NdQuadtreeMap static readonly MAX_DIM = 16; /** - * Returns a new point-based `NdQuadtreeMap` for nD keys in given - * region defined by `min` / `max` coordinates. The dimensionality - * of the tree is implicitly defined by the provided coordinates. - * Only points within that region can be indexed. + * Returns a new point-based `NdQuadtreeMap` for nD keys in given region + * defined by `min` / `max` coordinates. The dimensionality of the tree is + * implicitly defined by the provided coordinates. Only points within that + * region can be indexed. * * @remarks - * Due to exponentially growing lookup tables, currently only - * supports up to 16 dimensions. + * Due to exponentially growing lookup tables, currently only supports up to + * 16 dimensions. */ static fromMinMax( min: ReadonlyVec, diff --git a/packages/geom-arc/src/from-endpoints.ts b/packages/geom-arc/src/from-endpoints.ts index 07c9940bdc..20601402c4 100644 --- a/packages/geom-arc/src/from-endpoints.ts +++ b/packages/geom-arc/src/from-endpoints.ts @@ -13,10 +13,9 @@ import { submN2 } from "@thi.ng/vectors/submn"; /** * Conversion from endpoint to center parameterization. * - * {@link https://svgwg.org/svg2-draft/implnote.html#ArcConversionEndpointToCenter} + * https://svgwg.org/svg2-draft/implnote.html#ArcConversionEndpointToCenter * - * Returns undefined if `a` & `b` are equal or any `radii` component is - * zero. + * Returns undefined if `a` & `b` are equal or any `radii` component is zero. * * @param a - start point * @param b - end point diff --git a/packages/geom-clip-line/src/liang-barsky.ts b/packages/geom-clip-line/src/liang-barsky.ts index 75fbbe9135..5181d3032e 100644 --- a/packages/geom-clip-line/src/liang-barsky.ts +++ b/packages/geom-clip-line/src/liang-barsky.ts @@ -2,17 +2,16 @@ import type { FnU2, FnU8, Tuple } from "@thi.ng/api"; import type { ReadonlyVec, Vec } from "@thi.ng/vectors"; /** - * Performs Liang-Barsky clipping of the line segment with endpoints - * `a`, `b` against the clipping rect defined by `min` and `max`. The - * optional `ca` and `cb` vectors can be given to store the result - * (clipped points). If omitted creates new vectors. Returns a tuple of - * `[ca, cb, a, b]`, where the latter two values represent the - * normalized distances of the clipped points relative to original given - * line segment. Returns `undefined` iff the line lies completely - * outside the rect. + * Performs Liang-Barsky clipping of the line segment with endpoints `a`, `b` + * against the clipping rect defined by `min` and `max`. The optional `ca` and + * `cb` vectors can be given to store the result (clipped points). If omitted + * creates new vectors. Returns a tuple of `[ca, cb, a, b]`, where the latter + * two values represent the normalized distances of the clipped points relative + * to original given line segment. Returns `undefined` iff the line lies + * completely outside the rect. * - * - {@link https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm} - * - {@link https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c} + * - https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm + * - https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c * * @param a - line endpoint * @param b - line endpoint diff --git a/packages/geom-clip-poly/src/index.ts b/packages/geom-clip-poly/src/index.ts index 90c5eece4b..6dca10b79a 100644 --- a/packages/geom-clip-poly/src/index.ts +++ b/packages/geom-clip-poly/src/index.ts @@ -5,11 +5,11 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors"; import { corner2 } from "@thi.ng/vectors/clockwise"; /** - * Extended version of Sutherland-Hodgeman convex polygon clipping - * supporting any convex boundary polygon (not only rects). Returns new - * array of clipped vertices. + * Extended version of Sutherland-Hodgeman convex polygon clipping supporting + * any convex boundary polygon (not only rects). Returns new array of clipped + * vertices. * - * {@link https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm} + * https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm * * @param pts - subject poly vertices * @param bounds - clipping boundary vertices diff --git a/packages/geom-closest-point/src/points.ts b/packages/geom-closest-point/src/points.ts index 533f7de8d3..4bb2a80693 100644 --- a/packages/geom-closest-point/src/points.ts +++ b/packages/geom-closest-point/src/points.ts @@ -5,7 +5,8 @@ import { set } from "@thi.ng/vectors/set"; /** * Returns closest point to `p` in given point array, optionally using custom - * distance function `dist` (default: {@link @thi.ng/vectors#distSq}). + * distance function `dist` (default: + * [`distSq()`](https://docs.thi.ng/umbrella/vectors/functions/distSq.html)). * * @param p - * @param pts - diff --git a/packages/geom-hull/src/graham-scan.ts b/packages/geom-hull/src/graham-scan.ts index 41daa1699b..4a5e9e26db 100644 --- a/packages/geom-hull/src/graham-scan.ts +++ b/packages/geom-hull/src/graham-scan.ts @@ -4,11 +4,11 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors"; const atan2 = Math.atan2; /** - * Returns array of points defining the 2D Convex Hull of `pts` using - * the Graham Scan method. + * Returns array of points defining the 2D Convex Hull of `pts` using the Graham + * Scan method. * - * - {@link https://en.wikipedia.org/wiki/Graham_scan} - * - {@link http://c.thi.ng/} + * - https://en.wikipedia.org/wiki/Graham_scan + * - http://c.thi.ng/ * * @param pts - input points * @param eps - tolerance for colinear neighbor detection @@ -58,7 +58,7 @@ export const grahamScan2 = (pts: ReadonlyVec[], eps = EPS) => { * Returns true, if triangle defined by ABC is NOT counter clockwise, * i.e. clockwise or colinear. * - * {@link @thi.ng/vectors#signedArea2} + * [`signedArea2()`](https://docs.thi.ng/umbrella/vectors/functions/signedArea2.html) * * @param ax - * @param ay - diff --git a/packages/geom-isec/src/ray-rect.ts b/packages/geom-isec/src/ray-rect.ts index caf809aeaf..1511334ea2 100644 --- a/packages/geom-isec/src/ray-rect.ts +++ b/packages/geom-isec/src/ray-rect.ts @@ -9,7 +9,7 @@ const max = Math.max; /** * Based on: - * {@link https://tavianator.com/fast-branchless-raybounding-box-intersections/} + * https://tavianator.com/fast-branchless-raybounding-box-intersections/ * * @param rpos - ray origin * @param dir - ray dir diff --git a/packages/geom-resample/src/simplify.ts b/packages/geom-resample/src/simplify.ts index 77a3a3dcfe..6fab29ce0e 100644 --- a/packages/geom-resample/src/simplify.ts +++ b/packages/geom-resample/src/simplify.ts @@ -4,7 +4,7 @@ import type { Vec } from "@thi.ng/vectors"; import { eqDelta } from "@thi.ng/vectors/eqdelta"; /** - * {@link https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm} + * https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm * * @param pts - points * @param eps - simplify threshold diff --git a/packages/geom-sdf/src/as-sdf.ts b/packages/geom-sdf/src/as-sdf.ts index aa3be2f9b4..4086edae3b 100644 --- a/packages/geom-sdf/src/as-sdf.ts +++ b/packages/geom-sdf/src/as-sdf.ts @@ -62,8 +62,11 @@ interface ParametricOps { } /** - * Takes an {@link @thi.ng/geom-api#IShape} instance (possibly a tree, e.g. via - * {@link @thi.ng/geom#group}) and converts it into a {@link SDFn}. + * Takes an + * [`IShape`](https://docs.thi.ng/umbrella/geom-api/interfaces/IShape.html) + * instance (possibly a tree, e.g. via + * [`group()`](https://docs.thi.ng/umbrella/geom/functions/group.html)) and + * converts it into a {@link SDFn}. * * @remarks * Currently supported shape types: @@ -82,9 +85,10 @@ interface ParametricOps { * * For shapes which need to be converted to polygons/polylines, the * {@link SDFAttribs.samples} attribute can be used to control the resulting - * number of vertices. If not specified {@link @thi.ng/geom-api#DEFAULT_SAMPLES} + * number of vertices. If not specified + * [`DEFAULT_SAMPLES`](https://docs.thi.ng/umbrella/geom-api/variables/DEFAULT_SAMPLES.html) * will be used (which can be globally set via - * {@link @thi.ng/geom-api#setDefaultSamples}). + * [`setDefaultSamples()`](https://docs.thi.ng/umbrella/geom-api/functions/setDefaultSamples.html)). */ export const asSDF: MultiFn1 = defmulti( __dispatch, diff --git a/packages/geom-splines/src/cubic-arc.ts b/packages/geom-splines/src/cubic-arc.ts index 6abad7e8c4..e6bffb4279 100644 --- a/packages/geom-splines/src/cubic-arc.ts +++ b/packages/geom-splines/src/cubic-arc.ts @@ -8,11 +8,11 @@ import { magSq2 } from "@thi.ng/vectors/magsq"; import { cubicFromLine } from "./cubic-line.js"; /** - * Converts elliptic arc into a 1-4 cubic curve segments, depending on - * arc's angle range. + * Converts elliptic arc into a 1-4 cubic curve segments, depending on arc's + * angle range. * * Partially based on: - * {@link https://github.com/chromium/chromium/blob/develop/third_party/blink/renderer/core/svg/svg_path_parser.cc#L253} + * https://github.com/chromium/chromium/blob/develop/third_party/blink/renderer/core/svg/svg_path_parser.cc#L253 * * @param pos - ellipse center * @param r - ellipse radii diff --git a/packages/geom-splines/src/cubic-bounds.ts b/packages/geom-splines/src/cubic-bounds.ts index 3d9a404e35..beb0cd3ea0 100644 --- a/packages/geom-splines/src/cubic-bounds.ts +++ b/packages/geom-splines/src/cubic-bounds.ts @@ -5,8 +5,7 @@ import type { ReadonlyVec, Vec, VecPair } from "@thi.ng/vectors"; /** * Computes cubic spline bounds for a single vector component. * - * Based on: - * {@link http://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm} + * Based on: http://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm * * @param min - min accumulator * @param max - max accumulator diff --git a/packages/geom-splines/src/cubic-closest-point.ts b/packages/geom-splines/src/cubic-closest-point.ts index 2498206f00..313e696463 100644 --- a/packages/geom-splines/src/cubic-closest-point.ts +++ b/packages/geom-splines/src/cubic-closest-point.ts @@ -4,13 +4,12 @@ import { distSq } from "@thi.ng/vectors/distsq"; import { mixCubic } from "@thi.ng/vectors/mix-cubic"; /** - * Performs recursive search for closest point to `p` on cubic curve - * defined by control points `a`,`b`,`c`,`d`. The `res` and `recur` - * params are used to control the recursion behavior. If `eps` is given, - * the search is terminated as soon as a point with a shorter *squared* - * distance than `eps` is found. + * Performs recursive search for closest point to `p` on cubic curve defined by + * control points `a`,`b`,`c`,`d`. The `res` and `recur` params are used to + * control the recursion behavior. If `eps` is given, the search is terminated + * as soon as a point with a shorter *squared* distance than `eps` is found. * - * {@link @thi.ng/math#minError} + * [`minError()`](https://docs.thi.ng/umbrella/math/functions/minError.html) * * @param p - query point * @param a - control point 1 diff --git a/packages/geom-splines/src/quadratic-closest-point.ts b/packages/geom-splines/src/quadratic-closest-point.ts index 252af1d8ff..f1ae4f10b2 100644 --- a/packages/geom-splines/src/quadratic-closest-point.ts +++ b/packages/geom-splines/src/quadratic-closest-point.ts @@ -4,13 +4,12 @@ import { distSq } from "@thi.ng/vectors/distsq"; import { mixQuadratic } from "@thi.ng/vectors/mix-quadratic"; /** - * Performs recursive search for closest point to `p` on quadratic curve - * defined by control points `a`,`b`,`c`. The `res` and `recur` params - * are used to control the recursion behavior. If `eps` is given, the - * search is terminated as soon as a point with a shorter *squared* - * distance than `eps` is found. + * Performs recursive search for closest point to `p` on quadratic curve defined + * by control points `a`,`b`,`c`. The `res` and `recur` params are used to + * control the recursion behavior. If `eps` is given, the search is terminated + * as soon as a point with a shorter *squared* distance than `eps` is found. * - * {@link @thi.ng/math#minError} + * [`minError()`](https://docs.thi.ng/umbrella/math/functions/minError.html) * * @param p - query point * @param a - control point 1 diff --git a/packages/geom-subdiv-curve/src/subdivide.ts b/packages/geom-subdiv-curve/src/subdivide.ts index 63e56f84a8..1ccc925b35 100644 --- a/packages/geom-subdiv-curve/src/subdivide.ts +++ b/packages/geom-subdiv-curve/src/subdivide.ts @@ -7,7 +7,7 @@ import { transduce } from "@thi.ng/transducers/transduce"; import type { ReadonlyVec, Vec } from "@thi.ng/vectors"; /** - * {@link http://algorithmicbotany.org/papers/subgpu.sig2003.pdf} + * http://algorithmicbotany.org/papers/subgpu.sig2003.pdf * * @param kernel - subdivision scheme * @param pts - source points diff --git a/packages/geom/src/api/text.ts b/packages/geom/src/api/text.ts index adcb1e3660..248e9d46fd 100644 --- a/packages/geom/src/api/text.ts +++ b/packages/geom/src/api/text.ts @@ -6,8 +6,9 @@ import { __copyAttribs } from "../internal/copy.js"; /** * Basic stub for text elements. Currently, only a minimal set of geometry * operations are implemented for this type, however this type implements - * {@link @this.ng/api#IToHiccup} and so is useful as wrapper for inclusion of - * text elements in {@link Group}s with other shape types. + * [`IToHiccup`](https://docs.thi.ng/umbrella/api/interfaces/IToHiccup.html) and + * so is useful as wrapper for inclusion of text elements in {@link Group}s with + * other shape types. */ export class Text implements IHiccupShape { constructor(public pos: Vec, public body: any, public attribs?: Attribs) {} diff --git a/packages/geom/src/as-polygon.ts b/packages/geom/src/as-polygon.ts index 67ee03381b..d7651dd52a 100644 --- a/packages/geom/src/as-polygon.ts +++ b/packages/geom/src/as-polygon.ts @@ -8,7 +8,8 @@ import { vertices } from "./vertices.js"; /** * Converts given shape into a {@link Polygon}, optionally using provided - * {@link @thi.ng/geom-api#SamplingOpts} or number of target vertices. + * [`SamplingOpts`](https://docs.thi.ng/umbrella/geom-api/interfaces/SamplingOpts.html) + * or number of target vertices. * * @remarks * Currently implemented for: diff --git a/packages/geom/src/as-polyline.ts b/packages/geom/src/as-polyline.ts index 524ba168d6..ea6c0b101c 100644 --- a/packages/geom/src/as-polyline.ts +++ b/packages/geom/src/as-polyline.ts @@ -10,7 +10,8 @@ import { vertices } from "./vertices.js"; /** * Converts given shape into a {@link Polyline}, optionally using provided - * {@link @thi.ng/geom-api#SamplingOpts} or number of target vertices. + * [`SamplingOpts`](https://docs.thi.ng/umbrella/geom-api/interfaces/SamplingOpts.html) + * or number of target vertices. * * @remarks * Currently implemented for: diff --git a/packages/geom/src/classify-point.ts b/packages/geom/src/classify-point.ts index c23379037d..2a559f928d 100644 --- a/packages/geom/src/classify-point.ts +++ b/packages/geom/src/classify-point.ts @@ -27,9 +27,9 @@ import { __dispatch } from "./internal/dispatch.js"; * - {@link Sphere} * - {@link Triangle} * - * The {@link @thi.ng/geom-sdf#} package provides a much more comprehensive - * feature set (incl. support for more shapes) to perform similar checks as this - * function. + * The [thi.ng/geom-sdf](https://thi.ng/thi.ng/geom-sdf) package provides a much + * more comprehensive feature set (incl. support for more shapes) to perform + * similar checks as this function. * * Also see {@link pointInside}. * diff --git a/packages/geom/src/clip-convex.ts b/packages/geom/src/clip-convex.ts index a44d18ed96..99310029ce 100644 --- a/packages/geom/src/clip-convex.ts +++ b/packages/geom/src/clip-convex.ts @@ -18,8 +18,9 @@ import { ensureVertices, vertices } from "./vertices.js"; * boundary). Returns `undefined` if there're no remaining result vertices. * * @remarks - * Internally uses {@link @thi.ng/geom-clip-poly#sutherlandHodgeman}. For - * groups, calls itself for each child shape individually and returns a new + * Internally uses + * [`sutherlandHodgeman()`](https://docs.thi.ng/umbrella/geom-clip-poly/functions/sutherlandHodgeman.html). + * For groups, calls itself for each child shape individually and returns a new * group of results (if any). * * @param shape diff --git a/packages/geom/src/convex-hull.ts b/packages/geom/src/convex-hull.ts index fe1fc498fc..7307ada6df 100644 --- a/packages/geom/src/convex-hull.ts +++ b/packages/geom/src/convex-hull.ts @@ -11,7 +11,8 @@ import { vertices } from "./vertices.js"; * Computes the convex hull for given shape and returns it as {@link Polygon}. * * @remarks - * Internally uses {@link @thi.ng/geom-hull#grahamScan2}. + * Internally uses + * [`grahamScan2()`](https://docs.thi.ng/umbrella/geom-hull/functions/grahamScan2.html). * * Currently implemented for: * diff --git a/packages/geom/src/edges.ts b/packages/geom/src/edges.ts index c82e51c1bd..f813f21cc7 100644 --- a/packages/geom/src/edges.ts +++ b/packages/geom/src/edges.ts @@ -19,7 +19,7 @@ import { vertices } from "./vertices.js"; /** * Extracts the edges of given shape's boundary and returns them as an iterable * of vector pairs. Some shapes also support - * {@link @thi.ng/geom-api#SamplingOpts}. + * [`SamplingOpts`](https://docs.thi.ng/umbrella/geom-api/interfaces/SamplingOpts.html). * * @remarks * Currently implemented for: diff --git a/packages/geom/src/internal/bounds.ts b/packages/geom/src/internal/bounds.ts index 253ad9f8dd..a5567758c6 100644 --- a/packages/geom/src/internal/bounds.ts +++ b/packages/geom/src/internal/bounds.ts @@ -35,8 +35,8 @@ export const __collBounds = ( /** * Takes the position and size vectors of 2 - * {@link @thi.ng/geom-api#AABBLike}s and returns 2-tuple of - * `[pos,size]` of their union bounds. + * [`AABBLike`](https://docs.thi.ng/umbrella/geom-api/interfaces/AABBLike.html)s + * and returns 2-tuple of `[pos,size]` of their union bounds. * * @param apos - bbox 1 min pos * @param asize - bbox1 size diff --git a/packages/geom/src/intersects.ts b/packages/geom/src/intersects.ts index 27d47c1376..2e1d9d6f62 100644 --- a/packages/geom/src/intersects.ts +++ b/packages/geom/src/intersects.ts @@ -22,7 +22,7 @@ import { __dispatch2 } from "./internal/dispatch.js"; /** * Performs intersection tests on given 2 shapes and returns - * {@link @thi.ng/geom-api#IntersectionResult}. + * [`IntersectionResult`](https://docs.thi.ng/umbrella/geom-api/interfaces/IntersectionResult.html). * * @remarks * Currently supported pairs: diff --git a/packages/geom/src/offset.ts b/packages/geom/src/offset.ts index a44b98600d..a986bd9cb3 100644 --- a/packages/geom/src/offset.ts +++ b/packages/geom/src/offset.ts @@ -21,7 +21,8 @@ import { rectWithCentroidAndMargin } from "./rect.js"; * distance `dist`. * * @remarks - * Also see {@link @thi.ng/geom-sdf#} package for more flexible & advanced usage. + * Also see [thi.ng/geom-sdf](https://thi.ng/thi.ng/geom-sdf) package for more + * flexible & advanced usage. * * Currently only implemented for: * diff --git a/packages/geom/src/scatter.ts b/packages/geom/src/scatter.ts index 0c41182802..bae17515eb 100644 --- a/packages/geom/src/scatter.ts +++ b/packages/geom/src/scatter.ts @@ -6,12 +6,14 @@ import { bounds } from "./bounds.js"; import { pointInside } from "./point-inside.js"; /** - * Produces `num` random points for which {@link pointInside} succeeeds for the + * Produces `num` random points for which {@link pointInside} succeeds for the * given `shape`. Writes results into `out` array (or creates a new one). * * @remarks * Samples are only created with the shapes bounding box and are chosen using - * optionall yprovided `rnd` {@link @thi.ng/random#IRandom} instance. + * optionally provided `rnd` + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * instance. * * @param shape * @param num diff --git a/packages/geom/src/simplify.ts b/packages/geom/src/simplify.ts index f4b98ce30b..82caab1d80 100644 --- a/packages/geom/src/simplify.ts +++ b/packages/geom/src/simplify.ts @@ -13,8 +13,10 @@ import { vertices } from "./vertices.js"; /** * Simplifies given 2D shape boundary using Douglas-Peucker algorithm - * (implemented by {@link @thi.ng/geom-resample#simplify}) and given `threshold` - * distance (default: 0, which removes only co-linear vertices). + * (implemented by + * [`simplify()`](https://docs.thi.ng/umbrella/geom-resample/functions/simplify.html)) + * and given `threshold` distance (default: 0, which removes only co-linear + * vertices). * * @remarks * Currently only implemented for: diff --git a/packages/geom/src/subdiv-curve.ts b/packages/geom/src/subdiv-curve.ts index f8e1c97b89..a8dec8c818 100644 --- a/packages/geom/src/subdiv-curve.ts +++ b/packages/geom/src/subdiv-curve.ts @@ -8,9 +8,11 @@ import { __copyAttribs } from "./internal/copy.js"; import { __dispatch } from "./internal/dispatch.js"; /** - * Recursively applies {@link @thi.ng/geom-api#SubdivKernel} to given - * shape/boundary. See {@link @thi.ng/geom-subdiv-curve#} package for further - * details. + * Recursively applies + * [`SubdivKernel`](https://docs.thi.ng/umbrella/geom-api/interfaces/SubdivKernel.html) + * to given shape/boundary. See + * [thi.ng/geom-subdiv-curve](https://thi.ng/thi.ng/geom-subdiv-curve) package + * for further details. * * @remarks * By default only applies a single iteration. diff --git a/packages/geom/src/tessellate.ts b/packages/geom/src/tessellate.ts index fec72f6bee..cfd121eebe 100644 --- a/packages/geom/src/tessellate.ts +++ b/packages/geom/src/tessellate.ts @@ -7,8 +7,10 @@ import { vertices } from "./vertices.js"; /** * Recursively tessellates shape using provided - * {@link @thi.ng/geom-api#Tessellator} functions. See - * {@link @thi.ng/geom-tessellate#} package for more details. + * [`Tessellator`](https://docs.thi.ng/umbrella/geom-api/types/Tessellator.html) + * functions. See + * [thi.ng/geom-tessellate](https://thi.ng/thi.ng/geom-tessellate) package for + * more details. * * @remarks * Implemented for all shapes supported by {@link vertices}. diff --git a/packages/geom/src/vertices.ts b/packages/geom/src/vertices.ts index 76ad1825e2..a3a083dff4 100644 --- a/packages/geom/src/vertices.ts +++ b/packages/geom/src/vertices.ts @@ -31,7 +31,8 @@ import { __dispatch } from "./internal/dispatch.js"; /** * Extracts/samples vertices from given shape's boundary and returns them as - * array. Some shapes also support {@link @thi.ng/geom-api#SamplingOpts}. + * array. Some shapes also support + * [`SamplingOpts`](https://docs.thi.ng/umbrella/geom-api/interfaces/SamplingOpts.html). * * @remarks * The given sampling options (if any) can also be overridden per shape using diff --git a/packages/geom/src/with-attribs.ts b/packages/geom/src/with-attribs.ts index c5f39e55b2..c858f0557a 100644 --- a/packages/geom/src/with-attribs.ts +++ b/packages/geom/src/with-attribs.ts @@ -2,8 +2,9 @@ import type { Attribs, IShape } from "@thi.ng/geom-api"; /** * Returns a shallow copy of given shape with new `attribs` assigned (using - * {@link @thi.ng/geom-api#IAttributed.withAttribs}). If `replace` is false, the - * new attribs will be merged with the existing ones (if any). + * [`IAttributed`](https://docs.thi.ng/umbrella/geom-api/interfaces/IAttributed.html).withAttribs}). + * If `replace` is false, the new attribs will be merged with the existing ones + * (if any). * * @param shape * @param attribs diff --git a/packages/gp/src/api.ts b/packages/gp/src/api.ts index c2e9ff42e9..fe56eb0bfb 100644 --- a/packages/gp/src/api.ts +++ b/packages/gp/src/api.ts @@ -23,10 +23,10 @@ export interface GPOpts { */ ops: OpGenSpec[]; /** - * Possibly seeded PRNG instance to be used for AST generation / - * editing. + * Possibly seeded PRNG instance to be used for AST generation / editing. * - * @defaultValue {@link @thi.ng/random#SYSTEM} + * @defaultValue + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) */ rnd?: IRandom; /** diff --git a/packages/gp/src/ast.ts b/packages/gp/src/ast.ts index 0bf79e312a..e98db4b09d 100644 --- a/packages/gp/src/ast.ts +++ b/packages/gp/src/ast.ts @@ -91,8 +91,8 @@ export class AST { } /** - * Returns linearized/flat version of given AST as an array of - * {@link @thi.ng/zipper#Location | zipper locations}. + * Returns linearized/flat version of given AST as an array of [zipper + * locations](https://docs.thi.ng/umbrella/zipper/classes/Location.html). * * @param tree - */ @@ -106,19 +106,19 @@ export class AST { } /** - * Returns random {@link ASTNode} from given tree, using the user - * provided PRNG (via `opts`) or {@link @thi.ng/random#SYSTEM}. The - * returned value is a - * {@link @thi.ng/zipper#Location | zipper location} of the selected - * node. + * Returns random {@link ASTNode} from given tree, using the user provided + * PRNG (via `opts`) or + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html). + * The returned value is a [zipper + * location](https://docs.thi.ng/umbrella/zipper/classes/Location.html) of + * the selected node. * * @remarks * The actual `ASTNode` can be obtained via `.node`. * - * Only nodes in the linearized index range `[min..max)` are - * returned (default: entire tree range). Since the linear tree - * length isn't known beforehand, `max` < 0 (default) is equivalent - * to the linearized tree end. + * Only nodes in the linearized index range `[min..max)` are returned + * (default: entire tree range). Since the linear tree length isn't known + * beforehand, `max` < 0 (default) is equivalent to the linearized tree end. * * @param opts - * @param tree - diff --git a/packages/grid-iterators/src/clipping.ts b/packages/grid-iterators/src/clipping.ts index a73e9bda03..1ac3934368 100644 --- a/packages/grid-iterators/src/clipping.ts +++ b/packages/grid-iterators/src/clipping.ts @@ -28,7 +28,8 @@ const axis: FnN3 = (a, b, c) => (a < b ? a - b : a > b + c ? a - b - c : 0) ** 2; /** - * Based on {@link @thi.ng/geom-isec}, but inlined to avoid dependency. + * Based on [thi.ng/geom-isec](https://thi.ng/geom-isec), but inlined to avoid + * dependency. * * @param x - * @param y - @@ -51,7 +52,7 @@ export const intersectRectCircle: FnU7 = ( ) => axis(cx, x, w) + axis(cy, y, h) <= r * r; /** - * Based on {@link @thi.ng/geom-clip-line#liangBarsky2Raw}, but with diff return type. + * Based on [`liangBarsky2Raw()`](https://docs.thi.ng/umbrella/geom-clip-line/functions/liangBarsky2Raw.html), but with diff return type. * * @param ax - * @param ay - diff --git a/packages/grid-iterators/src/diagonal.ts b/packages/grid-iterators/src/diagonal.ts index 9af51caa0c..c86e2f36b4 100644 --- a/packages/grid-iterators/src/diagonal.ts +++ b/packages/grid-iterators/src/diagonal.ts @@ -1,12 +1,12 @@ import { asInt } from "@thi.ng/api/typedarray"; /** - * Yields sequence of 2D grid coordinates in diagonal order starting at - * [0,0] and using given `cols` and `rows`. Each diagonal starts at y=0 - * and progresses in -x,+y direction. + * Yields sequence of 2D grid coordinates in diagonal order starting at [0,0] + * and using given `cols` and `rows`. Each diagonal starts at y=0 and progresses + * in -x,+y direction. * * Ported & modified from original Java code by Christopher Kulla. - * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java} + * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/hilbert.ts b/packages/grid-iterators/src/hilbert.ts index 33635c7ad2..2e294fcfeb 100644 --- a/packages/grid-iterators/src/hilbert.ts +++ b/packages/grid-iterators/src/hilbert.ts @@ -1,11 +1,11 @@ import { asInt } from "@thi.ng/api/typedarray"; /** - * Yields sequence of 2D grid coordinates along 2D Hilbert curve using - * given `cols` and `rows` (each max. 32768 (2^15)). + * Yields sequence of 2D grid coordinates along 2D Hilbert curve using given + * `cols` and `rows` (each max. 32768 (2^15)). * * Ported & modified from original Java code by Christopher Kulla. - * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java} + * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/random.ts b/packages/grid-iterators/src/random.ts index aa3d4d6a46..98167742ce 100644 --- a/packages/grid-iterators/src/random.ts +++ b/packages/grid-iterators/src/random.ts @@ -6,8 +6,10 @@ import { range } from "@thi.ng/transducers/range"; /** * Yields 2D grid coordinates in random order w/ support for optional - * {@link @thi.ng/random#IRandom} implementation (default: - * {@link @thi.ng/random#SYSTEM} aka `Math.random`). + * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html) + * implementation (default: + * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) aka + * `Math.random`). * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/rows.ts b/packages/grid-iterators/src/rows.ts index f87cc75e19..5f5747562e 100644 --- a/packages/grid-iterators/src/rows.ts +++ b/packages/grid-iterators/src/rows.ts @@ -2,7 +2,7 @@ import { range2d } from "@thi.ng/transducers/range2d"; /** * Yields sequence of 2D grid coordinates in row-major order. Same as - * {@link @thi.ng/transducers#range2d}. + * [`range2d()`](https://docs.thi.ng/umbrella/transducers/functions/range2d.html). * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/spiral.ts b/packages/grid-iterators/src/spiral.ts index 81b8553428..8804794048 100644 --- a/packages/grid-iterators/src/spiral.ts +++ b/packages/grid-iterators/src/spiral.ts @@ -1,11 +1,11 @@ import { asInt } from "@thi.ng/api/typedarray"; /** - * Yields sequence of 2D grid coordinates in outward spiral order - * starting from the center, given `cols` and `rows`. + * Yields sequence of 2D grid coordinates in outward spiral order starting from + * the center, given `cols` and `rows`. * * Ported & modified from original Java code by Christopher Kulla. - * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java} + * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/zigzag-columns.ts b/packages/grid-iterators/src/zigzag-columns.ts index 58aac0d6b3..17c3ef3f08 100644 --- a/packages/grid-iterators/src/zigzag-columns.ts +++ b/packages/grid-iterators/src/zigzag-columns.ts @@ -1,11 +1,11 @@ import { asInt } from "@thi.ng/api/typedarray"; /** - * Yields sequence of 2D grid coordinates in zigzag column order - * starting from [0,0], given `cols` and `rows`. + * Yields sequence of 2D grid coordinates in zigzag column order starting from + * [0,0], given `cols` and `rows`. * * Ported & modified from original Java code by Christopher Kulla. - * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java} + * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java * * @param cols - * @param rows - diff --git a/packages/grid-iterators/src/zigzag-rows.ts b/packages/grid-iterators/src/zigzag-rows.ts index afc09abcb2..a02b778492 100644 --- a/packages/grid-iterators/src/zigzag-rows.ts +++ b/packages/grid-iterators/src/zigzag-rows.ts @@ -1,11 +1,11 @@ import { asInt } from "@thi.ng/api/typedarray"; /** - * Yields sequence of 2D grid coordinates in zigzag row order starting - * from [0,0], given `cols` and `rows`. + * Yields sequence of 2D grid coordinates in zigzag row order starting from + * [0,0], given `cols` and `rows`. * * Ported & modified from original Java code by Christopher Kulla. - * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java} + * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java * * @param cols - * @param rows - diff --git a/packages/hdom-canvas/src/index.ts b/packages/hdom-canvas/src/index.ts index b4eee6c5d1..501705e717 100644 --- a/packages/hdom-canvas/src/index.ts +++ b/packages/hdom-canvas/src/index.ts @@ -12,37 +12,38 @@ const STR = "string"; /** * Special HTML5 canvas component which injects a branch-local hdom - * implementation for virtual SVG-like shape components / elements. - * These elements are then translated into canvas draw commands during - * the hdom update process. + * implementation for virtual SVG-like shape components / elements. These + * elements are then translated into canvas draw commands during the hdom update + * process. * - * The canvas component automatically adjusts its size for HDPI displays - * by adding CSS `width` & `height` properties and pre-scaling the - * drawing context accordingly before shapes are processed. + * The canvas component automatically adjusts its size for HDPI displays by + * adding CSS `width` & `height` properties and pre-scaling the drawing context + * accordingly before shapes are processed. * - * Shape components are expressed in standard hiccup syntax, however - * with the following restrictions: + * Shape components are expressed in standard hiccup syntax, however with the + * following restrictions: * * - Shape component objects with life cycle methods are only partially - * supported, i.e. only the {@link @thi.ng/hdom#ILifecycle.render} & - * {@link @thi.ng/hdom#ILifecycle.release} methods are used (Note, for - * performance reasons `release` methods are ignored by default. If - * your shape tree contains stateful components which use the - * `release` life cycle method, you'll need to explicitly enable the + * supported, i.e. only the + * [`ILifecycle.render()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#render) + * & + * [`ILifecycle.release()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#release) + * methods are used (Note, for performance reasons `release` methods are + * ignored by default. If your shape tree contains stateful components which + * use the `release` life cycle method, you'll need to explicitly enable the * canvas component's `__release` attribute by setting it to `true`). - * - Currently no event listeners can be assigned to shapes (ignored), - * though this is planned for a future version. The canvas element - * itself can of course have event handlers as usual. + * - Currently no event listeners can be assigned to shapes (ignored), though + * this is planned for a future version. The canvas element itself can of + * course have event handlers as usual. * - * All embedded component functions receive the user context object just - * like normal hdom components. + * All embedded component functions receive the user context object just like + * normal hdom components. * * For best performance, it's recommended to ensure all resulting shapes - * elements are provided in already normalized hiccup format (i.e. - * `[tag, {attribs}, ...]`). That way the `__normalize: false` control - * attribute can be added either to the canvas component itself (or to - * individual shapes / groups), and if present, will skip normalization - * of all children. + * elements are provided in already normalized hiccup format (i.e. `[tag, + * {attribs}, ...]`). That way the `__normalize: false` control attribute can be + * added either to the canvas component itself (or to individual shapes / + * groups), and if present, will skip normalization of all children. * * @param _ - hdom user context (ignored) * @param attribs - canvas attribs diff --git a/packages/hdom-components/src/canvas.ts b/packages/hdom-components/src/canvas.ts index 64d606d316..13108517a8 100644 --- a/packages/hdom-components/src/canvas.ts +++ b/packages/hdom-components/src/canvas.ts @@ -14,9 +14,9 @@ interface Canvas2DContextAttributes { /** * User provided canvas life cycle methods. These differ from the usual - * {@link @thi.ng/hdom#ILifecycle} methods and are always passed at - * least the canvas DOM element, canvas context and hdom user context. - * Not all handlers need to be implemented. + * [`ILifecycle`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html) + * methods and are always passed at least the canvas DOM element, canvas context + * and hdom user context. Not all handlers need to be implemented. */ export interface CanvasHandlers { /** diff --git a/packages/hdom/src/api.ts b/packages/hdom/src/api.ts index 024f37c551..461252b39a 100644 --- a/packages/hdom/src/api.ts +++ b/packages/hdom/src/api.ts @@ -2,91 +2,86 @@ import type { IObjectOf } from "@thi.ng/api"; export interface ILifecycle { /** - * Component init method. Called with the actual DOM element, hdom - * user context and any other args when the component is first used, - * but **after** `render()` has been called once already AND all of - * the components children have been realized. Therefore, if any - * children have their own `init` lifecycle method, these hooks will - * be executed before that of the parent. + * Component init method. Called with the actual DOM element, hdom user + * context and any other args when the component is first used, but + * **after** `render()` has been called once already AND all of the + * components children have been realized. Therefore, if any children have + * their own `init` lifecycle method, these hooks will be executed before + * that of the parent. */ init?(el: Element, ctx: any, ...args: any[]): void; /** - * Returns the hdom tree of this component. - * Note: Always will be called first (prior to `init`/`release`) - * to obtain the actual component definition used for diffing. - * Therefore might have to include checks if any local state - * has already been initialized via `init`. This is the only + * Returns the hdom tree of this component. Note: Always will be called + * first (prior to `init`/`release`) to obtain the actual component + * definition used for diffing. Therefore might have to include checks if + * any local state has already been initialized via `init`. This is the only * mandatory method which MUST be implemented. * - * `render` is executed before `init` because `normalizeTree()` - * must obtain the component's hdom tree first before it can - * determine if an `init` is necessary. `init` itself will be - * called from `diffTree`, `createDOM` or `hydrateDOM()` in a later - * phase of processing. - * - * `render` should ALWAYS return an array or another function, - * else the component's `init` or `release` fns will NOT be able - * to be called later. E.g. If the return value of `render` - * evaluates as a string or number, the return value should be - * wrapped as `["span", "foo"]`. If no `init` or `release` are - * used, this requirement is relaxed. + * `render` is executed before `init` because `normalizeTree()` must obtain + * the component's hdom tree first before it can determine if an `init` is + * necessary. `init` itself will be called from `diffTree`, `createDOM` or + * `hydrateDOM()` in a later phase of processing. + * + * `render` should ALWAYS return an array or another function, else the + * component's `init` or `release` fns will NOT be able to be called later. + * E.g. If the return value of `render` evaluates as a string or number, the + * return value should be wrapped as `["span", "foo"]`. If no `init` or + * `release` are used, this requirement is relaxed. */ render(ctx: any, ...args: any[]): any; /** - * Called when the underlying DOM of this component is removed - * (or replaced). Intended for cleanup tasks. + * Called when the underlying DOM of this component is removed (or + * replaced). Intended for cleanup tasks. */ release?(ctx: any, ...args: any[]): void; } export interface HDOMBehaviorAttribs { /** - * HDOM behavior control attribute. If true (default), the element - * will be fully processed by `diffTree()`. If false, no diff will - * be computed and the `replaceChild()` operation will be called in - * the currently active hdom target implementation. + * HDOM behavior control attribute. If true (default), the element will be + * fully processed by `diffTree()`. If false, no diff will be computed and + * the `replaceChild()` operation will be called in the currently active + * hdom target implementation. */ __diff?: boolean; /** - * HDOM behavior control attribute. If true, the element will not be - * diffed and simply skipped. IMPORTANT: This attribute is only - * intended for cases when a component / tree branch should not be - * updated, but MUST NEVER be enabled when that component is first - * included in the tree. Doing so will result in undefined future - * behavior. - * - * Note, skipped elements and their children are being normalized, - * but are ignored during diffing. Therefore, if this attribute is - * enabled the element should either have no children OR the - * children are the same (type) as when the attribute is disabled - * (i.e. when `__skip` is falsy). + * HDOM behavior control attribute. If true, the element will not be diffed + * and simply skipped. IMPORTANT: This attribute is only intended for cases + * when a component / tree branch should not be updated, but MUST NEVER be + * enabled when that component is first included in the tree. Doing so will + * result in undefined future behavior. + * + * Note, skipped elements and their children are being normalized, but are + * ignored during diffing. Therefore, if this attribute is enabled the + * element should either have no children OR the children are the same + * (type) as when the attribute is disabled (i.e. when `__skip` is falsy). */ __skip?: boolean; /** - * HDOM behavior control attribute. If present, the element and all - * of its children will be processed by the given - * `HDOMImplementation` instead of the default implementation. + * HDOM behavior control attribute. If present, the element and all of its + * children will be processed by the given `HDOMImplementation` instead of + * the default implementation. */ __impl?: HDOMImplementation; /** - * HDOM behavior control attribute. If `false`, the current - * element's children will not be normalized. Use this when you're - * sure that all children are already in canonical format (incl. - * `key` attributes). See `normalizeTree()` for details. + * HDOM behavior control attribute. If `false`, the current element's + * children will not be normalized. Use this when you're sure that all + * children are already in canonical format (incl. `key` attributes). See + * `normalizeTree()` for details. */ __normalize?: boolean; /** - * HDOM behavior control attribute. If `false`, hdom will not - * attempt to call `release()` lifecycle methods on this element or - * any of its children. + * HDOM behavior control attribute. If `false`, hdom will not attempt to + * call `release()` lifecycle methods on this element or any of its + * children. */ __release?: boolean; /** - * Currently only used by {@link @thi.ng/hiccup# | @thi.ng/hiccup}. No relevance for hdom. If - * `false`, the element and its children will be omitted from the - * serialized result. + * Currently only used by [`thi.ng/hiccup`](https://thi.ng/hiccup). No + * relevance for hdom. If `false`, the element and its children will be + * omitted from the serialized result. */ __serialize?: boolean; } @@ -109,46 +104,45 @@ export interface HDOMOpts { */ root?: Element | string; /** - * Arbitrary user context object, passed to all component functions - * embedded in the tree. + * Arbitrary user context object, passed to all component functions embedded + * in the tree. */ ctx?: any; /** - * Attempts to auto-expand/deref the given keys in the user supplied - * context object (`ctx` option) prior to *each* tree normalization. - * All of these values should implement the - * {@link @thi.ng/api#IDeref} interface (e.g. atoms, cursors, views, - * rstreams etc.). This feature can be used to define dynamic - * contexts linked to the main app state, e.g. using derived views - * provided by {@link @thi.ng/atom# | @thi.ng/atom}. + * Attempts to auto-expand/deref the given keys in the user supplied context + * object (`ctx` option) prior to *each* tree normalization. All of these + * values should implement the + * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) + * interface (e.g. atoms, cursors, views, rstreams etc.). This feature can + * be used to define dynamic contexts linked to the main app state, e.g. + * using derived views provided by [`thi.ng/atom`](https://thi.ng/atom). * * @defaultValue none */ autoDerefKeys: PropertyKey[]; /** - * If true, each elements will receive an auto-generated - * `key` attribute (unless one already exists). + * If true, each elements will receive an auto-generated `key` attribute + * (unless one already exists). * * @defaultValue true */ keys?: boolean; /** - * If true, all text content will be wrapped in `` - * elements. Spans will never be created inside