@fayz-ai/saas 0.6.6 → 0.7.0
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/README.md +1 -1
- package/dist/hooks/useModuleNavigation.d.ts.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/shell/hooks/useModuleNavigation.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/hooks/useModuleNavigation.ts +7 -1
- package/src/shell/hooks/useModuleNavigation.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModuleNavigation.d.ts","sourceRoot":"","sources":["../../../src/shell/hooks/useModuleNavigation.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAW7C;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,SAAY;;;;
|
|
1
|
+
{"version":3,"file":"useModuleNavigation.d.ts","sourceRoot":"","sources":["../../../src/shell/hooks/useModuleNavigation.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAW7C;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,SAAY;;;;yBAmFrD,MAAM,SAAS,MAAM;;0BA8BpB,MAAM;EAWhD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fayz-ai/saas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Fayz SDK SaaS layer — multi-tenancy, billing, permissions, org management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"@tanstack/react-table": "^8.20.0",
|
|
60
60
|
"cmdk": "^1.0.0",
|
|
61
61
|
"@radix-ui/react-dialog": "^1.1.0",
|
|
62
|
-
"@fayz-ai/sdk": "^0.6.
|
|
63
|
-
"@fayz-ai/core": "^0.
|
|
64
|
-
"@fayz-ai/auth": "^0.
|
|
62
|
+
"@fayz-ai/sdk": "^0.6.5",
|
|
63
|
+
"@fayz-ai/core": "^0.7.0",
|
|
64
|
+
"@fayz-ai/auth": "^0.7.0",
|
|
65
65
|
"@fayz-ai/plugin-auth": "^0.1.1",
|
|
66
|
-
"@fayz-ai/ui": "^0.
|
|
66
|
+
"@fayz-ai/ui": "^0.7.0",
|
|
67
67
|
"@fayz-ai/db": "^0.1.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
"tailwindcss": "^3.4.0"
|
|
76
76
|
},
|
|
77
77
|
"license": "MIT",
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
78
81
|
"scripts": {
|
|
79
82
|
"build": "tsup && tsc --emitDeclarationOnly --declaration --declarationMap --noEmit false",
|
|
80
83
|
"dev": "tsup --watch",
|
|
@@ -44,13 +44,19 @@ export function useModuleNavigation(hashBase: string, depthMap?: DepthMap, homeV
|
|
|
44
44
|
// '/inventory/dashboard' → treat as home view
|
|
45
45
|
if (segments.length === 1 && segments[0] === homeView) return homeView
|
|
46
46
|
// Detect action + ID patterns: '/products/edit/uuid' or '/stock/detail/uuid'
|
|
47
|
-
const ACTION_KEYWORDS = ['edit', 'detail', 'view']
|
|
47
|
+
const ACTION_KEYWORDS = ['edit', 'detail', 'view', 'post']
|
|
48
48
|
if (segments.length >= 3) {
|
|
49
49
|
const maybeAction = segments[segments.length - 2]
|
|
50
50
|
if (ACTION_KEYWORDS.includes(maybeAction)) {
|
|
51
51
|
return segments.slice(0, -2).join('-') + '-' + maybeAction + ':' + segments[segments.length - 1]
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
// Generic fallback: a trailing UUID is always an ID for the view formed
|
|
55
|
+
// by the preceding segments ('/content/post/<uuid>' → 'content-post:<uuid>')
|
|
56
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
|
57
|
+
if (segments.length >= 2 && UUID_RE.test(segments[segments.length - 1])) {
|
|
58
|
+
return segments.slice(0, -1).join('-') + ':' + segments[segments.length - 1]
|
|
59
|
+
}
|
|
54
60
|
return segments.join('-')
|
|
55
61
|
}
|
|
56
62
|
return homeView
|
|
@@ -44,13 +44,19 @@ export function useModuleNavigation(hashBase: string, depthMap?: DepthMap, homeV
|
|
|
44
44
|
// '/inventory/dashboard' → treat as home view
|
|
45
45
|
if (segments.length === 1 && segments[0] === homeView) return homeView
|
|
46
46
|
// Detect action + ID patterns: '/products/edit/uuid' or '/stock/detail/uuid'
|
|
47
|
-
const ACTION_KEYWORDS = ['edit', 'detail', 'view']
|
|
47
|
+
const ACTION_KEYWORDS = ['edit', 'detail', 'view', 'post']
|
|
48
48
|
if (segments.length >= 3) {
|
|
49
49
|
const maybeAction = segments[segments.length - 2]
|
|
50
50
|
if (ACTION_KEYWORDS.includes(maybeAction)) {
|
|
51
51
|
return segments.slice(0, -2).join('-') + '-' + maybeAction + ':' + segments[segments.length - 1]
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
// Generic fallback: a trailing UUID is always an ID for the view formed
|
|
55
|
+
// by the preceding segments ('/content/post/<uuid>' → 'content-post:<uuid>')
|
|
56
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
|
57
|
+
if (segments.length >= 2 && UUID_RE.test(segments[segments.length - 1])) {
|
|
58
|
+
return segments.slice(0, -1).join('-') + ':' + segments[segments.length - 1]
|
|
59
|
+
}
|
|
54
60
|
return segments.join('-')
|
|
55
61
|
}
|
|
56
62
|
return homeView
|