@specsure/knowledge 0.0.0-stage → 0.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/LICENSE +18 -0
- package/README.md +33 -2
- package/knowledge.json +16 -0
- package/package.json +12 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Specsure knowledge pack — license (DRAFT, not reviewed by a lawyer)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Adam Reznik. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This package ("the Pack") is data, not software, and is not covered by the MIT license of dsgraph.
|
|
6
|
+
|
|
7
|
+
You may use the Pack, free of charge, only together with dsgraph (the @dsgraph/* packages, the
|
|
8
|
+
dsgraph CLI, MCP server and GitHub Action), in any project, commercial or not.
|
|
9
|
+
|
|
10
|
+
You may not:
|
|
11
|
+
- distribute the Pack, or any part or derivative of it, on its own or with software other than
|
|
12
|
+
dsgraph;
|
|
13
|
+
- use the Pack, or output produced mainly to extract it, to build, train, tune or evaluate other
|
|
14
|
+
tools, datasets or models;
|
|
15
|
+
- remove this notice.
|
|
16
|
+
|
|
17
|
+
The Pack is provided "as is", without warranty of any kind. In no event shall the author be liable
|
|
18
|
+
for any claim, damages or other liability arising from the Pack or its use.
|
package/README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @specsure/knowledge
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The knowledge pack for dsgraph (`dsgraph/knowledge@1`): words design systems name things by, beyond
|
|
4
|
+
the neutral vocabulary built into the engine. Private source; published to npm under its own
|
|
5
|
+
license (LICENSE), separately from the MIT engine. See `strategy/Открытое и закрытое.md`.
|
|
6
|
+
|
|
7
|
+
## What is in it
|
|
8
|
+
|
|
9
|
+
- `vocabulary.states` — words in token names that name a state (`pressed` → `active`).
|
|
10
|
+
- `vocabulary.rest` — words that name the resting state (`idle`).
|
|
11
|
+
- Later: role synonyms, abbreviations (`btn` → `button`), migration maps, thresholds — derived from
|
|
12
|
+
the corpus, not written by hand.
|
|
13
|
+
|
|
14
|
+
Only words that are not in `DEFAULT_VOCABULARY` (`packages/dsgraph-core/src/knowledge.ts`) belong
|
|
15
|
+
here; the pack adds, never replaces.
|
|
16
|
+
|
|
17
|
+
## How dsgraph finds it
|
|
18
|
+
|
|
19
|
+
`loadKnowledge` in `@dsgraph/cli` (used by `dsgraph check` and `dsgraph-mcp`) reads
|
|
20
|
+
`@specsure/knowledge/knowledge.json` when the package is installed next to dsgraph or in the
|
|
21
|
+
project. `DSGRAPH_KNOWLEDGE=<file>` reads another pack, `DSGRAPH_KNOWLEDGE=off` none.
|
|
22
|
+
|
|
23
|
+
Try it before publishing:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
DSGRAPH_KNOWLEDGE=../internal/knowledge/knowledge.json npx dsgraph check ./tokens --code ./src
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Publishing
|
|
30
|
+
|
|
31
|
+
1. Bump `version` in both `package.json` and `knowledge.json`.
|
|
32
|
+
2. `npm publish` from this folder (Adam, 2FA).
|
|
33
|
+
3. First publish only: add `"@specsure/knowledge": "^0.1.0"` to the dependencies of `@dsgraph/cli`
|
|
34
|
+
and `@dsgraph/mcp`, and bundle the pack into the Action and the site.
|
package/knowledge.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "dsgraph/knowledge@1",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"vocabulary": {
|
|
5
|
+
"states": {
|
|
6
|
+
"hovered": "hover",
|
|
7
|
+
"focused": "focus",
|
|
8
|
+
"pressed": "active",
|
|
9
|
+
"press": "active",
|
|
10
|
+
"inactive": "disabled",
|
|
11
|
+
"checked": "selected",
|
|
12
|
+
"current": "selected"
|
|
13
|
+
},
|
|
14
|
+
"rest": ["idle", "normal", "enabled"]
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specsure/knowledge",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Specsure's knowledge pack for dsgraph: how design systems name things",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"author": "Adam Reznik",
|
|
7
|
+
"homepage": "https://specsure.vercel.app",
|
|
8
|
+
"files": ["knowledge.json", "LICENSE"],
|
|
9
|
+
"exports": {
|
|
10
|
+
"./knowledge.json": "./knowledge.json",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": { "access": "public" }
|
|
14
|
+
}
|