@vielzeug/sourcerer 1.0.5 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dev.cjs +2 -0
- package/dist/_dev.cjs.map +1 -0
- package/dist/_dev.d.ts +2 -0
- package/dist/_dev.d.ts.map +1 -0
- package/dist/_dev.js +12 -0
- package/dist/_dev.js.map +1 -0
- package/dist/_utils.cjs +1 -1
- package/dist/_utils.cjs.map +1 -1
- package/dist/_utils.d.ts +20 -0
- package/dist/_utils.d.ts.map +1 -1
- package/dist/_utils.js +16 -3
- package/dist/_utils.js.map +1 -1
- package/dist/codecs.cjs +1 -1
- package/dist/codecs.cjs.map +1 -1
- package/dist/codecs.d.ts +1 -1
- package/dist/codecs.d.ts.map +1 -1
- package/dist/codecs.js +21 -19
- package/dist/codecs.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +25 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/cursorSource.cjs +1 -1
- package/dist/cursorSource.cjs.map +1 -1
- package/dist/cursorSource.js +69 -69
- package/dist/cursorSource.js.map +1 -1
- package/dist/derive.cjs +1 -1
- package/dist/derive.cjs.map +1 -1
- package/dist/derive.d.ts +1 -0
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +2 -4
- package/dist/derive.js.map +1 -1
- package/dist/devtools.cjs +2 -0
- package/dist/devtools.cjs.map +1 -0
- package/dist/devtools.d.ts +52 -0
- package/dist/devtools.d.ts.map +1 -0
- package/dist/devtools.js +20 -0
- package/dist/devtools.js.map +1 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +2 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/fetchManager.cjs.map +1 -1
- package/dist/fetchManager.d.ts +13 -0
- package/dist/fetchManager.d.ts.map +1 -1
- package/dist/fetchManager.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -14
- package/dist/infiniteSource.cjs +1 -1
- package/dist/infiniteSource.cjs.map +1 -1
- package/dist/infiniteSource.js +62 -62
- package/dist/infiniteSource.js.map +1 -1
- package/dist/localSource.cjs +1 -1
- package/dist/localSource.cjs.map +1 -1
- package/dist/localSource.d.ts.map +1 -1
- package/dist/localSource.js +69 -79
- package/dist/localSource.js.map +1 -1
- package/dist/merge.cjs +1 -1
- package/dist/merge.cjs.map +1 -1
- package/dist/merge.d.ts +6 -1
- package/dist/merge.d.ts.map +1 -1
- package/dist/merge.js +8 -1
- package/dist/merge.js.map +1 -1
- package/dist/remoteSource.cjs +1 -1
- package/dist/remoteSource.cjs.map +1 -1
- package/dist/remoteSource.d.ts.map +1 -1
- package/dist/remoteSource.js +94 -94
- package/dist/remoteSource.js.map +1 -1
- package/dist/sourcerer.cjs +1 -1
- package/dist/sourcerer.cjs.map +1 -1
- package/dist/sourcerer.iife.js +1 -1
- package/dist/sourcerer.iife.js.map +1 -1
- package/dist/sourcerer.js +1 -1
- package/dist/sourcerer.js.map +1 -1
- package/dist/types.d.ts +14 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -3
- package/dist/applyQuery.cjs +0 -2
- package/dist/applyQuery.cjs.map +0 -1
- package/dist/applyQuery.d.ts +0 -20
- package/dist/applyQuery.d.ts.map +0 -1
- package/dist/applyQuery.js +0 -8
- package/dist/applyQuery.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vielzeug/sourcerer",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Typed data-source adapter — pagination, filtering, sorting, search, and cursor-based infinite scroll",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js",
|
|
17
17
|
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./devtools": {
|
|
20
|
+
"source": "./src/devtools.ts",
|
|
21
|
+
"types": "./dist/devtools.d.ts",
|
|
22
|
+
"import": "./dist/devtools.js",
|
|
23
|
+
"require": "./dist/devtools.cjs"
|
|
18
24
|
}
|
|
19
25
|
},
|
|
20
26
|
"scripts": {
|
|
@@ -32,10 +38,10 @@
|
|
|
32
38
|
"registry": "https://registry.npmjs.org/"
|
|
33
39
|
},
|
|
34
40
|
"engines": {
|
|
35
|
-
"node": ">=
|
|
41
|
+
"node": ">=22"
|
|
36
42
|
},
|
|
37
43
|
"dependencies": {
|
|
38
|
-
"@vielzeug/arsenal": "1.1.
|
|
44
|
+
"@vielzeug/arsenal": "1.1.2"
|
|
39
45
|
},
|
|
40
46
|
"devDependencies": {
|
|
41
47
|
"@types/node": "^26.1.0",
|
package/dist/applyQuery.cjs
DELETED
package/dist/applyQuery.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyQuery.cjs","names":[],"sources":["../src/applyQuery.ts"],"sourcesContent":["import type { SourceQuery } from './types';\n\n/**\n * Generic query applicator — delegates to `source.patch(changes)`.\n * Use this with `decodeQuery()` output to restore URL state onto any source:\n *\n * @example\n * ```ts\n * const q = decodeQuery(new URL(location.href).searchParams, { defaultLimit: 20 });\n * await applyQuery(source, q);\n * ```\n *\n * ⚠️ `CursorSource` and `InfiniteSource` have no page-number concept (keyset/append navigation) —\n * their `patch()` only reads `limit`/`search` and silently ignores a `page` field. This compiles\n * (both accept `Partial<SourceQuery>`-shaped input) but a `page` value from `decodeQuery()` is a\n * no-op on those two source types.\n */\nexport function applyQuery<T extends { patch(changes: Partial<SourceQuery>): Promise<void> }>(\n source: T,\n changes: Partial<SourceQuery>,\n): Promise<void> {\n return source.patch(changes);\n}\n"],"mappings":"AAiBA,SAAgB,EACd,EACA,EACe,CACf,OAAO,EAAO,MAAM,CAAO,CAC7B"}
|
package/dist/applyQuery.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { SourceQuery } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Generic query applicator — delegates to `source.patch(changes)`.
|
|
4
|
-
* Use this with `decodeQuery()` output to restore URL state onto any source:
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```ts
|
|
8
|
-
* const q = decodeQuery(new URL(location.href).searchParams, { defaultLimit: 20 });
|
|
9
|
-
* await applyQuery(source, q);
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* ⚠️ `CursorSource` and `InfiniteSource` have no page-number concept (keyset/append navigation) —
|
|
13
|
-
* their `patch()` only reads `limit`/`search` and silently ignores a `page` field. This compiles
|
|
14
|
-
* (both accept `Partial<SourceQuery>`-shaped input) but a `page` value from `decodeQuery()` is a
|
|
15
|
-
* no-op on those two source types.
|
|
16
|
-
*/
|
|
17
|
-
export declare function applyQuery<T extends {
|
|
18
|
-
patch(changes: Partial<SourceQuery>): Promise<void>;
|
|
19
|
-
}>(source: T, changes: Partial<SourceQuery>): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=applyQuery.d.ts.map
|
package/dist/applyQuery.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyQuery.d.ts","sourceRoot":"","sources":["../src/applyQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS;IAAE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,EAC1F,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
package/dist/applyQuery.js
DELETED
package/dist/applyQuery.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"applyQuery.js","names":[],"sources":["../src/applyQuery.ts"],"sourcesContent":["import type { SourceQuery } from './types';\n\n/**\n * Generic query applicator — delegates to `source.patch(changes)`.\n * Use this with `decodeQuery()` output to restore URL state onto any source:\n *\n * @example\n * ```ts\n * const q = decodeQuery(new URL(location.href).searchParams, { defaultLimit: 20 });\n * await applyQuery(source, q);\n * ```\n *\n * ⚠️ `CursorSource` and `InfiniteSource` have no page-number concept (keyset/append navigation) —\n * their `patch()` only reads `limit`/`search` and silently ignores a `page` field. This compiles\n * (both accept `Partial<SourceQuery>`-shaped input) but a `page` value from `decodeQuery()` is a\n * no-op on those two source types.\n */\nexport function applyQuery<T extends { patch(changes: Partial<SourceQuery>): Promise<void> }>(\n source: T,\n changes: Partial<SourceQuery>,\n): Promise<void> {\n return source.patch(changes);\n}\n"],"mappings":";AAiBA,SAAgB,EACd,GACA,GACe;CACf,OAAO,EAAO,MAAM,CAAO;AAC7B"}
|