@weborigami/origami 0.0.42 → 0.0.43
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/exports/buildExports.js
CHANGED
|
@@ -15,7 +15,7 @@ const specialBuiltinNames = {
|
|
|
15
15
|
|
|
16
16
|
// Top-level template for the export file
|
|
17
17
|
const templateText = `=\`// This file is generated by running buildExports.js -- do not edit by hand.
|
|
18
|
-
{
|
|
18
|
+
\${ _ }\``;
|
|
19
19
|
|
|
20
20
|
// Generate a top-level export file for the entire project. For each .js file in
|
|
21
21
|
// the given source tree, generate an appropriate statement that includes that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/origami",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Web Origami language, CLI, framework, and server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"typescript": "5.3.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@weborigami/async-tree": "
|
|
23
|
-
"@weborigami/language": "
|
|
24
|
-
"@weborigami/types": "0.0.
|
|
22
|
+
"@weborigami/async-tree": "0.0.43",
|
|
23
|
+
"@weborigami/language": "0.0.43",
|
|
24
|
+
"@weborigami/types": "0.0.43",
|
|
25
25
|
"graphviz-wasm": "3.0.1",
|
|
26
26
|
"highlight.js": "11.9.0",
|
|
27
27
|
"marked": "11.1.1",
|
|
@@ -27,7 +27,9 @@ export default function resize(param1, param2) {
|
|
|
27
27
|
options = param2;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
// Include `rotate()` to auto-rotate according to EXIF data.
|
|
31
|
+
const transform = (buffer) =>
|
|
32
|
+
sharp(buffer).rotate().resize(options).toBuffer();
|
|
31
33
|
|
|
32
34
|
return buffer ? transform(buffer) : transform;
|
|
33
35
|
}
|
package/src/builtins/@inline.js
CHANGED
|
@@ -4,7 +4,7 @@ import assertScopeIsDefined from "../misc/assertScopeIsDefined.js";
|
|
|
4
4
|
import unpackOrigamiExpression from "./@loaders/ori.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Inline any Origami expressions found inside {
|
|
7
|
+
* Inline any Origami expressions found inside ${...} placeholders in the input
|
|
8
8
|
* text.
|
|
9
9
|
*
|
|
10
10
|
* @typedef {import("@weborigami/types").AsyncTree} AsyncTree
|
package/src/builtins/@sitemap.js
CHANGED
|
@@ -5,11 +5,11 @@ import paths from "./@paths.js";
|
|
|
5
5
|
|
|
6
6
|
const templateText = `=\`<?xml version="1.0" encoding="UTF-8"?>
|
|
7
7
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
8
|
-
{
|
|
8
|
+
\${ @map(=\`
|
|
9
9
|
<url>
|
|
10
|
-
<loc
|
|
10
|
+
<loc>\${ _ }</loc>
|
|
11
11
|
</url>
|
|
12
|
-
\`)(_) }
|
|
12
|
+
\`)(_) }
|
|
13
13
|
</urlset>
|
|
14
14
|
\`
|
|
15
15
|
`;
|
package/src/misc/explore.ori
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
6
|
<title>Web Origami Explorer</title>
|
|
7
|
-
<style
|
|
8
|
-
<script
|
|
7
|
+
<style>${ explore.css }</style>
|
|
8
|
+
<script>${ explore.js.inline }</script>
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<nav>
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
{{ @map(=`
|
|
20
20
|
<ul>
|
|
21
|
-
<h2
|
|
21
|
+
<h2>${ _/name }</h2>
|
|
22
22
|
{{ @map(=`
|
|
23
23
|
<li>
|
|
24
|
-
<a href="./!@explore
|
|
24
|
+
<a href="./!@explore/${ _ }" target="frame">${ _ }</a>
|
|
25
25
|
</li>
|
|
26
26
|
`)(_/keys) }}
|
|
27
27
|
</ul>
|
package/src/misc/treeDot.js
CHANGED
|
@@ -154,7 +154,11 @@ async function statements(tree, nodePath, nodeLabel, options) {
|
|
|
154
154
|
for (const key in nodes) {
|
|
155
155
|
const node = nodes[key];
|
|
156
156
|
const icon = node.isError ? "⚠️ " : "";
|
|
157
|
-
|
|
157
|
+
// GraphViz has trouble rendering DOT nodes whose labels contain ellipsis
|
|
158
|
+
// characters, so we map those to three periods. GraphViz appears to turn
|
|
159
|
+
// those back into ellipsis characters when rendering the graph.
|
|
160
|
+
const text = node.label.replace(/…/g, "...");
|
|
161
|
+
const label = `label="${icon}${text}"`;
|
|
158
162
|
const color = node.isError ? `; color="red"` : "";
|
|
159
163
|
const fill = node.isError ? `; fillcolor="#FFF4F4"` : "";
|
|
160
164
|
const destPath = nodePath ? `${nodePath}/${key}` : key;
|