rasp-feedback 1.0.9 → 1.1.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.
|
@@ -116,7 +116,7 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
116
116
|
useEffect(() => {
|
|
117
117
|
if (!companyId || !pathname)
|
|
118
118
|
return;
|
|
119
|
-
console.log('[RaspProvider] Route changed to:', pathname);
|
|
119
|
+
//console.log('[RaspProvider] Route changed to:', pathname);
|
|
120
120
|
// Reset to hidden at start of check to prevent flash
|
|
121
121
|
setLauncherContent('hidden');
|
|
122
122
|
setCurrentUrl(pathname);
|
|
@@ -127,8 +127,8 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
127
127
|
setLauncherContent('launcher');
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
console.log('[RaspProvider] Current path:', pathname);
|
|
131
|
-
console.log('[RaspProvider] Configured patterns (raw from DB):', preloadRoutes.routePatterns);
|
|
130
|
+
//console.log('[RaspProvider] Current path:', pathname);
|
|
131
|
+
//console.log('[RaspProvider] Configured patterns (raw from DB):', preloadRoutes.routePatterns);
|
|
132
132
|
// Normalize path helper (ensure leading /, remove trailing / except root)
|
|
133
133
|
const normalizePath = (p) => {
|
|
134
134
|
const withLeading = p.startsWith('/') ? p : '/' + p;
|
|
@@ -137,24 +137,24 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
137
137
|
const normalizedPath = normalizePath(pathname);
|
|
138
138
|
// Check each pattern to see if current path matches
|
|
139
139
|
const matchedPattern = preloadRoutes.routePatterns.find((pattern) => {
|
|
140
|
-
console.log('[RaspProvider] Processing pattern:', pattern);
|
|
140
|
+
//console.log('[RaspProvider] Processing pattern:', pattern);
|
|
141
141
|
let patternPath;
|
|
142
142
|
try {
|
|
143
143
|
// Extract pathname from full URL patterns (e.g., "http://localhost:3000/blog/:slug/:slug/")
|
|
144
144
|
if (pattern.startsWith('http://') || pattern.startsWith('https://')) {
|
|
145
145
|
const url = new URL(pattern);
|
|
146
146
|
patternPath = url.pathname;
|
|
147
|
-
console.log(`[RaspProvider] → Extracted pathname: "${patternPath}"`);
|
|
147
|
+
//console.log(`[RaspProvider] → Extracted pathname: "${patternPath}"`);
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
150
|
// Pattern is already just a path
|
|
151
151
|
patternPath = pattern;
|
|
152
|
-
console.log(`[RaspProvider] → Already a path: "${patternPath}"`);
|
|
152
|
+
//console.log(`[RaspProvider] → Already a path: "${patternPath}"`);
|
|
153
153
|
}
|
|
154
154
|
const normalizedPattern = normalizePath(patternPath);
|
|
155
|
-
console.log(`[RaspProvider] → Normalized: "${normalizedPattern}"`);
|
|
155
|
+
//console.log(`[RaspProvider] → Normalized: "${normalizedPattern}"`);
|
|
156
156
|
const result = matchRouteClientSide(normalizedPath, normalizedPattern);
|
|
157
|
-
console.log(`[RaspProvider] Testing: "${normalizedPath}" vs "${normalizedPattern}" → ${result.matched ? '✓ MATCH' : '✗ no match'}`, result.params);
|
|
157
|
+
//console.log(`[RaspProvider] Testing: "${normalizedPath}" vs "${normalizedPattern}" → ${result.matched ? '✓ MATCH' : '✗ no match'}`, result.params);
|
|
158
158
|
return result.matched;
|
|
159
159
|
}
|
|
160
160
|
catch (error) {
|
|
@@ -163,11 +163,11 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
if (matchedPattern) {
|
|
166
|
-
console.log('[RaspProvider] ✓ Matched pattern:', matchedPattern, '- showing launcher');
|
|
166
|
+
//console.log('[RaspProvider] ✓ Matched pattern:', matchedPattern, '- showing launcher');
|
|
167
167
|
setLauncherContent('launcher');
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
|
-
console.log('[RaspProvider] ✗ No pattern matched - hiding launcher');
|
|
170
|
+
//console.log('[RaspProvider] ✗ No pattern matched - hiding launcher');
|
|
171
171
|
// stays 'hidden'
|
|
172
172
|
}
|
|
173
173
|
}).catch((error) => {
|
|
@@ -130,10 +130,10 @@ function StaticFormComponent({ form, mainTheme, fields, setIsExpanded, isFormCom
|
|
|
130
130
|
display: 'flex',
|
|
131
131
|
justifyContent: 'center',
|
|
132
132
|
borderRadius: '0.75rem',
|
|
133
|
-
backgroundColor: isFormComponent ? mainTheme.data.background : "
|
|
133
|
+
backgroundColor: isFormComponent ? mainTheme.data.background : "white",
|
|
134
134
|
margin: '1.25rem',
|
|
135
135
|
width: 'auto',
|
|
136
|
-
zIndex:
|
|
136
|
+
zIndex: 1000000000000000000000000000000,
|
|
137
137
|
padding: isFormComponent ? 20 : 0,
|
|
138
138
|
paddingRight: isFormComponent ? 5 : 0,
|
|
139
139
|
height: 'auto',
|
package/package.json
CHANGED