@supernova-studio/client 0.51.0 → 0.51.2
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/design-system-content/documentation-hierarchy.ts +1 -0
- package/src/yjs/version-room/base.ts +6 -0
- package/src/yjs/version-room/frontend.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -2534,6 +2534,8 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
2534
2534
|
var DesignTokenOriginPart = z81.object({
|
|
2535
2535
|
referenceOriginId: z81.string().optional(),
|
|
2536
2536
|
referenceOriginKey: z81.string().optional(),
|
|
2537
|
+
referenceOriginName: z81.string().optional(),
|
|
2538
|
+
referenceOriginRemote: z81.boolean().optional(),
|
|
2537
2539
|
referencePersistentId: z81.string().optional(),
|
|
2538
2540
|
referenceResolutionFailed: z81.boolean().optional(),
|
|
2539
2541
|
key: z81.string().optional()
|
|
@@ -3861,7 +3863,8 @@ var DesignSystemVersionRoom = Entity.extend({
|
|
|
3861
3863
|
var DesignSystemVersionRoomInternalSettings = z128.object({
|
|
3862
3864
|
routingVersion: z128.string(),
|
|
3863
3865
|
isDraftFeatureAdopted: z128.boolean(),
|
|
3864
|
-
isApprovalFeatureEnabled: z128.boolean()
|
|
3866
|
+
isApprovalFeatureEnabled: z128.boolean(),
|
|
3867
|
+
approvalRequiredForPublishing: z128.boolean()
|
|
3865
3868
|
});
|
|
3866
3869
|
var DesignSystemVersionRoomInitialState = z128.object({
|
|
3867
3870
|
pages: z128.array(DocumentationPageV2),
|
|
@@ -6316,14 +6319,16 @@ var VersionRoomBaseYDoc = class {
|
|
|
6316
6319
|
const rawSettings = {
|
|
6317
6320
|
routingVersion: map.get("routingVersion"),
|
|
6318
6321
|
isDraftFeatureAdopted: map.get("isDraftFeatureAdopted") ?? false,
|
|
6319
|
-
isApprovalFeatureEnabled: map.get("isApprovalFeatureEnabled") ?? false
|
|
6322
|
+
isApprovalFeatureEnabled: map.get("isApprovalFeatureEnabled") ?? false,
|
|
6323
|
+
approvalRequiredForPublishing: map.get("approvalRequiredForPublishing") ?? false
|
|
6320
6324
|
};
|
|
6321
6325
|
const settingsParseResult = DocumentationHierarchySettings.safeParse(rawSettings);
|
|
6322
6326
|
if (!settingsParseResult.success) {
|
|
6323
6327
|
return {
|
|
6324
6328
|
routingVersion: "2",
|
|
6325
6329
|
isDraftFeatureAdopted: false,
|
|
6326
|
-
isApprovalFeatureEnabled: false
|
|
6330
|
+
isApprovalFeatureEnabled: false,
|
|
6331
|
+
approvalRequiredForPublishing: false
|
|
6327
6332
|
};
|
|
6328
6333
|
}
|
|
6329
6334
|
return settingsParseResult.data;
|
|
@@ -6333,6 +6338,10 @@ var VersionRoomBaseYDoc = class {
|
|
|
6333
6338
|
map.set("routingVersion", settings.routingVersion ?? map.get("routingVersion"));
|
|
6334
6339
|
map.set("isDraftFeatureAdopted", settings.isDraftFeatureAdopted ?? map.get("isDraftFeatureAdopted"));
|
|
6335
6340
|
map.set("isApprovalFeatureEnabled", settings.isApprovalFeatureEnabled ?? map.get("isApprovalFeatureEnabled"));
|
|
6341
|
+
map.set(
|
|
6342
|
+
"approvalRequiredForPublishing",
|
|
6343
|
+
settings.approvalRequiredForPublishing ?? map.get("approvalRequiredForPublishing")
|
|
6344
|
+
);
|
|
6336
6345
|
}
|
|
6337
6346
|
get internalSettingsYMap() {
|
|
6338
6347
|
return this.yDoc.getMap("documentationInternalSettings");
|
|
@@ -6738,6 +6747,11 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6738
6747
|
const settings = doc.getDocumentationInternalSettings();
|
|
6739
6748
|
return settings.isApprovalFeatureEnabled;
|
|
6740
6749
|
}
|
|
6750
|
+
isApprovalRequiredForPublishing() {
|
|
6751
|
+
const doc = new VersionRoomBaseYDoc(this.yDoc);
|
|
6752
|
+
const settings = doc.getDocumentationInternalSettings();
|
|
6753
|
+
return settings.approvalRequiredForPublishing;
|
|
6754
|
+
}
|
|
6741
6755
|
buildPageApprovalStates(pages) {
|
|
6742
6756
|
const doc = new VersionRoomBaseYDoc(this.yDoc);
|
|
6743
6757
|
const pageIds = pages.map((p) => p.id);
|
|
@@ -6757,7 +6771,8 @@ var FrontendVersionRoomYDoc = class {
|
|
|
6757
6771
|
var DocumentationHierarchySettings = z223.object({
|
|
6758
6772
|
routingVersion: z223.string(),
|
|
6759
6773
|
isDraftFeatureAdopted: z223.boolean(),
|
|
6760
|
-
isApprovalFeatureEnabled: z223.boolean()
|
|
6774
|
+
isApprovalFeatureEnabled: z223.boolean(),
|
|
6775
|
+
approvalRequiredForPublishing: z223.boolean()
|
|
6761
6776
|
});
|
|
6762
6777
|
function yjsToDocumentationHierarchy(doc) {
|
|
6763
6778
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|