@panomc/theme-core 1.3.0-dev.3 → 1.3.0-dev.5
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.
|
@@ -48,6 +48,15 @@ const defaultExportSpecs = new Set([
|
|
|
48
48
|
// (and a warning) so the generator keeps working; it fills in on the next run.
|
|
49
49
|
const pendingSpecs = new Set(["@panomc/sdk/controllers"]);
|
|
50
50
|
|
|
51
|
+
// Exports that are live `let` bindings in their module and get their value only after the
|
|
52
|
+
// shim has run: `svelte/internal/client` sets `window` / `document` in `init_operations()` on
|
|
53
|
+
// the first mount. A `const` copy would stay `undefined` forever (compiled `<svelte:window>` /
|
|
54
|
+
// `<svelte:document>` read them, so such a plugin page failed to mount). Once set they are the
|
|
55
|
+
// browser's own globals, so the shim falls back to those.
|
|
56
|
+
const liveGlobalFallbacks = {
|
|
57
|
+
"svelte/internal/client": { window: "globalThis.window", document: "globalThis.document" },
|
|
58
|
+
};
|
|
59
|
+
|
|
51
60
|
const identifierRe = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
52
61
|
|
|
53
62
|
// Names that parse as IdentifierName but cannot be declared with `const` — they must
|
|
@@ -133,6 +142,8 @@ function renderShim(spec, exportNames) {
|
|
|
133
142
|
for (const name of exportNames) {
|
|
134
143
|
if (name === "default") {
|
|
135
144
|
lines.push(`export default m.default;`);
|
|
145
|
+
} else if (liveGlobalFallbacks[spec]?.[name]) {
|
|
146
|
+
lines.push(`export const ${name} = m.${name} ?? ${liveGlobalFallbacks[spec][name]};`);
|
|
136
147
|
} else if (identifierRe.test(name) && !reservedWords.has(name)) {
|
|
137
148
|
lines.push(`export const ${name} = m.${name};`);
|
|
138
149
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panomc/theme-core",
|
|
3
|
-
"version": "1.3.0-dev.
|
|
3
|
+
"version": "1.3.0-dev.5",
|
|
4
4
|
"description": "The Pano theme engine: hooks factories, plugin engine, headless page controllers, default views and the theme CLI. Themes depend on this package instead of forking vanilla-theme.",
|
|
5
5
|
"author": "PanoMC",
|
|
6
6
|
"pano": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@fortawesome/fontawesome-free": "^6.7.2"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@panomc/sdk": "^2.0.0-dev.
|
|
64
|
+
"@panomc/sdk": "^2.0.0-dev.5",
|
|
65
65
|
"@sveltejs/adapter-node": "^6.0.0",
|
|
66
66
|
"@sveltejs/kit": "^3.1.0",
|
|
67
67
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"vite": "^8.3.4"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@panomc/sdk": "2.0.0-dev.
|
|
74
|
+
"@panomc/sdk": "2.0.0-dev.5",
|
|
75
75
|
"@sveltejs/adapter-node": "^6.0.0",
|
|
76
76
|
"@sveltejs/kit": "^3.1.0",
|
|
77
77
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
style="background-position: center; height: {themeSettings.headerHeight || '256'}px;">
|
|
12
12
|
<a href="/">
|
|
13
13
|
<div
|
|
14
|
-
class="position-absolute {logoPositionClasses} px-3"
|
|
14
|
+
class="position-absolute {logoPositionClasses} px-3 pe-none"
|
|
15
15
|
style="padding-top: 80px; padding-bottom: 40px;"
|
|
16
16
|
class:d-none={themeSettings.logoVisibility === false}>
|
|
17
17
|
<img
|
|
18
18
|
alt={$_("components.header.alt")}
|
|
19
|
-
class={logoAnimationClass}
|
|
19
|
+
class="pano-header__image pe-auto {logoAnimationClass}"
|
|
20
20
|
src="/api/v1/website-logo?hash={$session.siteInfo.websiteLogoHash}"
|
|
21
21
|
style="object-fit: contain; width: {themeSettings.logoWidth || '256'}px; height: {themeSettings.logoHeight ? themeSettings.logoHeight + 'px' : 'auto'}; max-width: 100%;"
|
|
22
22
|
title={$session.siteInfo.websiteName} />
|