@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.d.mts
CHANGED
|
@@ -40578,12 +40578,15 @@ declare const DocumentationHierarchySettings: z.ZodObject<{
|
|
|
40578
40578
|
routingVersion: z.ZodString;
|
|
40579
40579
|
isDraftFeatureAdopted: z.ZodBoolean;
|
|
40580
40580
|
isApprovalFeatureEnabled: z.ZodBoolean;
|
|
40581
|
+
approvalRequiredForPublishing: z.ZodBoolean;
|
|
40581
40582
|
}, "strip", z.ZodTypeAny, {
|
|
40582
40583
|
isApprovalFeatureEnabled: boolean;
|
|
40584
|
+
approvalRequiredForPublishing: boolean;
|
|
40583
40585
|
routingVersion: string;
|
|
40584
40586
|
isDraftFeatureAdopted: boolean;
|
|
40585
40587
|
}, {
|
|
40586
40588
|
isApprovalFeatureEnabled: boolean;
|
|
40589
|
+
approvalRequiredForPublishing: boolean;
|
|
40587
40590
|
routingVersion: string;
|
|
40588
40591
|
isDraftFeatureAdopted: boolean;
|
|
40589
40592
|
}>;
|
|
@@ -43108,6 +43111,7 @@ declare class FrontendVersionRoomYDoc {
|
|
|
43108
43111
|
isDraftFeatureAdopted(): boolean;
|
|
43109
43112
|
hasPublishedDocumentationContent(): boolean;
|
|
43110
43113
|
isApprovalsFeatureEnabled(): boolean;
|
|
43114
|
+
isApprovalRequiredForPublishing(): boolean;
|
|
43111
43115
|
private buildPageApprovalStates;
|
|
43112
43116
|
}
|
|
43113
43117
|
|
package/dist/index.d.ts
CHANGED
|
@@ -40578,12 +40578,15 @@ declare const DocumentationHierarchySettings: z.ZodObject<{
|
|
|
40578
40578
|
routingVersion: z.ZodString;
|
|
40579
40579
|
isDraftFeatureAdopted: z.ZodBoolean;
|
|
40580
40580
|
isApprovalFeatureEnabled: z.ZodBoolean;
|
|
40581
|
+
approvalRequiredForPublishing: z.ZodBoolean;
|
|
40581
40582
|
}, "strip", z.ZodTypeAny, {
|
|
40582
40583
|
isApprovalFeatureEnabled: boolean;
|
|
40584
|
+
approvalRequiredForPublishing: boolean;
|
|
40583
40585
|
routingVersion: string;
|
|
40584
40586
|
isDraftFeatureAdopted: boolean;
|
|
40585
40587
|
}, {
|
|
40586
40588
|
isApprovalFeatureEnabled: boolean;
|
|
40589
|
+
approvalRequiredForPublishing: boolean;
|
|
40587
40590
|
routingVersion: string;
|
|
40588
40591
|
isDraftFeatureAdopted: boolean;
|
|
40589
40592
|
}>;
|
|
@@ -43108,6 +43111,7 @@ declare class FrontendVersionRoomYDoc {
|
|
|
43108
43111
|
isDraftFeatureAdopted(): boolean;
|
|
43109
43112
|
hasPublishedDocumentationContent(): boolean;
|
|
43110
43113
|
isApprovalsFeatureEnabled(): boolean;
|
|
43114
|
+
isApprovalRequiredForPublishing(): boolean;
|
|
43111
43115
|
private buildPageApprovalStates;
|
|
43112
43116
|
}
|
|
43113
43117
|
|
package/dist/index.js
CHANGED
|
@@ -2534,6 +2534,8 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
2534
2534
|
var DesignTokenOriginPart = _zod.z.object({
|
|
2535
2535
|
referenceOriginId: _zod.z.string().optional(),
|
|
2536
2536
|
referenceOriginKey: _zod.z.string().optional(),
|
|
2537
|
+
referenceOriginName: _zod.z.string().optional(),
|
|
2538
|
+
referenceOriginRemote: _zod.z.boolean().optional(),
|
|
2537
2539
|
referencePersistentId: _zod.z.string().optional(),
|
|
2538
2540
|
referenceResolutionFailed: _zod.z.boolean().optional(),
|
|
2539
2541
|
key: _zod.z.string().optional()
|
|
@@ -3861,7 +3863,8 @@ var DesignSystemVersionRoom = Entity.extend({
|
|
|
3861
3863
|
var DesignSystemVersionRoomInternalSettings = _zod.z.object({
|
|
3862
3864
|
routingVersion: _zod.z.string(),
|
|
3863
3865
|
isDraftFeatureAdopted: _zod.z.boolean(),
|
|
3864
|
-
isApprovalFeatureEnabled: _zod.z.boolean()
|
|
3866
|
+
isApprovalFeatureEnabled: _zod.z.boolean(),
|
|
3867
|
+
approvalRequiredForPublishing: _zod.z.boolean()
|
|
3865
3868
|
});
|
|
3866
3869
|
var DesignSystemVersionRoomInitialState = _zod.z.object({
|
|
3867
3870
|
pages: _zod.z.array(DocumentationPageV2),
|
|
@@ -6316,14 +6319,16 @@ var VersionRoomBaseYDoc = class {
|
|
|
6316
6319
|
const rawSettings = {
|
|
6317
6320
|
routingVersion: map.get("routingVersion"),
|
|
6318
6321
|
isDraftFeatureAdopted: _nullishCoalesce(map.get("isDraftFeatureAdopted"), () => ( false)),
|
|
6319
|
-
isApprovalFeatureEnabled: _nullishCoalesce(map.get("isApprovalFeatureEnabled"), () => ( false))
|
|
6322
|
+
isApprovalFeatureEnabled: _nullishCoalesce(map.get("isApprovalFeatureEnabled"), () => ( false)),
|
|
6323
|
+
approvalRequiredForPublishing: _nullishCoalesce(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", _nullishCoalesce(settings.routingVersion, () => ( map.get("routingVersion"))));
|
|
6334
6339
|
map.set("isDraftFeatureAdopted", _nullishCoalesce(settings.isDraftFeatureAdopted, () => ( map.get("isDraftFeatureAdopted"))));
|
|
6335
6340
|
map.set("isApprovalFeatureEnabled", _nullishCoalesce(settings.isApprovalFeatureEnabled, () => ( map.get("isApprovalFeatureEnabled"))));
|
|
6341
|
+
map.set(
|
|
6342
|
+
"approvalRequiredForPublishing",
|
|
6343
|
+
_nullishCoalesce(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 = _zod.z.object({
|
|
6758
6772
|
routingVersion: _zod.z.string(),
|
|
6759
6773
|
isDraftFeatureAdopted: _zod.z.boolean(),
|
|
6760
|
-
isApprovalFeatureEnabled: _zod.z.boolean()
|
|
6774
|
+
isApprovalFeatureEnabled: _zod.z.boolean(),
|
|
6775
|
+
approvalRequiredForPublishing: _zod.z.boolean()
|
|
6761
6776
|
});
|
|
6762
6777
|
function yjsToDocumentationHierarchy(doc) {
|
|
6763
6778
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|