@nextsparkjs/core 0.1.0-beta.57 → 0.1.0-beta.58
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/dist/styles/classes.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/* =============================================
|
|
2
2
|
GLOBAL STYLES - Import from Active Theme
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
This file imports styles from the active theme.
|
|
5
|
+
DO NOT edit directly - all styles are in:
|
|
6
6
|
contents/themes/{theme}/styles/globals.css
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
This import is AUTO-SYNCED by the registry build process
|
|
9
|
+
to match NEXT_PUBLIC_ACTIVE_THEME from your .env file.
|
|
10
|
+
|
|
11
|
+
To customize colors, typography and tokens, edit
|
|
12
|
+
the globals.css file in your active theme.
|
|
10
13
|
============================================= */
|
|
11
14
|
|
|
12
|
-
@import "../contents/themes/
|
|
15
|
+
@import "../contents/themes/starter/styles/globals.css";
|
package/package.json
CHANGED
|
@@ -83,6 +83,7 @@ import {
|
|
|
83
83
|
cleanupOrphanedTemplates
|
|
84
84
|
} from './registry/post-build/index.mjs'
|
|
85
85
|
import { watchContents } from './registry/watch.mjs'
|
|
86
|
+
import { syncAppGlobalsCss } from './theme.mjs'
|
|
86
87
|
|
|
87
88
|
// ==================== Registry File Generation ====================
|
|
88
89
|
|
|
@@ -159,6 +160,12 @@ export async function buildRegistries(projectRoot = null) {
|
|
|
159
160
|
const startTime = Date.now()
|
|
160
161
|
|
|
161
162
|
try {
|
|
163
|
+
// Sync app/globals.css to import from active theme
|
|
164
|
+
// This ensures the import path matches NEXT_PUBLIC_ACTIVE_THEME
|
|
165
|
+
if (CONFIG.activeTheme) {
|
|
166
|
+
syncAppGlobalsCss(CONFIG, CONFIG.activeTheme)
|
|
167
|
+
}
|
|
168
|
+
|
|
162
169
|
// Initialize parent-child discovery FIRST (needed for dynamic parseChildEntity)
|
|
163
170
|
log('→ Initializing dynamic parent-child discovery...', 'info')
|
|
164
171
|
await discoverParentChildRelations(CONFIG)
|
package/scripts/build/theme.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function getActiveTheme() {
|
|
|
42
42
|
* @param {string} activeTheme - Active theme name
|
|
43
43
|
* @returns {boolean} - True if file was updated, false if already correct
|
|
44
44
|
*/
|
|
45
|
-
function syncAppGlobalsCss(config, activeTheme) {
|
|
45
|
+
export function syncAppGlobalsCss(config, activeTheme) {
|
|
46
46
|
const appGlobalsCssPath = path.join(config.projectRoot, 'app', 'globals.css')
|
|
47
47
|
|
|
48
48
|
// Calculate the correct relative path from app/ to theme globals.css
|
|
@@ -423,21 +423,25 @@ async function watchTheme() {
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
// Main execution
|
|
427
|
-
const
|
|
426
|
+
// Main execution - only run when invoked directly, not when imported
|
|
427
|
+
const isMainScript = process.argv[1] && import.meta.url.endsWith(process.argv[1].split('/').pop())
|
|
428
428
|
|
|
429
|
-
|
|
429
|
+
if (isMainScript) {
|
|
430
|
+
const watchMode = process.argv.includes('--watch') || process.argv.includes('-w')
|
|
430
431
|
|
|
431
|
-
|
|
432
|
-
await buildTheme()
|
|
433
|
-
console.log('✅ Theme build process completed successfully!')
|
|
432
|
+
console.log('🎨 Starting theme build process...')
|
|
434
433
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
console.log('
|
|
438
|
-
|
|
434
|
+
try {
|
|
435
|
+
await buildTheme()
|
|
436
|
+
console.log('✅ Theme build process completed successfully!')
|
|
437
|
+
|
|
438
|
+
if (watchMode) {
|
|
439
|
+
console.log()
|
|
440
|
+
console.log('👀 Starting watch mode...')
|
|
441
|
+
await watchTheme()
|
|
442
|
+
}
|
|
443
|
+
} catch (error) {
|
|
444
|
+
console.error('❌ Theme build process failed:', error)
|
|
445
|
+
process.exit(1)
|
|
439
446
|
}
|
|
440
|
-
} catch (error) {
|
|
441
|
-
console.error('❌ Theme build process failed:', error)
|
|
442
|
-
process.exit(1)
|
|
443
447
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/* =============================================
|
|
2
2
|
GLOBAL STYLES - Import from Active Theme
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
This file imports styles from the active theme.
|
|
5
|
+
DO NOT edit directly - all styles are in:
|
|
6
6
|
contents/themes/{theme}/styles/globals.css
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
This import is AUTO-SYNCED by the registry build process
|
|
9
|
+
to match NEXT_PUBLIC_ACTIVE_THEME from your .env file.
|
|
10
|
+
|
|
11
|
+
To customize colors, typography and tokens, edit
|
|
12
|
+
the globals.css file in your active theme.
|
|
10
13
|
============================================= */
|
|
11
14
|
|
|
12
|
-
@import "../contents/themes/
|
|
15
|
+
@import "../contents/themes/starter/styles/globals.css";
|