@supernova-studio/client 0.47.61 → 0.47.62
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/utils/hash.ts +13 -3
- package/src/yjs/version-room/frontend.ts +1 -3
- package/src/yjs/version-room/utils.ts +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -40866,7 +40866,7 @@ declare const DTOWorkspaceIntegrationGetGitObjectsInput: z.ZodObject<{
|
|
|
40866
40866
|
}>;
|
|
40867
40867
|
type DTOWorkspaceIntegrationGetGitObjectsInput = z.infer<typeof DTOWorkspaceIntegrationGetGitObjectsInput>;
|
|
40868
40868
|
|
|
40869
|
-
declare function generateHash(input: object | string): string;
|
|
40869
|
+
declare function generateHash(input: object | string, debug?: boolean): string;
|
|
40870
40870
|
|
|
40871
40871
|
declare const DocumentationHierarchySettings: z.ZodObject<{
|
|
40872
40872
|
routingVersion: z.ZodString;
|
|
@@ -43373,6 +43373,6 @@ declare class FrontendVersionRoomYDoc {
|
|
|
43373
43373
|
isDraftFeatureAdopted(): boolean;
|
|
43374
43374
|
}
|
|
43375
43375
|
|
|
43376
|
-
declare function generatePageContentHash(content: DocumentationPageEditorModel): string;
|
|
43376
|
+
declare function generatePageContentHash(content: DocumentationPageEditorModel, debug?: boolean): string;
|
|
43377
43377
|
|
|
43378
43378
|
export { BackendVersionRoomYDoc, BlockDefinitionUtils, BlockParsingUtils, DTOAssetRenderConfiguration, DTOBrand, DTOBrandCreateResponse, DTOBrandGetResponse, DTOBrandsListResponse, DTOCreateBrandInput, DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTOCreateElementPropertyDefinitionInputV2, DTOCreateVersionInput, DTODataSource, DTODataSourceCreationResponse, DTODataSourceFigma, DTODataSourceFigmaCloud, DTODataSourceFigmaVariablesPlugin, DTODataSourceTokenStudio, DTODataSourcesListResponse, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODeleteElementPropertyDefinitionInputV2, DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemVersion, DTODesignSystemVersionCreationResponse, DTODesignSystemVersionGetResponse, DTODesignSystemVersionJobStatusResponse, DTODesignSystemVersionJobsResponse, DTODesignSystemVersionsListResponse, DTODiffCountBase, DTODocumentationDraftChangeType, DTODocumentationDraftState, DTODocumentationDraftStateCreated, DTODocumentationDraftStateDeleted, DTODocumentationDraftStateUpdated, DTODocumentationGroupCreateActionInputV2, DTODocumentationGroupCreateActionOutputV2, DTODocumentationGroupDeleteActionInputV2, DTODocumentationGroupDeleteActionOutputV2, DTODocumentationGroupDuplicateActionInputV2, DTODocumentationGroupDuplicateActionOutputV2, DTODocumentationGroupMoveActionInputV2, DTODocumentationGroupMoveActionOutputV2, DTODocumentationGroupStructureV1, DTODocumentationGroupUpdateActionInputV2, DTODocumentationGroupUpdateActionOutputV2, DTODocumentationGroupV1, DTODocumentationGroupV2, DTODocumentationHierarchyV2, DTODocumentationItemConfigurationV1, DTODocumentationItemConfigurationV2, DTODocumentationItemHeaderV2, DTODocumentationLinkPreviewRequest, DTODocumentationLinkPreviewResponse, DTODocumentationPageAnchor, DTODocumentationPageContent, DTODocumentationPageContentGetResponse, DTODocumentationPageCreateActionInputV2, DTODocumentationPageCreateActionOutputV2, DTODocumentationPageDeleteActionInputV2, DTODocumentationPageDeleteActionOutputV2, DTODocumentationPageDuplicateActionInputV2, DTODocumentationPageDuplicateActionOutputV2, DTODocumentationPageMoveActionInputV2, DTODocumentationPageMoveActionOutputV2, DTODocumentationPageRoomHeaderData, DTODocumentationPageRoomHeaderDataUpdate, DTODocumentationPageSnapshot, DTODocumentationPageUpdateActionInputV2, DTODocumentationPageUpdateActionOutputV2, DTODocumentationPageV2, DTODocumentationPublishTypeQueryParams, DTODocumentationTabCreateActionInputV2, DTODocumentationTabCreateActionOutputV2, type DTODocumentationTabGroupCreateActionInputV2, DTODocumentationTabGroupDeleteActionInputV2, DTODocumentationTabGroupDeleteActionOutputV2, DTODownloadAssetsRequest, DTODownloadAssetsResponse, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementActionOutput, DTOElementPropertyDefinition, DTOElementPropertyDefinitionsGetResponse, DTOElementPropertyValue, DTOElementPropertyValuesGetResponse, DTOElementView, DTOElementViewBasePropertyColumn, DTOElementViewColumn, DTOElementViewColumnSharedAttributes, DTOElementViewPropertyDefinitionColumn, DTOElementViewThemeColumn, DTOElementViewsListResponse, DTOElementsGetOutput, type DTOElementsGetQueryParsed, type DTOElementsGetQueryRaw, DTOElementsGetQuerySchema, DTOElementsGetTypeFilter, DTOExportJob, DTOExportJobCreatedBy, DTOExportJobDesignSystemPreview, DTOExportJobDesignSystemVersionPreview, DTOExportJobDestinations, DTOExportJobResponse, DTOExporter, DTOExporterCreateInput, DTOExporterCreateOutput, DTOExporterGitProviderEnum, DTOExporterMembership, DTOExporterMembershipRole, DTOExporterProperty, DTOExporterPropertyListResponse, DTOExporterSource, DTOExporterType, DTOExporterUpdateInput, DTOFigmaNode, DTOFigmaNodeData, DTOFigmaNodeOrigin, DTOFigmaNodeRenderActionInput, DTOFigmaNodeRenderActionOutput, DTOFigmaNodeRenderInput, DTOGetBlockDefinitionsOutput, DTOGetDocumentationPageAnchorsResponse, DTOGitBranch, DTOGitOrganization, DTOGitProject, DTOGitRepository, DTOIntegration, DTOIntegrationCredentials, DTOIntegrationOAuthGetResponse, DTOIntegrationPostResponse, DTOIntegrationsGetListResponse, DTOLiveblocksAuthRequest, DTOLiveblocksAuthResponse, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTONpmRegistryConfig, DTONpmRegistryConfigConstants, DTOPipeline, DTOPipelineCreateBody, DTOPipelineTriggerBody, DTOPipelineUpdateBody, DTOPropertyDefinitionCreateActionInputV2, DTOPropertyDefinitionCreateActionOutputV2, DTOPropertyDefinitionDeleteActionInputV2, DTOPropertyDefinitionDeleteActionOutputV2, DTOPropertyDefinitionUpdateActionInputV2, DTOPropertyDefinitionUpdateActionOutputV2, DTOPublishDocumentationRequest, DTOPublishDocumentationResponse, DTORenderedAssetFile, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOUpdateElementPropertyDefinitionInputV2, DTOUpdateUserNotificationSettingsPayload, DTOUpdateVersionInput, DTOUserNotificationSettingsResponse, DTOUserProfileUpdatePayload, DTOUserProfileUpdateResponse, DTOUserWorkspaceMembership, DTOUserWorkspaceMembershipsResponse, DTOWorkspace, DTOWorkspaceIntegrationGetGitObjectsInput, DTOWorkspaceIntegrationOauthInput, DTOWorkspaceIntegrationPATInput, DTOWorkspaceRole, DocumentationHierarchySettings, DocumentationPageEditorModel, DocumentationPageV1DTO, FrontendVersionRoomYDoc, type ListItemNode, type ListNode, ListTreeBuilder, NpmRegistryInput, ObjectMeta, PageBlockEditorModel, PageSectionEditorModel, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, VersionRoomBaseYDoc, VersionSQSPayload, WorkspaceConfigurationPayload, applyPrivacyConfigurationToNestedItems, blockToProsemirrorNode, buildDocPagePublishPaths, calculateElementParentChain, documentationItemConfigurationToDTOV1, documentationItemConfigurationToDTOV2, documentationPageToDTOV2, documentationPagesFixedConfigurationToDTOV1, documentationPagesFixedConfigurationToDTOV2, documentationPagesToDTOV1, documentationPagesToDTOV2, elementGroupsToDocumentationGroupDTOV1, elementGroupsToDocumentationGroupDTOV2, elementGroupsToDocumentationGroupFixedConfigurationDTOV1, elementGroupsToDocumentationGroupFixedConfigurationDTOV2, elementGroupsToDocumentationGroupStructureDTOV1, generateHash, generatePageContentHash, getDtoDefaultItemConfigurationV1, getDtoDefaultItemConfigurationV2, getMockPageBlockDefinitions, gitBranchToDto, gitOrganizationToDto, gitProjectToDto, gitRepositoryToDto, integrationCredentialToDto, integrationToDto, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pipelineToDto, pmSchema, prosemirrorDocToPage, prosemirrorNodeToSection, prosemirrorNodesToBlocks, serializeAsCustomBlock, shallowProsemirrorNodeToBlock, validateDesignSystemVersion, validateSsoPayload, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
|
package/dist/index.d.ts
CHANGED
|
@@ -40866,7 +40866,7 @@ declare const DTOWorkspaceIntegrationGetGitObjectsInput: z.ZodObject<{
|
|
|
40866
40866
|
}>;
|
|
40867
40867
|
type DTOWorkspaceIntegrationGetGitObjectsInput = z.infer<typeof DTOWorkspaceIntegrationGetGitObjectsInput>;
|
|
40868
40868
|
|
|
40869
|
-
declare function generateHash(input: object | string): string;
|
|
40869
|
+
declare function generateHash(input: object | string, debug?: boolean): string;
|
|
40870
40870
|
|
|
40871
40871
|
declare const DocumentationHierarchySettings: z.ZodObject<{
|
|
40872
40872
|
routingVersion: z.ZodString;
|
|
@@ -43373,6 +43373,6 @@ declare class FrontendVersionRoomYDoc {
|
|
|
43373
43373
|
isDraftFeatureAdopted(): boolean;
|
|
43374
43374
|
}
|
|
43375
43375
|
|
|
43376
|
-
declare function generatePageContentHash(content: DocumentationPageEditorModel): string;
|
|
43376
|
+
declare function generatePageContentHash(content: DocumentationPageEditorModel, debug?: boolean): string;
|
|
43377
43377
|
|
|
43378
43378
|
export { BackendVersionRoomYDoc, BlockDefinitionUtils, BlockParsingUtils, DTOAssetRenderConfiguration, DTOBrand, DTOBrandCreateResponse, DTOBrandGetResponse, DTOBrandsListResponse, DTOCreateBrandInput, DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTOCreateElementPropertyDefinitionInputV2, DTOCreateVersionInput, DTODataSource, DTODataSourceCreationResponse, DTODataSourceFigma, DTODataSourceFigmaCloud, DTODataSourceFigmaVariablesPlugin, DTODataSourceTokenStudio, DTODataSourcesListResponse, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODeleteElementPropertyDefinitionInputV2, DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemVersion, DTODesignSystemVersionCreationResponse, DTODesignSystemVersionGetResponse, DTODesignSystemVersionJobStatusResponse, DTODesignSystemVersionJobsResponse, DTODesignSystemVersionsListResponse, DTODiffCountBase, DTODocumentationDraftChangeType, DTODocumentationDraftState, DTODocumentationDraftStateCreated, DTODocumentationDraftStateDeleted, DTODocumentationDraftStateUpdated, DTODocumentationGroupCreateActionInputV2, DTODocumentationGroupCreateActionOutputV2, DTODocumentationGroupDeleteActionInputV2, DTODocumentationGroupDeleteActionOutputV2, DTODocumentationGroupDuplicateActionInputV2, DTODocumentationGroupDuplicateActionOutputV2, DTODocumentationGroupMoveActionInputV2, DTODocumentationGroupMoveActionOutputV2, DTODocumentationGroupStructureV1, DTODocumentationGroupUpdateActionInputV2, DTODocumentationGroupUpdateActionOutputV2, DTODocumentationGroupV1, DTODocumentationGroupV2, DTODocumentationHierarchyV2, DTODocumentationItemConfigurationV1, DTODocumentationItemConfigurationV2, DTODocumentationItemHeaderV2, DTODocumentationLinkPreviewRequest, DTODocumentationLinkPreviewResponse, DTODocumentationPageAnchor, DTODocumentationPageContent, DTODocumentationPageContentGetResponse, DTODocumentationPageCreateActionInputV2, DTODocumentationPageCreateActionOutputV2, DTODocumentationPageDeleteActionInputV2, DTODocumentationPageDeleteActionOutputV2, DTODocumentationPageDuplicateActionInputV2, DTODocumentationPageDuplicateActionOutputV2, DTODocumentationPageMoveActionInputV2, DTODocumentationPageMoveActionOutputV2, DTODocumentationPageRoomHeaderData, DTODocumentationPageRoomHeaderDataUpdate, DTODocumentationPageSnapshot, DTODocumentationPageUpdateActionInputV2, DTODocumentationPageUpdateActionOutputV2, DTODocumentationPageV2, DTODocumentationPublishTypeQueryParams, DTODocumentationTabCreateActionInputV2, DTODocumentationTabCreateActionOutputV2, type DTODocumentationTabGroupCreateActionInputV2, DTODocumentationTabGroupDeleteActionInputV2, DTODocumentationTabGroupDeleteActionOutputV2, DTODownloadAssetsRequest, DTODownloadAssetsResponse, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementActionOutput, DTOElementPropertyDefinition, DTOElementPropertyDefinitionsGetResponse, DTOElementPropertyValue, DTOElementPropertyValuesGetResponse, DTOElementView, DTOElementViewBasePropertyColumn, DTOElementViewColumn, DTOElementViewColumnSharedAttributes, DTOElementViewPropertyDefinitionColumn, DTOElementViewThemeColumn, DTOElementViewsListResponse, DTOElementsGetOutput, type DTOElementsGetQueryParsed, type DTOElementsGetQueryRaw, DTOElementsGetQuerySchema, DTOElementsGetTypeFilter, DTOExportJob, DTOExportJobCreatedBy, DTOExportJobDesignSystemPreview, DTOExportJobDesignSystemVersionPreview, DTOExportJobDestinations, DTOExportJobResponse, DTOExporter, DTOExporterCreateInput, DTOExporterCreateOutput, DTOExporterGitProviderEnum, DTOExporterMembership, DTOExporterMembershipRole, DTOExporterProperty, DTOExporterPropertyListResponse, DTOExporterSource, DTOExporterType, DTOExporterUpdateInput, DTOFigmaNode, DTOFigmaNodeData, DTOFigmaNodeOrigin, DTOFigmaNodeRenderActionInput, DTOFigmaNodeRenderActionOutput, DTOFigmaNodeRenderInput, DTOGetBlockDefinitionsOutput, DTOGetDocumentationPageAnchorsResponse, DTOGitBranch, DTOGitOrganization, DTOGitProject, DTOGitRepository, DTOIntegration, DTOIntegrationCredentials, DTOIntegrationOAuthGetResponse, DTOIntegrationPostResponse, DTOIntegrationsGetListResponse, DTOLiveblocksAuthRequest, DTOLiveblocksAuthResponse, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTONpmRegistryConfig, DTONpmRegistryConfigConstants, DTOPipeline, DTOPipelineCreateBody, DTOPipelineTriggerBody, DTOPipelineUpdateBody, DTOPropertyDefinitionCreateActionInputV2, DTOPropertyDefinitionCreateActionOutputV2, DTOPropertyDefinitionDeleteActionInputV2, DTOPropertyDefinitionDeleteActionOutputV2, DTOPropertyDefinitionUpdateActionInputV2, DTOPropertyDefinitionUpdateActionOutputV2, DTOPublishDocumentationRequest, DTOPublishDocumentationResponse, DTORenderedAssetFile, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOUpdateElementPropertyDefinitionInputV2, DTOUpdateUserNotificationSettingsPayload, DTOUpdateVersionInput, DTOUserNotificationSettingsResponse, DTOUserProfileUpdatePayload, DTOUserProfileUpdateResponse, DTOUserWorkspaceMembership, DTOUserWorkspaceMembershipsResponse, DTOWorkspace, DTOWorkspaceIntegrationGetGitObjectsInput, DTOWorkspaceIntegrationOauthInput, DTOWorkspaceIntegrationPATInput, DTOWorkspaceRole, DocumentationHierarchySettings, DocumentationPageEditorModel, DocumentationPageV1DTO, FrontendVersionRoomYDoc, type ListItemNode, type ListNode, ListTreeBuilder, NpmRegistryInput, ObjectMeta, PageBlockEditorModel, PageSectionEditorModel, type ProsemirrorBlockItem, type ProsemirrorMark, type ProsemirrorNode, VersionRoomBaseYDoc, VersionSQSPayload, WorkspaceConfigurationPayload, applyPrivacyConfigurationToNestedItems, blockToProsemirrorNode, buildDocPagePublishPaths, calculateElementParentChain, documentationItemConfigurationToDTOV1, documentationItemConfigurationToDTOV2, documentationPageToDTOV2, documentationPagesFixedConfigurationToDTOV1, documentationPagesFixedConfigurationToDTOV2, documentationPagesToDTOV1, documentationPagesToDTOV2, elementGroupsToDocumentationGroupDTOV1, elementGroupsToDocumentationGroupDTOV2, elementGroupsToDocumentationGroupFixedConfigurationDTOV1, elementGroupsToDocumentationGroupFixedConfigurationDTOV2, elementGroupsToDocumentationGroupStructureDTOV1, generateHash, generatePageContentHash, getDtoDefaultItemConfigurationV1, getDtoDefaultItemConfigurationV2, getMockPageBlockDefinitions, gitBranchToDto, gitOrganizationToDto, gitProjectToDto, gitRepositoryToDto, integrationCredentialToDto, integrationToDto, itemConfigurationToYjs, pageToProsemirrorDoc, pageToYXmlFragment, pipelineToDto, pmSchema, prosemirrorDocToPage, prosemirrorNodeToSection, prosemirrorNodesToBlocks, serializeAsCustomBlock, shallowProsemirrorNodeToBlock, validateDesignSystemVersion, validateSsoPayload, yDocToPage, yXmlFragmentToPage, yjsToDocumentationHierarchy, yjsToItemConfiguration };
|
package/dist/index.js
CHANGED
|
@@ -5865,13 +5865,23 @@ function prepareObject(obj) {
|
|
|
5865
5865
|
}
|
|
5866
5866
|
return sortedObj;
|
|
5867
5867
|
}
|
|
5868
|
-
function generateHash(input) {
|
|
5868
|
+
function generateHash(input, debug = false) {
|
|
5869
5869
|
if (typeof input === "object") {
|
|
5870
|
-
|
|
5870
|
+
const sanitized = JSON.stringify(prepareObject(input));
|
|
5871
|
+
if (debug) {
|
|
5872
|
+
console.log("Hashing sanitized string:");
|
|
5873
|
+
console.log(sanitized);
|
|
5874
|
+
}
|
|
5875
|
+
return hash(sanitized);
|
|
5871
5876
|
} else {
|
|
5872
5877
|
try {
|
|
5873
5878
|
const obj = JSON.parse(input);
|
|
5874
|
-
|
|
5879
|
+
const sanitized = JSON.stringify(prepareObject(obj));
|
|
5880
|
+
if (debug) {
|
|
5881
|
+
console.log("Hashing sanitized string:");
|
|
5882
|
+
console.log(sanitized);
|
|
5883
|
+
}
|
|
5884
|
+
return hash(sanitized);
|
|
5875
5885
|
} catch (e2) {
|
|
5876
5886
|
return hash(input);
|
|
5877
5887
|
}
|
|
@@ -6018,8 +6028,8 @@ var VersionRoomBaseYDoc = class {
|
|
|
6018
6028
|
};
|
|
6019
6029
|
|
|
6020
6030
|
// src/yjs/version-room/utils.ts
|
|
6021
|
-
function generatePageContentHash(content) {
|
|
6022
|
-
return generateHash(content);
|
|
6031
|
+
function generatePageContentHash(content, debug = false) {
|
|
6032
|
+
return generateHash(content, debug);
|
|
6023
6033
|
}
|
|
6024
6034
|
|
|
6025
6035
|
// src/yjs/version-room/frontend.ts
|
|
@@ -6178,10 +6188,8 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6178
6188
|
// Update page content hash
|
|
6179
6189
|
//
|
|
6180
6190
|
notifyDocumentationPageContentUpdated(pageId, content) {
|
|
6181
|
-
const pageContentHash = generatePageContentHash(content);
|
|
6191
|
+
const pageContentHash = generatePageContentHash(content, this.debug);
|
|
6182
6192
|
if (this.debug) {
|
|
6183
|
-
console.log("Hashed:");
|
|
6184
|
-
console.log(JSON.stringify(content));
|
|
6185
6193
|
console.log(`Will set page content hash: '${pageId}' : '${pageContentHash}'`);
|
|
6186
6194
|
}
|
|
6187
6195
|
new VersionRoomBaseYDoc(this.yDoc).updateDocumentationPageContentHashes({
|