@weborigami/origami 0.3.4-jse.9 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weborigami/origami",
3
- "version": "0.3.4-jse.9",
3
+ "version": "0.4.0",
4
4
  "description": "Web Origami language, CLI, framework, and server",
5
5
  "type": "module",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  "typescript": "5.8.2"
18
18
  },
19
19
  "dependencies": {
20
- "@weborigami/async-tree": "0.3.4-jse.9",
20
+ "@weborigami/async-tree": "0.4.0",
21
21
  "@weborigami/json-feed-to-rss": "1.0.0",
22
- "@weborigami/language": "0.3.4-jse.9",
23
- "@weborigami/types": "0.3.4-jse.9",
22
+ "@weborigami/language": "0.4.0",
23
+ "@weborigami/types": "0.4.0",
24
24
  "css-tree": "3.1.0",
25
25
  "exif-parser": "0.1.12",
26
26
  "graphviz-wasm": "3.0.2",
package/src/dev/dev.js CHANGED
@@ -1,3 +1,5 @@
1
+ export { default as yaml } from "../origami/yaml.js";
2
+ export { default as indexPage } from "../site/indexPage.js";
1
3
  export { default as clear } from "../tree/clear.js";
2
4
  export { default as keys } from "../tree/keys.js";
3
5
  export { default as breakpoint } from "./breakpoint.js";
@@ -38,7 +38,11 @@ function removeDocumentPath(path) {
38
38
  function selectMode(newMode) {
39
39
  const currentMode = getModeFromLocation();
40
40
  if (newMode !== currentMode) {
41
- let newPath = removeDocumentPath(frame.contentDocument.location.pathname);
41
+ const location = frame.contentDocument.location;
42
+ let newPath =
43
+ location.href === "about:blank"
44
+ ? ""
45
+ : removeDocumentPath(location.pathname);
42
46
  const currentExtension = modes[currentMode];
43
47
  if (currentExtension && newPath.endsWith(currentExtension)) {
44
48
  // Remove the current extension.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1" />
6
6
  <title>Web Origami Explorer</title>
7
7
  <style>${ <explore.css> }</style>
8
- <script>${ <explore.js.inline> }</script>
8
+ <script>${ <explore.inline.js> }</script>
9
9
  </head>
10
10
  <body>
11
11
  <nav>
@@ -43,7 +43,7 @@ export default {
43
43
  ...config,
44
44
  };
45
45
 
46
- const mode = options.mode ?? "shell";
46
+ const mode = options.mode ?? "program";
47
47
  const fn = compiler(source, { globals, mode });
48
48
 
49
49
  let result = await fn.call(parent);