Skip to content

Commit 962e8cd

Browse files
committed
ref: separate docs file (#71) & edit links
1 parent e95d835 commit 962e8cd

7 files changed

+3233
-3130
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@
245245
- separate instances can have different MutationObserver options set to further reduce performance impact
246246
- the separation into instances allows for a new "chaining" paradigm where selector listeners are only added and checked for once they are actually needed (see examples in the documentation)
247247
- when using chaining, separate instances can be created and have listeners added to them before their base element is available in the DOM tree
248-
- every listener can have a set debounce time, so that it doesn't get called too often (works the same as the [`debounce()` function](https://github.com/Sv443-Network/UserUtils/blob/main/README.md#debounce), but is disabled by default)
248+
- every listener can have a set debounce time, so that it doesn't get called too often (works the same as the [`debounce()` function](https://github.com/Sv443-Network/UserUtils/blob/v3.0.0/README.md#debounce), but is disabled by default)
249249
- there are now multiple methods to get and delete specific listeners
250250

251251
The `SelectorObserver.addListener()` method is backwards compatible with the old `onSelector()` function, so you can just add the class instance in front (for full backwards compat use `document.body` for the `baseElement` parameter of the constructor), then change the old function's name and it should work as before.
252-
For more info and examples, please view the [SelectorObserver documentation](https://github.com/Sv443-Network/UserUtils/blob/main/README.md#selectorobserver)
252+
For more info and examples, please view the [SelectorObserver documentation](https://github.com/Sv443-Network/UserUtils/blob/v3.0.0/README.md#selectorobserver)
253253

254254
### Minor Changes
255255

README-summary.md

+73-58
Large diffs are not rendered by default.

README.md

+71-3,065
Large diffs are not rendered by default.

docs.md

+3,080
Large diffs are not rendered by default.

jsr.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
"dist/index.js",
1010
"dist/index.cjs",
1111
"dist/index.global.js",
12+
"dist/index.umd.js",
1213
"dist/lib/**/*.d.ts",
1314
"package.json",
14-
"README.md",
15+
"README-summary.md",
1516
"CHANGELOG.md",
1617
"LICENSE.txt"
1718
]

lib/Debouncer.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { NanoEmitter } from "./NanoEmitter.js";
33
//#region types
44

55
/**
6-
* The type of edge to use for the debouncer - [see the docs for a diagram and explanation.](https://github.com/Sv443-Network/UserUtils/blob/main/README.md#debouncer)
6+
* The type of edge to use for the debouncer - [see the docs for a diagram and explanation.](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#debouncer)
77
* - `immediate` - (default & recommended) - calls the listeners at the very first call ("rising" edge) and queues the latest call until the timeout expires
88
* - Pros:
99
* - First call is let through immediately
@@ -52,7 +52,7 @@ export class Debouncer<TArgs> extends NanoEmitter<DebouncerEventMap<TArgs>> {
5252
/**
5353
* Creates a new debouncer with the specified timeout and edge type.
5454
* @param timeout Timeout in milliseconds between letting through calls - defaults to 200
55-
* @param type The edge type to use for the debouncer - see {@linkcode DebouncerType} for details or [the documentation for an explanation and diagram](https://github.com/Sv443-Network/UserUtils/blob/main/README.md#debouncer) - defaults to "immediate"
55+
* @param type The edge type to use for the debouncer - see {@linkcode DebouncerType} for details or [the documentation for an explanation and diagram](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#debouncer) - defaults to "immediate"
5656
*/
5757
constructor(protected timeout = 200, protected type: DebouncerType = "immediate") {
5858
super();
@@ -161,7 +161,7 @@ export class Debouncer<TArgs> extends NanoEmitter<DebouncerEventMap<TArgs>> {
161161
* The returned function can be called with any arguments and will execute the `call()` method of the debouncer.
162162
* The debouncer instance is accessible via the `debouncer` property of the returned function.
163163
*
164-
* Refer to the {@linkcode Debouncer} class definition or the [Debouncer documentation](https://github.com/Sv443-Network/UserUtils/blob/main/README.md#debouncer) for more information.
164+
* Refer to the {@linkcode Debouncer} class definition or the [Debouncer documentation](https://github.com/Sv443-Network/UserUtils/blob/main/docs.md#debouncer) for more information.
165165
*/
166166
export function debounce<
167167
TFunc extends DebouncerFunc<TArgs>,

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@
7272
"/dist/index.cjs",
7373
"/dist/index.mjs",
7474
"/dist/index.global.js",
75+
"/dist/index.umd.js",
7576
"/dist/lib/**.d.ts",
7677
"/package.json",
77-
"/README.md",
78+
"/README-summary.md",
7879
"/CHANGELOG.md",
7980
"/LICENSE.txt"
8081
]

0 commit comments

Comments
 (0)