File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " solid-logic" ,
3- "version" : " 4.0.0 " ,
3+ "version" : " 4.0.1 " ,
44 "description" : " Core business logic of SolidOS" ,
55 "type" : " module" ,
66 "main" : " dist/solid-logic.js" ,
Original file line number Diff line number Diff line change 77< body >
88 < h1 > Solid Logic UMD Bundle Browser Test</ h1 >
99 < pre id ="output "> </ pre >
10- <!--- !!!--- first build dist with npm run build-dist ---!!! -->
11- <!-- Load solid-logic UMD bundle (adjust path if needed) -->
12- < script src ="../../dist/solid-logic.js "> </ script >
13- < script >
14- // Test if SolidLogic is available
10+ < script type ="importmap ">
11+ {
12+ "imports" : {
13+ "rdflib" : "https://esm.sh/rdflib" ,
14+ "solid-logic" : "https://esm.sh/solid-logic"
15+ }
16+ }
17+ </ script >
18+ < script type ="module ">
19+ import * as $rdf from "rdflib" ;
20+ import { solidLogicSingleton , store , authn } from "solid-logic" ;
1521 const output = document . getElementById ( 'output' ) ;
16- if ( window . SolidLogic ) {
17- output . textContent = 'SolidLogic loaded!' ;
18- // Example: test a function if available
19- // output.textContent += '\n' + window.SolidLogic.someFunction();
22+ if ( $rdf && solidLogicSingleton && store && authn ) {
23+ output . textContent = 'SolidLogic and rdflib loaded as ESM!' ;
24+ // Example usage
25+ output . textContent += '\nStore: ' + ( store ? 'available' : 'missing' ) ;
26+ output . textContent += '\nAuthentication: ' + ( authn . currentUser ? authn . currentUser ( ) : 'missing' ) ;
2027 } else {
21- output . textContent = 'SolidLogic NOT loaded!' ;
28+ output . textContent = 'SolidLogic or rdflib NOT loaded!' ;
2229 }
2330 </ script >
2431</ body >
You can’t perform that action at this time.
0 commit comments