@supernova-studio/client 0.47.71 → 0.47.73

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
@@ -1274,13 +1274,13 @@ var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTyp
1274
1274
  var DocumentationItemHeaderV1 = z41.object({
1275
1275
  description: z41.string(),
1276
1276
  alignment: DocumentationItemHeaderAlignmentSchema,
1277
- foregroundColor: nullishToOptional(ColorTokenData),
1278
- backgroundColor: nullishToOptional(ColorTokenData),
1279
- backgroundImageAsset: nullishToOptional(PageBlockAsset),
1277
+ foregroundColor: ColorTokenData.nullish(),
1278
+ backgroundColor: ColorTokenData.nullish(),
1279
+ backgroundImageAsset: PageBlockAsset.nullish(),
1280
1280
  backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
1281
1281
  showBackgroundOverlay: z41.boolean(),
1282
1282
  showCoverText: z41.boolean(),
1283
- minHeight: nullishToOptional(z41.number())
1283
+ minHeight: z41.number().nullish()
1284
1284
  });
1285
1285
  var defaultDocumentationItemHeaderV1 = {
1286
1286
  alignment: DocumentationItemHeaderAlignment.Left,
@@ -1302,13 +1302,13 @@ var DocumentationPageDataV1 = z43.object({
1302
1302
  var DocumentationItemHeaderV2 = z44.object({
1303
1303
  description: z44.string(),
1304
1304
  alignment: DocumentationItemHeaderAlignmentSchema,
1305
- foregroundColor: nullishToOptional(PageBlockColorV2),
1306
- backgroundColor: nullishToOptional(PageBlockColorV2),
1307
- backgroundImageAsset: nullishToOptional(PageBlockImageReference),
1305
+ foregroundColor: PageBlockColorV2.nullish(),
1306
+ backgroundColor: PageBlockColorV2.nullish(),
1307
+ backgroundImageAsset: PageBlockImageReference.nullish(),
1308
1308
  backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
1309
1309
  showBackgroundOverlay: z44.boolean(),
1310
1310
  showCoverText: z44.boolean(),
1311
- minHeight: nullishToOptional(z44.number())
1311
+ minHeight: z44.number().nullish()
1312
1312
  });
1313
1313
  var defaultDocumentationItemHeaderV2 = {
1314
1314
  alignment: DocumentationItemHeaderAlignment.Left,
@@ -1323,6 +1323,12 @@ var DocumentationItemConfigurationV2 = z45.object({
1323
1323
  isHidden: z45.boolean().optional(),
1324
1324
  header: DocumentationItemHeaderV2
1325
1325
  });
1326
+ var defaultDocumentationItemConfigurationV2 = {
1327
+ header: defaultDocumentationItemHeaderV2,
1328
+ isHidden: false,
1329
+ isPrivate: false,
1330
+ showSidebar: true
1331
+ };
1326
1332
  var DocumentationPageDataV2 = z46.object({
1327
1333
  configuration: nullishToOptional(DocumentationItemConfigurationV2)
1328
1334
  });
@@ -6162,7 +6168,7 @@ var FrontendVersionRoomYDoc = class {
6162
6168
  itemStateFromPage(page, pageContentHash) {
6163
6169
  return {
6164
6170
  title: page.meta.name,
6165
- configuration: page.data.configuration,
6171
+ configuration: page.data.configuration ?? defaultDocumentationItemConfigurationV2,
6166
6172
  contentHash: pageContentHash
6167
6173
  };
6168
6174
  }
@@ -6195,7 +6201,7 @@ var FrontendVersionRoomYDoc = class {
6195
6201
  itemStateFromGroup(group) {
6196
6202
  return {
6197
6203
  title: group.meta.name,
6198
- configuration: group.data?.configuration,
6204
+ configuration: group.data?.configuration ?? defaultDocumentationItemConfigurationV2,
6199
6205
  contentHash: "-"
6200
6206
  };
6201
6207
  }
@@ -6216,9 +6222,7 @@ var FrontendVersionRoomYDoc = class {
6216
6222
  }
6217
6223
  updatedDraftState.changes.previousTitle = publishedState.title;
6218
6224
  }
6219
- const currentStateConfigHash = currentState.configuration ? generateHash(currentState.configuration) : "default";
6220
- const publishedStateConfigHash = publishedState.configuration ? generateHash(publishedState.configuration) : "default";
6221
- if (currentStateConfigHash !== publishedStateConfigHash) {
6225
+ if (generateHash(currentState.configuration) !== generateHash(publishedState.configuration)) {
6222
6226
  if (this.debug) {
6223
6227
  console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
6224
6228
  }