Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
strategy:
matrix:
node-version:
- 18.x
- 20.x
- 22.x
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pids

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
dist

# Coverage directory used by tools like istanbul
coverage
Expand Down
33 changes: 12 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
# Wrap TTL files into JS files for bundling with library

# unused: trackerInstancesForm.js
,all : dist/wf.js dist/trackerSettingsForm.js dist/ui.js

,all : wf.js trackerSettingsForm.js ui.js

#individualForm.js : individualForm.ttl
# (echo 'module.exports = `' ; cat individualForm.ttl; echo '`') > individualForm.js

wf.ttl:
src/wf.ttl:
curl http://www.w3.org/2005/01/wf/flow.n3 > wf0.ttl
expand -t 4 wf0.ttl > wf.ttl
expand -t 4 wf0.ttl > src/ wf.ttl

# find . -name "ui.ttl" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
# find . -name "src/ui.ttl" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done

wf.js : wf.ttl
(echo 'module.exports = `' ; cat wf.ttl; echo '`') > wf.js
dist/wf.js : src/wf.ttl
(echo 'module.exports = `' ; cat src/wf.ttl; echo '`') > dist/wf.js

ui.ttl:
src/ui.ttl:
curl http://www.w3.org/ns/ui.n3 > ui0.ttl
expand -t 4 ui0.ttl > ui.ttl

expand -t 4 ui0.ttl > src/ui.ttl

ui.js : ui.ttl
(echo 'module.exports = `' ; cat ui.ttl; echo '`') > ui.js

dist/ui.js : src/ui.ttl
(echo 'module.exports = `' ; cat src/ui.ttl; echo '`') > dist/ui.js

trackerInstancesForm.js : trackerInstancesForm.ttl
(echo 'export const trackerInstancesFormText = `' ; cat trackerInstancesForm.ttl; echo '`') > trackerInstancesForm.js
# ends

trackerSettingsForm.js : trackerSettingsForm.ttl
(echo 'export const trackerSettingsFormText = `' ; cat trackerSettingsForm.ttl; echo '`') > trackerSettingsForm.js
dist/trackerSettingsForm.js : src/trackerSettingsForm.ttl
(echo 'export const trackerSettingsFormText = `' ; cat src/trackerSettingsForm.ttl; echo '`') > dist/trackerSettingsForm.js
# ends
17 changes: 12 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = {
plugins: [
["@babel/plugin-transform-runtime"]
]
};
export default {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
}
13 changes: 6 additions & 7 deletions dev/context.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { DataBrowserContext, PaneRegistry } from "pane-registry";
import { LiveStore, solidLogicSingleton, store } from "solid-logic";
import { solidLogicSingleton, store } from 'solid-logic'

export const context = {
session: {
store: store,
store,
paneRegistry: {
byName: (name) => {
return // longChatPane
// longChatPane
}
},
logic : solidLogicSingleton
logic: solidLogicSingleton
},
dom: document,
getOutliner: () => null,
};
}

export const fetcher = store.fetcher;
export const fetcher = store.fetcher
37 changes: 18 additions & 19 deletions dev/index.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import { sym } from "rdflib";
import { default as pane } from "..";
import { context, fetcher } from "./context";
import { authn, authSession } from "solid-logic";
import * as UI from "solid-ui";
import { sym } from 'rdflib'
import pane from '../src/issuePane'
import { context, fetcher } from './context'
import { authn, authSession } from 'solid-logic'
import * as UI from 'solid-ui'

const loginBanner = document.getElementById("loginBanner");
const webId = document.getElementById("webId");
const loginBanner = document.getElementById('loginBanner')
const webId = document.getElementById('webId')

loginBanner.appendChild(UI.login.loginStatusBox(document, null, {}));
loginBanner.appendChild(UI.login.loginStatusBox(document, null, {}))

async function finishLogin() {
await authSession.handleIncomingRedirect();
const session = authSession;
async function finishLogin () {
await authSession.handleIncomingRedirect()
const session = authSession
if (session.info.isLoggedIn) {
// Update the page with the status.
webId.innerHTML = "Logged in as: " + authn.currentUser().uri;
webId.innerHTML = 'Logged in as: ' + authn.currentUser().uri
} else {
webId.innerHTML = "";
webId.innerHTML = ''
}
}

finishLogin();

finishLogin()

// https://testingsolidos.solidcommunity.net/profile/card#me
// https://timbl.solidcommunity.net/profile/card#me
Expand All @@ -34,9 +33,9 @@ finishLogin();

// const targetURIToShow = "https://timbl.com/timbl/Automation/mother/tracker.n3#mother"

const targetURIToShow = "http://localhost:8080/big-tracker.ttl#this"
const targetURIToShow = 'http://localhost:8080/big-tracker.ttl#this'

fetcher.load(targetURIToShow).then(() => {
const app = pane.render(sym(targetURIToShow), context);
document.getElementById("app").replaceWith(app);
});
const app = pane.render(sym(targetURIToShow), context)
document.getElementById('app').replaceWith(app)
})
Loading
Loading