@supernova-studio/client 1.9.19 → 1.9.20
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.d.mts +100 -73
- package/dist/index.d.ts +100 -73
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -68
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -440,12 +440,12 @@ var Subscription = z13.object({
|
|
|
440
440
|
});
|
|
441
441
|
var ForgeChatMessageSenderType = z14.enum(["User", "Agent"]);
|
|
442
442
|
var ForgeChatMessageSender = z14.discriminatedUnion("type", [
|
|
443
|
-
z14.object({ type: z14.literal(ForgeChatMessageSenderType.Values.User) }),
|
|
443
|
+
z14.object({ type: z14.literal(ForgeChatMessageSenderType.Values.User), userId: z14.string() }),
|
|
444
444
|
z14.object({ type: z14.literal(ForgeChatMessageSenderType.Values.Agent), persona: z14.literal("Amy") })
|
|
445
445
|
]);
|
|
446
446
|
var ForgeChatMessage = z14.object({
|
|
447
|
-
id: z14.
|
|
448
|
-
threadId: z14.
|
|
447
|
+
id: z14.string(),
|
|
448
|
+
threadId: z14.string(),
|
|
449
449
|
payload: z14.string(),
|
|
450
450
|
createdAt: z14.coerce.date(),
|
|
451
451
|
updatedAt: z14.coerce.date(),
|
|
@@ -6772,7 +6772,7 @@ var DTOForgeChatThreadListResponse = z220.object({
|
|
|
6772
6772
|
});
|
|
6773
6773
|
var DTOForgeChatMessageCreateInput = z220.object({
|
|
6774
6774
|
payload: z220.string(),
|
|
6775
|
-
sender: DTOForgeChatMessageSender
|
|
6775
|
+
sender: DTOForgeChatMessageSender.optional()
|
|
6776
6776
|
});
|
|
6777
6777
|
var DTOForgeChatMessageCreateResponse = z220.object({
|
|
6778
6778
|
message: DTOForgeChatMessage
|
|
@@ -9820,6 +9820,7 @@ var DesignSystemsEndpoint = class {
|
|
|
9820
9820
|
};
|
|
9821
9821
|
|
|
9822
9822
|
// src/api/endpoints/workspaces/chat-threads.ts
|
|
9823
|
+
import { z as z300 } from "zod";
|
|
9823
9824
|
var WorkspaceChatThreadsEndpoint = class {
|
|
9824
9825
|
constructor(requestExecutor) {
|
|
9825
9826
|
this.requestExecutor = requestExecutor;
|
|
@@ -9851,13 +9852,9 @@ var WorkspaceChatThreadsEndpoint = class {
|
|
|
9851
9852
|
);
|
|
9852
9853
|
}
|
|
9853
9854
|
delete(workspaceId, threadId) {
|
|
9854
|
-
return this.requestExecutor.json(
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
{
|
|
9858
|
-
method: "DELETE"
|
|
9859
|
-
}
|
|
9860
|
-
);
|
|
9855
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/threads/${threadId}`, z300.any(), {
|
|
9856
|
+
method: "DELETE"
|
|
9857
|
+
});
|
|
9861
9858
|
}
|
|
9862
9859
|
};
|
|
9863
9860
|
var ChatThreadMessagesEndpoint = class {
|
|
@@ -9889,7 +9886,7 @@ var ChatThreadMessagesEndpoint = class {
|
|
|
9889
9886
|
};
|
|
9890
9887
|
|
|
9891
9888
|
// src/api/endpoints/workspaces/integrations.ts
|
|
9892
|
-
import { z as
|
|
9889
|
+
import { z as z301 } from "zod";
|
|
9893
9890
|
var WorkspaceIntegrationsEndpoint = class {
|
|
9894
9891
|
constructor(requestExecutor) {
|
|
9895
9892
|
this.requestExecutor = requestExecutor;
|
|
@@ -9898,7 +9895,7 @@ var WorkspaceIntegrationsEndpoint = class {
|
|
|
9898
9895
|
return this.requestExecutor.json(`/workspaces/${wsId}/integrations`, DTOIntegrationsGetListResponse);
|
|
9899
9896
|
}
|
|
9900
9897
|
delete(wsId, iId) {
|
|
9901
|
-
return this.requestExecutor.json(`/workspaces/${wsId}/integrations/${iId}`,
|
|
9898
|
+
return this.requestExecutor.json(`/workspaces/${wsId}/integrations/${iId}`, z301.unknown(), { method: "DELETE" });
|
|
9902
9899
|
}
|
|
9903
9900
|
};
|
|
9904
9901
|
|
|
@@ -9930,7 +9927,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
9930
9927
|
};
|
|
9931
9928
|
|
|
9932
9929
|
// src/api/endpoints/workspaces/members.ts
|
|
9933
|
-
import { z as
|
|
9930
|
+
import { z as z302 } from "zod";
|
|
9934
9931
|
var WorkspaceMembersEndpoint = class {
|
|
9935
9932
|
constructor(requestExecutor) {
|
|
9936
9933
|
this.requestExecutor = requestExecutor;
|
|
@@ -9947,7 +9944,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
9947
9944
|
});
|
|
9948
9945
|
}
|
|
9949
9946
|
invite(workspaceId, body) {
|
|
9950
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
9947
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z302.any(), { method: "POST", body });
|
|
9951
9948
|
}
|
|
9952
9949
|
delete(workspaceId, userId) {
|
|
9953
9950
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -9976,7 +9973,7 @@ var WorkspaceNpmRegistryEndpoint = class {
|
|
|
9976
9973
|
};
|
|
9977
9974
|
|
|
9978
9975
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
9979
|
-
import { z as
|
|
9976
|
+
import { z as z303 } from "zod";
|
|
9980
9977
|
var WorkspacesEndpoint = class {
|
|
9981
9978
|
constructor(requestExecutor) {
|
|
9982
9979
|
this.requestExecutor = requestExecutor;
|
|
@@ -10008,10 +10005,10 @@ var WorkspacesEndpoint = class {
|
|
|
10008
10005
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
10009
10006
|
}
|
|
10010
10007
|
delete(workspaceId) {
|
|
10011
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
10008
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z303.any(), { method: "DELETE" });
|
|
10012
10009
|
}
|
|
10013
10010
|
subscription(workspaceId) {
|
|
10014
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
10011
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z303.any(), { method: "GET" });
|
|
10015
10012
|
}
|
|
10016
10013
|
transferOwnership(workspaceId, body) {
|
|
10017
10014
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/ownership`, DTOWorkspaceResponse, {
|
|
@@ -10111,9 +10108,9 @@ ${bodyText}`,
|
|
|
10111
10108
|
|
|
10112
10109
|
// src/api/transport/request-executor.ts
|
|
10113
10110
|
import fetch from "node-fetch";
|
|
10114
|
-
import { z as
|
|
10115
|
-
var ResponseWrapper =
|
|
10116
|
-
result:
|
|
10111
|
+
import { z as z304 } from "zod";
|
|
10112
|
+
var ResponseWrapper = z304.object({
|
|
10113
|
+
result: z304.record(z304.any())
|
|
10117
10114
|
});
|
|
10118
10115
|
var RequestExecutor = class {
|
|
10119
10116
|
constructor(testServerConfig) {
|
|
@@ -10188,31 +10185,31 @@ var SupernovaApiClient = class {
|
|
|
10188
10185
|
};
|
|
10189
10186
|
|
|
10190
10187
|
// src/events/design-system.ts
|
|
10191
|
-
import { z as
|
|
10192
|
-
var DTOEventFigmaNodesRendered =
|
|
10193
|
-
type:
|
|
10194
|
-
designSystemId:
|
|
10195
|
-
versionId:
|
|
10196
|
-
figmaNodePersistentIds:
|
|
10197
|
-
});
|
|
10198
|
-
var DTOEventDataSourcesImported =
|
|
10199
|
-
type:
|
|
10200
|
-
designSystemId:
|
|
10201
|
-
versionId:
|
|
10202
|
-
importJobId:
|
|
10188
|
+
import { z as z305 } from "zod";
|
|
10189
|
+
var DTOEventFigmaNodesRendered = z305.object({
|
|
10190
|
+
type: z305.literal("DesignSystem.FigmaNodesRendered"),
|
|
10191
|
+
designSystemId: z305.string(),
|
|
10192
|
+
versionId: z305.string(),
|
|
10193
|
+
figmaNodePersistentIds: z305.string().array()
|
|
10194
|
+
});
|
|
10195
|
+
var DTOEventDataSourcesImported = z305.object({
|
|
10196
|
+
type: z305.literal("DesignSystem.ImportJobFinished"),
|
|
10197
|
+
designSystemId: z305.string(),
|
|
10198
|
+
versionId: z305.string(),
|
|
10199
|
+
importJobId: z305.string(),
|
|
10203
10200
|
dataSourceType: DataSourceRemoteType,
|
|
10204
|
-
dataSourceIds:
|
|
10201
|
+
dataSourceIds: z305.string().array()
|
|
10205
10202
|
});
|
|
10206
10203
|
|
|
10207
10204
|
// src/events/event.ts
|
|
10208
|
-
import { z as
|
|
10209
|
-
var DTOEvent =
|
|
10205
|
+
import { z as z306 } from "zod";
|
|
10206
|
+
var DTOEvent = z306.discriminatedUnion("type", [DTOEventDataSourcesImported, DTOEventFigmaNodesRendered]);
|
|
10210
10207
|
|
|
10211
10208
|
// src/sync/docs-structure-repo.ts
|
|
10212
10209
|
import PQueue from "p-queue";
|
|
10213
10210
|
|
|
10214
10211
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
10215
|
-
import { z as
|
|
10212
|
+
import { z as z307 } from "zod";
|
|
10216
10213
|
|
|
10217
10214
|
// src/yjs/version-room/base.ts
|
|
10218
10215
|
var VersionRoomBaseYDoc = class {
|
|
@@ -10762,24 +10759,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
10762
10759
|
};
|
|
10763
10760
|
|
|
10764
10761
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
10765
|
-
var DocumentationHierarchySettings =
|
|
10766
|
-
routingVersion:
|
|
10767
|
-
isDraftFeatureAdopted:
|
|
10768
|
-
isApprovalFeatureEnabled:
|
|
10769
|
-
approvalRequiredForPublishing:
|
|
10762
|
+
var DocumentationHierarchySettings = z307.object({
|
|
10763
|
+
routingVersion: z307.string(),
|
|
10764
|
+
isDraftFeatureAdopted: z307.boolean(),
|
|
10765
|
+
isApprovalFeatureEnabled: z307.boolean(),
|
|
10766
|
+
approvalRequiredForPublishing: z307.boolean()
|
|
10770
10767
|
});
|
|
10771
10768
|
function yjsToDocumentationHierarchy(doc) {
|
|
10772
10769
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
10773
10770
|
}
|
|
10774
10771
|
|
|
10775
10772
|
// src/yjs/design-system-content/item-configuration.ts
|
|
10776
|
-
import { z as
|
|
10777
|
-
var DTODocumentationPageRoomHeaderData =
|
|
10778
|
-
title:
|
|
10773
|
+
import { z as z308 } from "zod";
|
|
10774
|
+
var DTODocumentationPageRoomHeaderData = z308.object({
|
|
10775
|
+
title: z308.string(),
|
|
10779
10776
|
configuration: DTODocumentationItemConfigurationV2
|
|
10780
10777
|
});
|
|
10781
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
10782
|
-
title:
|
|
10778
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z308.object({
|
|
10779
|
+
title: z308.string().optional(),
|
|
10783
10780
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
10784
10781
|
});
|
|
10785
10782
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -10814,9 +10811,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
10814
10811
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
10815
10812
|
|
|
10816
10813
|
// src/yjs/docs-editor/model/page.ts
|
|
10817
|
-
import { z as
|
|
10818
|
-
var DocumentationPageEditorModel =
|
|
10819
|
-
blocks:
|
|
10814
|
+
import { z as z309 } from "zod";
|
|
10815
|
+
var DocumentationPageEditorModel = z309.object({
|
|
10816
|
+
blocks: z309.array(DocumentationPageContentItem)
|
|
10820
10817
|
});
|
|
10821
10818
|
|
|
10822
10819
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -14493,7 +14490,7 @@ var blocks = [
|
|
|
14493
14490
|
|
|
14494
14491
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
14495
14492
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
14496
|
-
import { z as
|
|
14493
|
+
import { z as z310 } from "zod";
|
|
14497
14494
|
function yDocToPage(yDoc, definitions) {
|
|
14498
14495
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
14499
14496
|
}
|
|
@@ -14569,7 +14566,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
14569
14566
|
if (!id) return null;
|
|
14570
14567
|
return {
|
|
14571
14568
|
id,
|
|
14572
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
14569
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z310.string()) ?? "",
|
|
14573
14570
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
14574
14571
|
};
|
|
14575
14572
|
}
|
|
@@ -14603,7 +14600,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
14603
14600
|
});
|
|
14604
14601
|
}
|
|
14605
14602
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
14606
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
14603
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z310.string());
|
|
14607
14604
|
if (!definitionId) {
|
|
14608
14605
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
14609
14606
|
return [];
|
|
@@ -14644,7 +14641,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
14644
14641
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
14645
14642
|
if (!id) return null;
|
|
14646
14643
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
14647
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
14644
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z310.string().optional()));
|
|
14648
14645
|
return {
|
|
14649
14646
|
id,
|
|
14650
14647
|
type: "Block",
|
|
@@ -14767,9 +14764,9 @@ function parseRichTextAttribute(mark) {
|
|
|
14767
14764
|
return null;
|
|
14768
14765
|
}
|
|
14769
14766
|
function parseProsemirrorLink(mark) {
|
|
14770
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
14767
|
+
const href = getProsemirrorAttribute(mark, "href", z310.string().optional());
|
|
14771
14768
|
if (!href) return null;
|
|
14772
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
14769
|
+
const target = getProsemirrorAttribute(mark, "target", z310.string().optional());
|
|
14773
14770
|
const openInNewTab = target === "_blank";
|
|
14774
14771
|
if (href.startsWith("@")) {
|
|
14775
14772
|
return {
|
|
@@ -14788,9 +14785,9 @@ function parseProsemirrorLink(mark) {
|
|
|
14788
14785
|
}
|
|
14789
14786
|
}
|
|
14790
14787
|
function parseProsemirrorCommentHighlight(mark) {
|
|
14791
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
14788
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z310.string().optional());
|
|
14792
14789
|
if (!highlightId) return null;
|
|
14793
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
14790
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z310.boolean().optional()) ?? false;
|
|
14794
14791
|
return {
|
|
14795
14792
|
type: "Comment",
|
|
14796
14793
|
commentHighlightId: highlightId,
|
|
@@ -14801,7 +14798,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
14801
14798
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
14802
14799
|
if (!id) return null;
|
|
14803
14800
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
14804
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
14801
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z310.boolean().optional()) !== false;
|
|
14805
14802
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
14806
14803
|
if (!tableChild) {
|
|
14807
14804
|
return emptyTable(id, variantId, 0);
|
|
@@ -14847,9 +14844,9 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
14847
14844
|
function parseAsTableCell(prosemirrorNode) {
|
|
14848
14845
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
14849
14846
|
if (!id) return null;
|
|
14850
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
14847
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z310.string().optional());
|
|
14851
14848
|
let columnWidth;
|
|
14852
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
14849
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z310.array(z310.number()).nullish());
|
|
14853
14850
|
if (columnWidthArray) {
|
|
14854
14851
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
14855
14852
|
}
|
|
@@ -14885,7 +14882,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
14885
14882
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
14886
14883
|
};
|
|
14887
14884
|
case "image":
|
|
14888
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
14885
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z310.string());
|
|
14889
14886
|
if (!items) return null;
|
|
14890
14887
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
14891
14888
|
if (!parsedItems.success) return null;
|
|
@@ -14999,7 +14996,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
14999
14996
|
);
|
|
15000
14997
|
}
|
|
15001
14998
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
15002
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
14999
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z310.string());
|
|
15003
15000
|
if (!itemsString) return null;
|
|
15004
15001
|
const itemsJson = JSON.parse(itemsString);
|
|
15005
15002
|
if (!Array.isArray(itemsJson)) {
|
|
@@ -15010,18 +15007,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
15010
15007
|
}
|
|
15011
15008
|
function parseAppearance(prosemirrorNode) {
|
|
15012
15009
|
let appearance = {};
|
|
15013
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
15010
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z310.string().optional());
|
|
15014
15011
|
if (rawAppearanceString) {
|
|
15015
15012
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
15016
15013
|
if (parsedAppearance.success) {
|
|
15017
15014
|
appearance = parsedAppearance.data;
|
|
15018
15015
|
}
|
|
15019
15016
|
}
|
|
15020
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
15017
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z310.number().optional());
|
|
15021
15018
|
if (columns) {
|
|
15022
15019
|
appearance.numberOfColumns = columns;
|
|
15023
15020
|
}
|
|
15024
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
15021
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z310.string().optional());
|
|
15025
15022
|
if (backgroundColor) {
|
|
15026
15023
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
15027
15024
|
if (parsedColor.success) {
|
|
@@ -15122,12 +15119,12 @@ function valueSchemaForPropertyType(type) {
|
|
|
15122
15119
|
}
|
|
15123
15120
|
}
|
|
15124
15121
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
15125
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
15122
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z310.string());
|
|
15126
15123
|
if (!id) console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
15127
15124
|
return id;
|
|
15128
15125
|
}
|
|
15129
15126
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
15130
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
15127
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z310.string()));
|
|
15131
15128
|
}
|
|
15132
15129
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
15133
15130
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|