@supernova-studio/client 0.47.72 → 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.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/version-room/frontend.ts +5 -9
package/dist/index.js
CHANGED
|
@@ -1323,6 +1323,12 @@ var DocumentationItemConfigurationV2 = _zod.z.object({
|
|
|
1323
1323
|
isHidden: _zod.z.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 = _zod.z.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: _nullishCoalesce(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: _optionalChain([group, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.configuration]),
|
|
6204
|
+
configuration: _nullishCoalesce(_optionalChain([group, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.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
|
-
|
|
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
|
}
|