@supernova-studio/client 0.59.3 → 0.59.5

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/index.mjs CHANGED
@@ -7006,9 +7006,17 @@ var DTOFigmaNodeRenderUrlInput = DTOFigmaNodeRenderInputBase.extend({
7006
7006
  */
7007
7007
  brandPersistentId: z243.string()
7008
7008
  });
7009
+ var DTOFigmaNodeRerenderInput = z243.object({
7010
+ inputType: z243.literal("Rerender"),
7011
+ /**
7012
+ * Persistent ID of an existing Figma node
7013
+ */
7014
+ figmaNodePersistentId: z243.string()
7015
+ });
7009
7016
  var DTOFigmaNodeRenderInput = z243.discriminatedUnion("inputType", [
7010
7017
  DTOFigmaNodeRenderIdInput,
7011
- DTOFigmaNodeRenderUrlInput
7018
+ DTOFigmaNodeRenderUrlInput,
7019
+ DTOFigmaNodeRerenderInput
7012
7020
  ]);
7013
7021
 
7014
7022
  // src/api/dto/elements/figma-nodes/figma-node-v1.ts
@@ -7065,7 +7073,7 @@ var DTOFigmaNodeRenderAsyncActionOutput = z246.object({
7065
7073
  });
7066
7074
  var DTOFigmaNodeRenderActionInput = z246.object({
7067
7075
  type: z246.literal("FigmaNodeRender"),
7068
- input: DTOFigmaNodeRenderInput.array()
7076
+ input: DTOFigmaNodeRenderIdInput.array()
7069
7077
  });
7070
7078
  var DTOFigmaNodeRenderAsyncActionInput = z246.object({
7071
7079
  type: z246.literal("FigmaNodeRenderAsync"),
@@ -7287,19 +7295,28 @@ var DTOThemeCreatePayload = z255.object({
7287
7295
  var figmaFileIdRegex = /^[0-9a-zA-Z]{22,128}$/;
7288
7296
  var nodeIdRegex = /^\d+-\d+$/;
7289
7297
  var nodeTypeRegex = /^[0-9a-zA-Z]^/;
7298
+ var ParsedFigmaFileURLError = /* @__PURE__ */ ((ParsedFigmaFileURLError2) => {
7299
+ ParsedFigmaFileURLError2["InvalidUrl"] = "InvalidUrl";
7300
+ ParsedFigmaFileURLError2["InvalidFigmaFileId"] = "InvalidFigmaFileId";
7301
+ return ParsedFigmaFileURLError2;
7302
+ })(ParsedFigmaFileURLError || {});
7290
7303
  var FigmaUtils = {
7291
7304
  tryParseFigmaFileURL(urlString) {
7292
- if (!URL.canParse(urlString))
7293
- return null;
7305
+ if (!URL.canParse(urlString)) {
7306
+ return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
7307
+ }
7294
7308
  const url = new URL(urlString);
7295
- if (!url.hostname.endsWith("figma.com"))
7296
- return null;
7309
+ if (!url.hostname.endsWith("figma.com")) {
7310
+ return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
7311
+ }
7297
7312
  const pathSegments = url.pathname.split("/");
7298
- if (pathSegments[1] !== "design" && pathSegments[1] !== "file")
7299
- return null;
7313
+ if (pathSegments[1] !== "design" && pathSegments[1] !== "file") {
7314
+ return { status: "Error", error: "InvalidUrl" /* InvalidUrl */ };
7315
+ }
7300
7316
  const fileId = pathSegments[2];
7301
- if (!fileId || !fileId.match(figmaFileIdRegex))
7302
- return null;
7317
+ if (!fileId || !fileId.match(figmaFileIdRegex)) {
7318
+ return { status: "Error", error: "InvalidFigmaFileId" /* InvalidFigmaFileId */ };
7319
+ }
7303
7320
  let fileName = null;
7304
7321
  const rawFileName = pathSegments[3];
7305
7322
  if (rawFileName) {
@@ -7315,7 +7332,7 @@ var FigmaUtils = {
7315
7332
  if (nodeTypeRaw && nodeTypeRaw.match(nodeTypeRegex)) {
7316
7333
  nodeType = nodeTypeRaw;
7317
7334
  }
7318
- return { fileId, fileName, nodeId, nodeType };
7335
+ return { status: "Success", fileId, fileName, nodeId, nodeType };
7319
7336
  }
7320
7337
  };
7321
7338
 
@@ -13362,7 +13379,10 @@ export {
13362
13379
  DTOFigmaNodeRenderAsyncActionInput,
13363
13380
  DTOFigmaNodeRenderAsyncActionOutput,
13364
13381
  DTOFigmaNodeRenderFormat,
13382
+ DTOFigmaNodeRenderIdInput,
13365
13383
  DTOFigmaNodeRenderInput,
13384
+ DTOFigmaNodeRenderUrlInput,
13385
+ DTOFigmaNodeRerenderInput,
13366
13386
  DTOFigmaNodeV2,
13367
13387
  DTOFrameNodeStructure,
13368
13388
  DTOFrameNodeStructureListResponse,
@@ -13481,6 +13501,7 @@ export {
13481
13501
  OverridesEndpoint,
13482
13502
  PageBlockEditorModel,
13483
13503
  PageSectionEditorModel,
13504
+ ParsedFigmaFileURLError,
13484
13505
  PipelinesEndpoint,
13485
13506
  RGB,
13486
13507
  RGBA,