@supernova-studio/client 0.47.59 → 0.47.60

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 CHANGED
@@ -6894,7 +6894,11 @@ type DTODocumentationLinkPreviewRequest = z.infer<typeof DTODocumentationLinkPre
6894
6894
 
6895
6895
  declare const DTOPublishDocumentationRequest: z.ZodObject<{
6896
6896
  environment: z.ZodEnum<["Live", "Preview"]>;
6897
- changes: z.ZodObject<{
6897
+ /**
6898
+ * If defined, this allows narrowing down what is published to a set of specific pages and groups
6899
+ * If undefined, everything will be published.
6900
+ */
6901
+ changes: z.ZodOptional<z.ZodObject<{
6898
6902
  pagePersistentIds: z.ZodArray<z.ZodString, "many">;
6899
6903
  groupPersistentIds: z.ZodArray<z.ZodString, "many">;
6900
6904
  }, "strip", z.ZodTypeAny, {
@@ -6903,19 +6907,19 @@ declare const DTOPublishDocumentationRequest: z.ZodObject<{
6903
6907
  }, {
6904
6908
  pagePersistentIds: string[];
6905
6909
  groupPersistentIds: string[];
6906
- }>;
6910
+ }>>;
6907
6911
  }, "strip", z.ZodTypeAny, {
6908
6912
  environment: "Live" | "Preview";
6909
- changes: {
6913
+ changes?: {
6910
6914
  pagePersistentIds: string[];
6911
6915
  groupPersistentIds: string[];
6912
- };
6916
+ } | undefined;
6913
6917
  }, {
6914
6918
  environment: "Live" | "Preview";
6915
- changes: {
6919
+ changes?: {
6916
6920
  pagePersistentIds: string[];
6917
6921
  groupPersistentIds: string[];
6918
- };
6922
+ } | undefined;
6919
6923
  }>;
6920
6924
  type DTOPublishDocumentationRequest = z.infer<typeof DTOPublishDocumentationRequest>;
6921
6925
  declare const DTOPublishDocumentationResponse: z.ZodObject<{
@@ -43356,8 +43360,9 @@ declare class VersionRoomBaseYDoc {
43356
43360
  }
43357
43361
 
43358
43362
  declare class FrontendVersionRoomYDoc {
43363
+ private readonly debug;
43359
43364
  private readonly yDoc;
43360
- constructor(yDoc: Y.Doc);
43365
+ constructor(yDoc: Y.Doc, debug?: boolean);
43361
43366
  getDocumentationHierarchy(): DTODocumentationHierarchyV2;
43362
43367
  private buildPageDraftStates;
43363
43368
  private itemStateFromPage;
package/dist/index.d.ts CHANGED
@@ -6894,7 +6894,11 @@ type DTODocumentationLinkPreviewRequest = z.infer<typeof DTODocumentationLinkPre
6894
6894
 
6895
6895
  declare const DTOPublishDocumentationRequest: z.ZodObject<{
6896
6896
  environment: z.ZodEnum<["Live", "Preview"]>;
6897
- changes: z.ZodObject<{
6897
+ /**
6898
+ * If defined, this allows narrowing down what is published to a set of specific pages and groups
6899
+ * If undefined, everything will be published.
6900
+ */
6901
+ changes: z.ZodOptional<z.ZodObject<{
6898
6902
  pagePersistentIds: z.ZodArray<z.ZodString, "many">;
6899
6903
  groupPersistentIds: z.ZodArray<z.ZodString, "many">;
6900
6904
  }, "strip", z.ZodTypeAny, {
@@ -6903,19 +6907,19 @@ declare const DTOPublishDocumentationRequest: z.ZodObject<{
6903
6907
  }, {
6904
6908
  pagePersistentIds: string[];
6905
6909
  groupPersistentIds: string[];
6906
- }>;
6910
+ }>>;
6907
6911
  }, "strip", z.ZodTypeAny, {
6908
6912
  environment: "Live" | "Preview";
6909
- changes: {
6913
+ changes?: {
6910
6914
  pagePersistentIds: string[];
6911
6915
  groupPersistentIds: string[];
6912
- };
6916
+ } | undefined;
6913
6917
  }, {
6914
6918
  environment: "Live" | "Preview";
6915
- changes: {
6919
+ changes?: {
6916
6920
  pagePersistentIds: string[];
6917
6921
  groupPersistentIds: string[];
6918
- };
6922
+ } | undefined;
6919
6923
  }>;
6920
6924
  type DTOPublishDocumentationRequest = z.infer<typeof DTOPublishDocumentationRequest>;
6921
6925
  declare const DTOPublishDocumentationResponse: z.ZodObject<{
@@ -43356,8 +43360,9 @@ declare class VersionRoomBaseYDoc {
43356
43360
  }
43357
43361
 
43358
43362
  declare class FrontendVersionRoomYDoc {
43363
+ private readonly debug;
43359
43364
  private readonly yDoc;
43360
- constructor(yDoc: Y.Doc);
43365
+ constructor(yDoc: Y.Doc, debug?: boolean);
43361
43366
  getDocumentationHierarchy(): DTODocumentationHierarchyV2;
43362
43367
  private buildPageDraftStates;
43363
43368
  private itemStateFromPage;
package/dist/index.js CHANGED
@@ -5221,10 +5221,14 @@ var DTOPipeline = _zod.z.object({
5221
5221
  // src/api/dto/documentation/publish.ts
5222
5222
  var DTOPublishDocumentationRequest = _zod.z.object({
5223
5223
  environment: PublishedDocEnvironment,
5224
+ /**
5225
+ * If defined, this allows narrowing down what is published to a set of specific pages and groups
5226
+ * If undefined, everything will be published.
5227
+ */
5224
5228
  changes: _zod.z.object({
5225
5229
  pagePersistentIds: _zod.z.string().array(),
5226
5230
  groupPersistentIds: _zod.z.string().array()
5227
- })
5231
+ }).optional()
5228
5232
  });
5229
5233
  var DTOPublishDocumentationResponse = _zod.z.object({
5230
5234
  job: DTOExportJob
@@ -6013,9 +6017,15 @@ var VersionRoomBaseYDoc = class {
6013
6017
  }
6014
6018
  };
6015
6019
 
6020
+ // src/yjs/version-room/utils.ts
6021
+ function generatePageContentHash(content) {
6022
+ return generateHash(content);
6023
+ }
6024
+
6016
6025
  // src/yjs/version-room/frontend.ts
6017
6026
  var FrontendVersionRoomYDoc = class {
6018
- constructor(yDoc) {
6027
+ constructor(yDoc, debug = false) {
6028
+ this.debug = debug;
6019
6029
  __publicField(this, "yDoc");
6020
6030
  this.yDoc = yDoc;
6021
6031
  }
@@ -6168,7 +6178,10 @@ var FrontendVersionRoomYDoc = class {
6168
6178
  // Update page content hash
6169
6179
  //
6170
6180
  notifyDocumentationPageContentUpdated(pageId, content) {
6171
- const pageContentHash = generateHash(content);
6181
+ const pageContentHash = generatePageContentHash(content);
6182
+ if (this.debug) {
6183
+ console.log(`Will set page content hash: '${pageId}' : '${pageContentHash}'`);
6184
+ }
6172
6185
  new VersionRoomBaseYDoc(this.yDoc).updateDocumentationPageContentHashes({
6173
6186
  [pageId]: pageContentHash
6174
6187
  });
@@ -10652,11 +10665,6 @@ var BackendVersionRoomYDoc = class {
10652
10665
  }
10653
10666
  };
10654
10667
 
10655
- // src/yjs/version-room/utils.ts
10656
- function generatePageContentHash(content) {
10657
- return generateHash(content);
10658
- }
10659
-
10660
10668
 
10661
10669
 
10662
10670