@nstarkman/research-kit 0.0.0-stage → 20261023.0.1
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/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +54 -2
- package/package.json +31 -4
- package/src/Card.astro +5 -0
- package/src/CollabMap.astro +5 -0
- package/src/Publication.astro +5 -0
- package/src/collect.js +2 -0
- package/src/readers.js +2 -0
- package/src/store.js +2 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Versions are dates, `YYYYMMDD.0.N`; the four research-kit packages are released together at one
|
|
4
|
+
version. A breaking change says how to migrate.
|
|
5
|
+
|
|
6
|
+
## 20261023.0.1
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Released with `@nstarkman/data-resolver` 20261023.0.1 (a paper's map: its own co-authors only).
|
|
11
|
+
|
|
12
|
+
## 20261023.0.0
|
|
13
|
+
|
|
14
|
+
First release.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nathaniel Starkman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @nstarkman/research-kit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The [nstarkman.space](https://nstarkman.space) paper card, publication entry and collaborator map,
|
|
4
|
+
for a paper's own site at `nstarkman.space/<repo>/` (made with
|
|
5
|
+
[syw-site](https://github.com/nstarman/syw-site)). It is three packages at one version:
|
|
6
|
+
`@nstarkman/data-resolver` (the data layer as a store, and the collector), `@nstarkman/card-builder`
|
|
7
|
+
(`Card`, `Publication`), `@nstarkman/collaborator-map` (`CollabMap`). Developed in
|
|
8
|
+
[nstarman/nstarman.github.io](https://github.com/nstarman/nstarman.github.io), whose pages use them.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install --save-exact @nstarkman/research-kit@<version>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## A snapshot, then a store
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { collect } from '@nstarkman/research-kit/collect.js';
|
|
18
|
+
import { fromGitHub } from '@nstarkman/research-kit/readers.js';
|
|
19
|
+
const snapshot = await collect('stream-convexity-spatial', fromGitHub({ repo: 'nstarman/nstarman.github.io' }));
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The snapshot (schema 1) is the item and the items its `refs` reach, as they are in the website's
|
|
23
|
+
`data/`, with the `config/` slices they use and the commit they came from. Keep it in the repository
|
|
24
|
+
and build offline.
|
|
25
|
+
|
|
26
|
+
## The store the components read
|
|
27
|
+
|
|
28
|
+
The components import `@nstarkman/research-store`. Point it at a module that builds the store and
|
|
29
|
+
exports its names, and let Vite load the packages — in dev and in the build — or Node loads them and
|
|
30
|
+
cannot find the store:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// astro.config.mjs
|
|
34
|
+
vite: {
|
|
35
|
+
resolve: { alias: { '@nstarkman/research-store': fileURLToPath(new URL('./src/store.js', import.meta.url)) } },
|
|
36
|
+
ssr: { noExternal: [/^@nstarkman\//] }, // dev
|
|
37
|
+
environments: { prerender: { resolve: { noExternal: [/^@nstarkman\//] } } }, // build (Astro 7)
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
// src/store.js
|
|
43
|
+
import { createStore } from '@nstarkman/research-kit/store.js';
|
|
44
|
+
import snapshot from '../card.json';
|
|
45
|
+
export const store = createStore(snapshot);
|
|
46
|
+
export const { items, lists, config, byType, resolve, authors, links /* … every name of the store */ } = store;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then `<Publication item={resolve(id)} abstract card="paperSite" />` and `<CollabMap />`. The page
|
|
50
|
+
needs `@nstarkman/site-layout`'s stylesheet, which carries the card's rules.
|
|
51
|
+
|
|
52
|
+
## Versions
|
|
53
|
+
|
|
54
|
+
`YYYYMMDD.0.N`, the four packages together; fixes are backported to every release with the bug.
|
|
55
|
+
See `CHANGELOG.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nstarkman/research-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "20261023.0.1",
|
|
4
|
+
"description": "The nstarkman.space card, collaborator map and data resolver, at one version.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Nathaniel Starkman",
|
|
8
|
+
"homepage": "https://nstarkman.space",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/nstarman/nstarman.github.io.git",
|
|
12
|
+
"directory": "packages/research-kit"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"astro-component"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
"./*": "./src/*"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src",
|
|
22
|
+
"CHANGELOG.md"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@nstarkman/data-resolver": "20261023.0.1",
|
|
26
|
+
"@nstarkman/card-builder": "20261023.0.1",
|
|
27
|
+
"@nstarkman/collaborator-map": "20261023.0.1"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/Card.astro
ADDED
package/src/collect.js
ADDED
package/src/readers.js
ADDED
package/src/store.js
ADDED