@nextsparkjs/core 0.1.0-beta.10 → 0.1.0-beta.12
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/components/dashboard/navigation/DynamicNavigation.d.ts.map +1 -1
- package/dist/components/dashboard/navigation/DynamicNavigation.js +16 -4
- package/dist/lib/entities/queries.d.ts.map +1 -1
- package/dist/lib/entities/queries.js +19 -2
- package/dist/styles/classes.json +1 -1
- package/dist/templates/app/dashboard/(main)/layout.tsx +22 -0
- package/package.json +12 -12
- package/scripts/build/docs-registry.mjs +0 -0
- package/scripts/create-theme.mjs +0 -0
- package/scripts/deploy/release-version.mjs +0 -0
- package/scripts/deploy/vercel-deploy.mjs +0 -0
- package/scripts/dev/watch-plugins.mjs +0 -0
- package/scripts/maintenance/update-core.mjs +0 -0
- package/scripts/setup/npm-postinstall.mjs +0 -0
- package/scripts/setup/setup-claude.mjs +0 -0
- package/scripts/validation/check-imports.sh +0 -0
- package/templates/app/dashboard/(main)/layout.tsx +22 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/navigation/DynamicNavigation.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AA0BnF,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,EAAE,wBAAwB,EAAE,CAAA;CACrC;AAyGD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAgB,EAChB,WAAW,EACX,QAAQ,EACT,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"DynamicNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/navigation/DynamicNavigation.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AA0BnF,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,EAAE,wBAAwB,EAAE,CAAA;CACrC;AAyGD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAgB,EAChB,WAAW,EACX,QAAQ,EACT,EAAE,sBAAsB,2CAoGxB;AAgDD,eAAe,iBAAiB,CAAA"}
|
|
@@ -92,22 +92,34 @@ function DynamicNavigation({
|
|
|
92
92
|
onItemClick,
|
|
93
93
|
entities
|
|
94
94
|
}) {
|
|
95
|
+
var _a2, _b;
|
|
95
96
|
const pathname = usePathname();
|
|
96
97
|
const t = useTranslations("navigation");
|
|
97
98
|
const hasCustomSections = customSidebarSections.length > 0;
|
|
99
|
+
console.log("[DynamicNavigation] entities count:", entities == null ? void 0 : entities.length);
|
|
100
|
+
if ((entities == null ? void 0 : entities.length) > 0) {
|
|
101
|
+
console.log("[DynamicNavigation] First entity:", {
|
|
102
|
+
slug: entities[0].slug,
|
|
103
|
+
enabled: entities[0].enabled,
|
|
104
|
+
hasUi: !!entities[0].ui,
|
|
105
|
+
ui: entities[0].ui,
|
|
106
|
+
showInMenu: (_b = (_a2 = entities[0].ui) == null ? void 0 : _a2.dashboard) == null ? void 0 : _b.showInMenu
|
|
107
|
+
});
|
|
108
|
+
}
|
|
98
109
|
const enabledEntities = useMemo(
|
|
99
110
|
() => entities.filter((entity) => {
|
|
100
|
-
var
|
|
101
|
-
return (entity == null ? void 0 : entity.enabled) && ((
|
|
111
|
+
var _a3, _b2;
|
|
112
|
+
return (entity == null ? void 0 : entity.enabled) && ((_b2 = (_a3 = entity == null ? void 0 : entity.ui) == null ? void 0 : _a3.dashboard) == null ? void 0 : _b2.showInMenu);
|
|
102
113
|
}),
|
|
103
114
|
[entities]
|
|
104
115
|
);
|
|
116
|
+
console.log("[DynamicNavigation] enabledEntities count:", enabledEntities == null ? void 0 : enabledEntities.length);
|
|
105
117
|
const entityItems = useMemo(
|
|
106
118
|
() => enabledEntities.map((entity) => {
|
|
107
|
-
var
|
|
119
|
+
var _a3;
|
|
108
120
|
const icon = Icons[entity.iconName] || Icons.Box;
|
|
109
121
|
return {
|
|
110
|
-
name: ((
|
|
122
|
+
name: ((_a3 = entity.names) == null ? void 0 : _a3.plural) || entity.slug,
|
|
111
123
|
href: `/dashboard/${entity.slug}`,
|
|
112
124
|
icon
|
|
113
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/lib/entities/queries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAElE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,GAAG,qBAAqB,CAAA;IAC5C,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,YAAY,CAAC,EAAE;QACb,SAAS,EAAE,MAAM,CAAA;QACjB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,SAAS,CAAC,EAAE,GAAG,CAAA;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,M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AAI,CAIzE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAEvE"}
|
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
let _cachedRegistry = null;
|
|
2
2
|
let _cachedMetadata = null;
|
|
3
3
|
function getRegistry() {
|
|
4
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4
5
|
if (_cachedRegistry) return _cachedRegistry;
|
|
5
6
|
try {
|
|
6
|
-
const
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const registryPath = path.join(process.cwd(), ".nextspark/registries/entity-registry");
|
|
9
|
+
const registry = require(registryPath);
|
|
7
10
|
_cachedRegistry = registry.ENTITY_REGISTRY;
|
|
8
11
|
_cachedMetadata = registry.ENTITY_METADATA;
|
|
12
|
+
const entityCount = Object.keys(_cachedRegistry || {}).length;
|
|
13
|
+
console.log(`[EntityQueries] Registry loaded successfully with ${entityCount} entities`);
|
|
14
|
+
if (entityCount > 0) {
|
|
15
|
+
const firstKey = Object.keys(_cachedRegistry)[0];
|
|
16
|
+
const firstEntry = _cachedRegistry[firstKey];
|
|
17
|
+
console.log(`[EntityQueries] First entity sample:`, {
|
|
18
|
+
name: firstEntry.name,
|
|
19
|
+
hasConfig: !!firstEntry.config,
|
|
20
|
+
configSlug: (_a = firstEntry.config) == null ? void 0 : _a.slug,
|
|
21
|
+
configEnabled: (_b = firstEntry.config) == null ? void 0 : _b.enabled,
|
|
22
|
+
hasUi: !!((_c = firstEntry.config) == null ? void 0 : _c.ui),
|
|
23
|
+
showInMenu: (_f = (_e = (_d = firstEntry.config) == null ? void 0 : _d.ui) == null ? void 0 : _e.dashboard) == null ? void 0 : _f.showInMenu
|
|
24
|
+
});
|
|
25
|
+
}
|
|
9
26
|
return _cachedRegistry;
|
|
10
27
|
} catch (error) {
|
|
11
|
-
console.
|
|
28
|
+
console.error("[EntityQueries] Registry not available:", error);
|
|
12
29
|
return {};
|
|
13
30
|
}
|
|
14
31
|
}
|
package/dist/styles/classes.json
CHANGED
|
@@ -28,6 +28,28 @@ function DefaultMainDashboardLayout({
|
|
|
28
28
|
const entities = allEntities.filter(isEntityConfig)
|
|
29
29
|
const serializedEntities: SerializableEntityConfig[] = entities.map(serializeEntityConfig)
|
|
30
30
|
|
|
31
|
+
// DEBUG: Log entity data to trace issues
|
|
32
|
+
console.log('[MainLayout] All entities count:', allEntities.length)
|
|
33
|
+
console.log('[MainLayout] Filtered entities count:', entities.length)
|
|
34
|
+
if (entities.length > 0) {
|
|
35
|
+
const first = entities[0]
|
|
36
|
+
console.log('[MainLayout] First entity sample:', {
|
|
37
|
+
slug: first.slug,
|
|
38
|
+
enabled: first.enabled,
|
|
39
|
+
hasUi: !!first.ui,
|
|
40
|
+
showInMenu: first.ui?.dashboard?.showInMenu
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
if (serializedEntities.length > 0) {
|
|
44
|
+
const firstSer = serializedEntities[0]
|
|
45
|
+
console.log('[MainLayout] First serialized entity sample:', {
|
|
46
|
+
slug: firstSer.slug,
|
|
47
|
+
enabled: firstSer.enabled,
|
|
48
|
+
hasUi: !!(firstSer as any).ui,
|
|
49
|
+
showInMenu: (firstSer as any).ui?.dashboard?.showInMenu
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
31
53
|
return (
|
|
32
54
|
<DashboardShell entities={serializedEntities}>
|
|
33
55
|
{children}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextsparkjs/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.12",
|
|
4
4
|
"description": "NextSpark - The complete SaaS framework for Next.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "NextSpark <hello@nextspark.dev>",
|
|
@@ -223,6 +223,16 @@
|
|
|
223
223
|
"README.md",
|
|
224
224
|
"scripts"
|
|
225
225
|
],
|
|
226
|
+
"scripts": {
|
|
227
|
+
"build": "tsup && pnpm build:dts && pnpm build:ui-css",
|
|
228
|
+
"build:js": "tsup",
|
|
229
|
+
"build:dts": "tsc -p tsconfig.dts.json || echo '⚠️ DTS generation completed with some type errors (partial coverage)'",
|
|
230
|
+
"build:ui-css": "node scripts/build/build-ui-css.mjs",
|
|
231
|
+
"dev": "tsup --watch",
|
|
232
|
+
"test": "jest",
|
|
233
|
+
"test:watch": "jest --watch",
|
|
234
|
+
"test:coverage": "jest --coverage"
|
|
235
|
+
},
|
|
226
236
|
"peerDependencies": {
|
|
227
237
|
"next": ">=14.0.0",
|
|
228
238
|
"react": ">=18.0.0",
|
|
@@ -307,15 +317,5 @@
|
|
|
307
317
|
"tailwind-merge": "^3.3.1",
|
|
308
318
|
"uuid": "^13.0.0",
|
|
309
319
|
"zod": "^4.1.5"
|
|
310
|
-
},
|
|
311
|
-
"scripts": {
|
|
312
|
-
"build": "tsup && pnpm build:dts && pnpm build:ui-css",
|
|
313
|
-
"build:js": "tsup",
|
|
314
|
-
"build:dts": "tsc -p tsconfig.dts.json || echo '⚠️ DTS generation completed with some type errors (partial coverage)'",
|
|
315
|
-
"build:ui-css": "node scripts/build/build-ui-css.mjs",
|
|
316
|
-
"dev": "tsup --watch",
|
|
317
|
-
"test": "jest",
|
|
318
|
-
"test:watch": "jest --watch",
|
|
319
|
-
"test:coverage": "jest --coverage"
|
|
320
320
|
}
|
|
321
|
-
}
|
|
321
|
+
}
|
|
File without changes
|
package/scripts/create-theme.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -28,6 +28,28 @@ function DefaultMainDashboardLayout({
|
|
|
28
28
|
const entities = allEntities.filter(isEntityConfig)
|
|
29
29
|
const serializedEntities: SerializableEntityConfig[] = entities.map(serializeEntityConfig)
|
|
30
30
|
|
|
31
|
+
// DEBUG: Log entity data to trace issues
|
|
32
|
+
console.log('[MainLayout] All entities count:', allEntities.length)
|
|
33
|
+
console.log('[MainLayout] Filtered entities count:', entities.length)
|
|
34
|
+
if (entities.length > 0) {
|
|
35
|
+
const first = entities[0]
|
|
36
|
+
console.log('[MainLayout] First entity sample:', {
|
|
37
|
+
slug: first.slug,
|
|
38
|
+
enabled: first.enabled,
|
|
39
|
+
hasUi: !!first.ui,
|
|
40
|
+
showInMenu: first.ui?.dashboard?.showInMenu
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
if (serializedEntities.length > 0) {
|
|
44
|
+
const firstSer = serializedEntities[0]
|
|
45
|
+
console.log('[MainLayout] First serialized entity sample:', {
|
|
46
|
+
slug: firstSer.slug,
|
|
47
|
+
enabled: firstSer.enabled,
|
|
48
|
+
hasUi: !!(firstSer as any).ui,
|
|
49
|
+
showInMenu: (firstSer as any).ui?.dashboard?.showInMenu
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
31
53
|
return (
|
|
32
54
|
<DashboardShell entities={serializedEntities}>
|
|
33
55
|
{children}
|