@eriknaslund/skiss 0.6.1 → 0.7.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/README.md +5 -1
- package/dist/cli.js +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,10 @@ CharacterPage @Community ~ Character # the community wiki's version
|
|
|
25
25
|
|
|
26
26
|
That is the whole language. Classes at column 0, fields indented under them, a handful of punctuation marks.
|
|
27
27
|
|
|
28
|
+
**Try it live:** <https://erik-naslund.github.io/skiss-playground/> draws a sketch as you type, shares it as a link and exports SVG, PNG and LinkML. Nothing to install, nothing leaves your browser.
|
|
29
|
+
|
|
30
|
+
**Let an assistant write it:** [`skills/skiss`](skills/skiss/SKILL.md) is an agent skill for Claude, a custom GPT or any assistant with a system prompt, so it writes valid Skiss and draws it, with or without the compiler at hand.
|
|
31
|
+
|
|
28
32
|
## Why
|
|
29
33
|
|
|
30
34
|
You sit down with someone who knows the domain. Within the hour you want a shared picture of it: what the things are, what they are called, which system owns them, how they hang together.
|
|
@@ -90,7 +94,7 @@ Editors that render Skiss live are separate projects built on this package. This
|
|
|
90
94
|
|
|
91
95
|
## Status
|
|
92
96
|
|
|
93
|
-
0.
|
|
97
|
+
0.7.0, published on npm as [`@eriknaslund/skiss`](https://www.npmjs.com/package/@eriknaslund/skiss). The language parses, resolves and diagnoses; `skiss diagram` draws it, `skiss compile` writes LinkML that the real LinkML toolchain validates in CI, and `skiss import` reads a LinkML schema back into a sketch. The library exports the same in both directions and is browser-safe.
|
|
94
98
|
|
|
95
99
|
The [specification](docs/SPEC.md) is at 0.3.1 and moves when the language does, which is not with every release. Not built: editing a projected schema so that what Skiss cannot express survives the edit (SPEC §8.1). [CHANGELOG.md](CHANGELOG.md) is what changed when.
|
|
96
100
|
|
package/dist/cli.js
CHANGED
|
@@ -1011,9 +1011,7 @@ function toMermaid(doc, opts) {
|
|
|
1011
1011
|
for (const field of cls.fields) {
|
|
1012
1012
|
const type = field.type;
|
|
1013
1013
|
if (type?.kind === "class") {
|
|
1014
|
-
lines.push(
|
|
1015
|
-
type.many ? ` ${from} "1" --> "*" ${type.name.text} : ${field.name.text}` : ` ${from} --> ${type.name.text} : ${field.name.text}`
|
|
1016
|
-
);
|
|
1014
|
+
lines.push(` ${from} --> ${type.name.text} : ${field.name.text}`);
|
|
1017
1015
|
}
|
|
1018
1016
|
if (field.joinsTo !== void 0) {
|
|
1019
1017
|
const { className, fieldName } = field.joinsTo;
|
|
@@ -1695,7 +1693,7 @@ function notYAML(error) {
|
|
|
1695
1693
|
}
|
|
1696
1694
|
|
|
1697
1695
|
// src/index.ts
|
|
1698
|
-
var VERSION = "0.
|
|
1696
|
+
var VERSION = "0.7.0";
|
|
1699
1697
|
|
|
1700
1698
|
// src/cli.ts
|
|
1701
1699
|
var HELP = `Usage: skiss <command> [options]
|
package/dist/index.d.ts
CHANGED
|
@@ -268,6 +268,6 @@ interface ResolvedDocument extends Document {
|
|
|
268
268
|
}
|
|
269
269
|
declare function resolve(doc: Document): ResolvedDocument;
|
|
270
270
|
|
|
271
|
-
declare const VERSION = "0.
|
|
271
|
+
declare const VERSION = "0.7.0";
|
|
272
272
|
|
|
273
273
|
export { type ClassNode, type CompileOptions, type CompileResult, type Diagnostic, type DiagnosticCode, type Document, type Dropped, type FieldNode, type FromLinkMLResult, type ImportResult, type JoinRef, type LinkMLAnnotations, type LinkMLAttribute, type LinkMLClass, type LinkMLCompileOptions, type LinkMLEnum, type LinkMLOptions, type LinkMLSchema, type MermaidCompileOptions, type MermaidOptions, type Name, type Primitive, type ResolvedDocument, type SerializeFormat, type Severity, type Token, type TokenKind, type TypeRef, VERSION, compile, formatDiagnostic, formatDropped, fromLinkML, importLinkML, parse, resolve, serialize, toLinkML, toMermaid, toSkiss, tokenizeLine };
|
package/dist/index.js
CHANGED
|
@@ -1001,9 +1001,7 @@ function toMermaid(doc, opts) {
|
|
|
1001
1001
|
for (const field of cls.fields) {
|
|
1002
1002
|
const type = field.type;
|
|
1003
1003
|
if (type?.kind === "class") {
|
|
1004
|
-
lines.push(
|
|
1005
|
-
type.many ? ` ${from} "1" --> "*" ${type.name.text} : ${field.name.text}` : ` ${from} --> ${type.name.text} : ${field.name.text}`
|
|
1006
|
-
);
|
|
1004
|
+
lines.push(` ${from} --> ${type.name.text} : ${field.name.text}`);
|
|
1007
1005
|
}
|
|
1008
1006
|
if (field.joinsTo !== void 0) {
|
|
1009
1007
|
const { className, fieldName } = field.joinsTo;
|
|
@@ -1883,7 +1881,7 @@ function notYAML(error) {
|
|
|
1883
1881
|
}
|
|
1884
1882
|
|
|
1885
1883
|
// src/index.ts
|
|
1886
|
-
var VERSION = "0.
|
|
1884
|
+
var VERSION = "0.7.0";
|
|
1887
1885
|
export {
|
|
1888
1886
|
VERSION,
|
|
1889
1887
|
compile,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eriknaslund/skiss",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A text notation for sketching data models, compiled to LinkML",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@biomejs/biome": "^2.5.13",
|
|
44
|
-
"@mermaid-js/mermaid-cli": "^
|
|
44
|
+
"@mermaid-js/mermaid-cli": "^12.0.0",
|
|
45
45
|
"@types/node": "^26.6.1",
|
|
46
46
|
"jsdom": "^30.0.1",
|
|
47
47
|
"mermaid": "^12.0.0",
|