Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
21 changes: 11 additions & 10 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@
if (typeof UI !== 'undefined') window.UI = UI;
</script>
<style>
body {
margin: 10%;
}
input {
background-color: #eef;
padding: 0.5em;
border: 0.5em solid white;
font-size: 120%;
}
body {
margin: 0;
font-family: sans-serif;
}
h1 {
padding: 0.5rem;
margin: 0;
color: #666;
}

</style>
</head>
<body>
<h1>Solid Pane Tester</h1>
<div id="loginBanner"></div>
<p>
A handy tool for pane developers. Put your JS or TS file in dev/pane/.
Run <tt>renderPane('https://solidos.solidcommunity.net/profile/card#me')</tt> from the console.
Run <tt>renderPane('https://testingsolidos.solidcommunity.net/profile/card#me')</tt> from the console.
Don't forget that the resource owner needs to add http://localhost:9000 as a trusted app.
</p>
<div id="render">HTML element from pane.render will be inserted here ...</div>
Expand Down
20 changes: 7 additions & 13 deletions dev/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { solidLogicSingleton, store, authSession } from 'solid-logic'
import { getOutliner } from '../src'
import Pane from 'profile-pane'

// FIXME:
window.$rdf = $rdf

async function renderPane (uri: string) {
if (!uri) {
console.log("usage renderPane('http://example.com/#this')", uri)
Expand All @@ -28,10 +25,11 @@ async function renderPane (uri: string) {
logic: solidLogicSingleton
}
}
const options = {}
console.log(subject, Pane)

console.log(subject, context)
const icon = createIconElement(Pane)
const paneDiv = Pane.render(subject, context, options)
const paneDiv = Pane.render(subject, context)

const target = document.getElementById('render')
target.innerHTML = ''
target.appendChild(icon)
Expand All @@ -46,12 +44,6 @@ function createIconElement (Pane) {
return img
}

document.addEventListener('DOMContentLoaded', () => {
renderPane(
'https://solidos.solidcommunity.net/Team/SolidOs%20team%20chat/index.ttl#this'
)
})

window.onload = async () => {
console.log('document ready')
// registerPanes((cjsOrEsModule: any) => paneRegistry.register(cjsOrEsModule.default || cjsOrEsModule))
Expand All @@ -71,7 +63,8 @@ window.onload = async () => {
'loginBanner'
).innerHTML = `Logged in as ${session.info.webId} <button onclick="logout()">Log out</button>`
}
renderPane()
renderPane('https://testingsolidos.solidcommunity.net/profile/card#me')

}
window.logout = () => {
authSession.logout()
Expand All @@ -89,3 +82,4 @@ window.login = async function () {
}
};
(window as any).renderPane = renderPane
console.log("Pane at runtime:", Pane); window.Pane = Pane;
19 changes: 15 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export default [
{
ignores: [
'dist/**',
'dist-dev/**',
'lib/**',
'docs/**',
'node_modules/**',
'dev/**',
'dev-dist/**',
'coverage/**',
],
},
Expand Down Expand Up @@ -84,10 +84,21 @@ export default [
{
files: ['test/**/**/*.js', 'test/**/*.js'],
rules: {
// Code style - match TypeScript settings
semi: ['error', 'never'],
quotes: ['error', 'single'],
'no-console': 'off', // Allow console in tests
'no-undef': 'off', // Tests may define globals
}

// Strict checking - match TypeScript strictness
'no-console': 'warn',
'no-unused-vars': 'warn', // Match TypeScript noUnusedLocals: true
'no-undef': 'error',
strict: ['error', 'global'], // Match TypeScript alwaysStrict: true

// Additional strictness to match TypeScript behavior
'no-implicit-globals': 'error',
'prefer-const': 'error', // Encourage immutability
'no-var': 'error', // Use let/const only
'no-redeclare': 'error'
},
}
]
Loading
Loading