@supernova-studio/client 0.47.31 → 0.47.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.47.31",
3
+ "version": "0.47.33",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -54,9 +54,13 @@ export function elementGroupsToDocumentationGroupFixedConfigurationDTOV1(
54
54
  >(pages, groups, getDtoDefaultItemConfigurationV1);
55
55
 
56
56
  return fixedGroups.map(group => {
57
+ const configuration = documentationItemConfigurationToDTOV1(group.data?.configuration);
58
+
57
59
  return {
58
60
  ...elementGroupToDocumentationGroupStructureDTOV1(group, childrenIdsMap),
59
- configuration: documentationItemConfigurationToDTOV1(group.data?.configuration),
61
+ // backward compatibility with custom doc exporters, anyway these groups will not be shown, so we can adjust title
62
+ title: configuration.isHidden && !group.meta.name.startsWith("_") ? "_" + group.meta.name : group.meta.name,
63
+ configuration,
60
64
  };
61
65
  });
62
66
  }
@@ -49,16 +49,19 @@ function documentationPageToDTOV1(page: DocumentationPageV1, pagePathMap: Map<st
49
49
 
50
50
  if (path.startsWith("/")) path = path.substring(1);
51
51
 
52
+ const configuration = documentationItemConfigurationToDTOV1(page.data.configuration);
53
+
52
54
  return {
53
55
  id: page.id,
54
56
  designSystemVersionId: page.designSystemVersionId,
55
57
  persistentId: page.persistentId,
56
58
  shortPersistentId: page.shortPersistentId,
57
- title: page.meta.name,
59
+ // backward compatibility with custom doc exporters, anyway these pages will not be shown, so we can adjust title
60
+ title: configuration.isHidden && !page.meta.name.startsWith("_") ? "_" + page.meta.name : page.meta.name,
58
61
  blocks: page.data.blocks,
59
62
  slug: page.slug,
60
63
  userSlug: page.userSlug,
61
- configuration: documentationItemConfigurationToDTOV1(page.data.configuration),
64
+ configuration,
62
65
  createdAt: page.createdAt,
63
66
  updatedAt: page.updatedAt,
64
67
  path: path,
@@ -41,7 +41,7 @@ import {
41
41
  PageBlockTextSpanAttribute,
42
42
  PageSectionColumnV2,
43
43
  PageSectionItemV2,
44
- nullishToOptional
44
+ nullishToOptional,
45
45
  } from "@supernova-studio/model";
46
46
  import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
47
47
  import * as Y from "yjs";