@supernova-studio/client 0.58.22 → 0.58.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.58.22",
3
+ "version": "0.58.24",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -19,15 +19,15 @@ export const FigmaUtils = {
19
19
 
20
20
  // Validate that the URL type is the correct one (pointing to a design file)
21
21
  const pathSegments = url.pathname.split("/");
22
- if (pathSegments[0] !== "design" && pathSegments[0] !== "file") return null;
22
+ if (pathSegments[1] !== "design" && pathSegments[1] !== "file") return null;
23
23
 
24
24
  // Validate Figma file ID
25
- const fileId = pathSegments[1];
25
+ const fileId = pathSegments[2];
26
26
  if (!fileId || !fileId.match(figmaFileIdRegex)) return null;
27
27
 
28
28
  // Parse Figma file name
29
29
  let fileName: string | null = null;
30
- const rawFileName = pathSegments[2];
30
+ const rawFileName = pathSegments[3];
31
31
  if (rawFileName) {
32
32
  fileName = rawFileName.replaceAll("-", " ");
33
33
  }