@uniweb/runtime 0.5.17 → 0.5.19
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 +2 -2
- package/src/index.jsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/runtime",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.19",
|
|
4
4
|
"description": "Minimal runtime for loading Uniweb foundations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"node": ">=20.19"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@uniweb/core": "0.4.
|
|
34
|
+
"@uniweb/core": "0.4.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@vitejs/plugin-react": "^4.5.2",
|
package/src/index.jsx
CHANGED
|
@@ -24,8 +24,6 @@ import { executeFetchClient } from './data-fetcher-client.js'
|
|
|
24
24
|
import { ChildBlocks } from './components/PageRenderer.jsx'
|
|
25
25
|
import WebsiteRenderer from './components/WebsiteRenderer.jsx'
|
|
26
26
|
import ErrorBoundary from './components/ErrorBoundary.jsx'
|
|
27
|
-
import Layout from './components/Layout.jsx'
|
|
28
|
-
import Blocks from './components/Blocks.jsx'
|
|
29
27
|
|
|
30
28
|
// Core factory from @uniweb/core
|
|
31
29
|
import { createUniweb } from '@uniweb/core'
|
|
@@ -107,7 +105,9 @@ async function loadFoundationCSS(url) {
|
|
|
107
105
|
*/
|
|
108
106
|
async function loadFoundation(source) {
|
|
109
107
|
const url = typeof source === 'string' ? source : source.url
|
|
110
|
-
|
|
108
|
+
// Auto-derive CSS URL from JS URL by convention: foundation.js → assets/foundation.css
|
|
109
|
+
const cssUrl = typeof source === 'object' ? source.cssUrl
|
|
110
|
+
: url.replace(/[^/]+\.js$/, 'assets/foundation.css')
|
|
111
111
|
|
|
112
112
|
console.log(`[Runtime] Loading foundation from: ${url}`)
|
|
113
113
|
|