eyeling 1.27.3 → 1.27.4

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/HANDBOOK.md CHANGED
@@ -3851,7 +3851,9 @@ The playground also exposes configuration toggles that are especially useful for
3851
3851
  - **RDF/TriG compatibility**, which mirrors command-line `-r, --rdf` for RDF surface syntax and message-log replay,
3852
3852
  - **stream RDF Messages**, which mirrors `--stream-messages` under RDF mode and runs the editor rules over one RDF Message at a time.
3853
3853
 
3854
- For streamed RDF Messages in the playground, put the extraction rules and any small background knowledge in the editor, then provide the large RDF Message Log through the **RDF Message Log URL** field. The URL is preserved in compact share links. A pasted message log in the editor is still useful for small teaching examples, but the URL field is the intended path for large logs because it lets the worker fetch and parse the stream incrementally rather than asking CodeMirror to hold the log text.
3854
+ For streamed RDF Messages in the playground, put the extraction rules and any small background knowledge in the editor, then provide the large RDF Message Log through the **RDF Message Log URL** field. The URL is preserved in compact share links. A pasted message log in the editor is still useful for small teaching examples, but the URL field is the intended path for large logs because it lets the worker fetch and parse the stream incrementally rather than asking CodeMirror to hold the log text. URL fetches follow HTTP redirects, so short, stable, or repository URLs can redirect to the actual raw resource while the final URL is still used for base handling where needed.
3855
+
3856
+ The layout is responsive: on small screens the URL fields and action buttons stack vertically, controls remain tap-friendly, and the editor/output panes scroll internally when their height is capped. That keeps the playground useful on phones for opening shared links, changing toggles, and running small or URL-backed streaming examples.
3855
3857
 
3856
3858
  Together these choices make the playground better suited to live explanation, teaching, and debugging than a minimal browser wrapper would be.
3857
3859
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.27.3",
3
+ "version": "1.27.4",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [
@@ -96,6 +96,15 @@ function startStaticServer(rootDir) {
96
96
  return;
97
97
  }
98
98
 
99
+ if (pathname === '/redirect/playground-stream-messages.txt') {
100
+ res.writeHead(302, {
101
+ Location: '/test/fixtures/playground-stream-messages.txt',
102
+ 'Cache-Control': 'no-store',
103
+ });
104
+ res.end();
105
+ return;
106
+ }
107
+
99
108
  if (pathname === '/' || pathname === '') pathname = '/playground.html';
100
109
  // Prevent directory traversal.
101
110
  let fsPath = path.resolve(rootDir, '.' + pathname);
@@ -1132,7 +1141,7 @@ ${JSON.stringify(last, null, 2)}`);
1132
1141
  assert.equal(logQueryTurtle.sourceHidden, false, 'Expected Turtle log:query output to show source directly');
1133
1142
  endTest();
1134
1143
 
1135
- beginTest('playground streams RDF Messages from a URL while keeping rules in the editor');
1144
+ beginTest('playground follows redirects while streaming RDF Messages from a URL');
1136
1145
  const streamMessageRules = `@prefix : <urn:test#> .
1137
1146
  @prefix eymsg: <https://eyereasoner.github.io/eyeling/vocab/message#> .
1138
1147
  @prefix log: <http://www.w3.org/2000/10/swap/log#> .
@@ -1146,7 +1155,7 @@ ${JSON.stringify(last, null, 2)}`);
1146
1155
  }.
1147
1156
  `;
1148
1157
  await setProgram(streamMessageRules);
1149
- await setStreamMessageUrlMode(started.baseUrl + '/test/fixtures/playground-stream-messages.txt');
1158
+ await setStreamMessageUrlMode(started.baseUrl + '/redirect/playground-stream-messages.txt');
1150
1159
  await clickRun();
1151
1160
  const streamedMessages = await waitForState(
1152
1161
  'URL-backed RDF Message stream completion',