@supernova-studio/client 0.58.19 → 0.58.21
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 +325 -3
- package/dist/index.d.ts +325 -3
- package/dist/index.js +58 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/export/exporter.ts +2 -2
- package/src/api/dto/export/job.ts +9 -0
- package/src/api/endpoints/codegen/codegen.ts +3 -0
- package/src/api/endpoints/codegen/exporters.ts +13 -1
- package/src/api/endpoints/codegen/index.ts +1 -0
- package/src/api/endpoints/codegen/jobs.ts +15 -0
package/dist/index.mjs
CHANGED
|
@@ -1692,6 +1692,7 @@ var PageBlockCodeLanguage = z40.enum([
|
|
|
1692
1692
|
]);
|
|
1693
1693
|
var PageBlockAlignment = z40.enum(["Left", "Center", "Stretch", "Right"]);
|
|
1694
1694
|
var PageBlockThemeType = z40.enum(["Override", "Comparison"]);
|
|
1695
|
+
var PageBlockTokenNameFormat = z40.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
|
|
1695
1696
|
var PageBlockAssetType = z40.enum(["image", "figmaFrame"]);
|
|
1696
1697
|
var PageBlockTilesAlignment = z40.enum(["Center", "FrameHeight"]);
|
|
1697
1698
|
var PageBlockTilesLayout = z40.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
@@ -1766,6 +1767,7 @@ var PageBlockFigmaFrameProperties = z40.object({
|
|
|
1766
1767
|
})
|
|
1767
1768
|
),
|
|
1768
1769
|
alignment: PageBlockTilesAlignment,
|
|
1770
|
+
previewContainerHeight: nullishToOptional(z40.number()),
|
|
1769
1771
|
layout: PageBlockTilesLayout,
|
|
1770
1772
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1771
1773
|
showTitles: z40.boolean()
|
|
@@ -1797,8 +1799,17 @@ var PageBlockFigmaComponentBlockConfig = z40.object({
|
|
|
1797
1799
|
showPropertyList: nullishToOptional(z40.boolean()),
|
|
1798
1800
|
previewOrderIds: nullishToOptional(z40.array(z40.string())),
|
|
1799
1801
|
previewContainerSize: nullishToOptional(z40.enum(["Centered", "NaturalHeight"])),
|
|
1802
|
+
previewContainerHeight: nullishToOptional(z40.number()),
|
|
1800
1803
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
1801
1804
|
});
|
|
1805
|
+
var PageBlockTokenBlockConfig = z40.object({
|
|
1806
|
+
tokenNameFormat: nullishToOptional(PageBlockTokenNameFormat),
|
|
1807
|
+
tokenNameCustomPropertyId: nullishToOptional(z40.string())
|
|
1808
|
+
});
|
|
1809
|
+
var PageBlockAssetBlockConfig = z40.object({
|
|
1810
|
+
showSearch: nullishToOptional(z40.boolean()),
|
|
1811
|
+
showAssetDescription: nullishToOptional(z40.boolean())
|
|
1812
|
+
});
|
|
1802
1813
|
var PageBlockSelectedFigmaComponent = z40.object({
|
|
1803
1814
|
figmaComponentId: z40.string(),
|
|
1804
1815
|
selectedComponentProperties: z40.string().array()
|
|
@@ -1829,7 +1840,9 @@ var PageBlockGuideline = z40.object({
|
|
|
1829
1840
|
type: z40.string(),
|
|
1830
1841
|
imageAlt: nullishToOptional(z40.string()),
|
|
1831
1842
|
imageCaption: nullishToOptional(z40.string()),
|
|
1832
|
-
imageAlignment: nullishToOptional(PageBlockAlignment)
|
|
1843
|
+
imageAlignment: nullishToOptional(PageBlockAlignment),
|
|
1844
|
+
openLightbox: nullishToOptional(z40.boolean()),
|
|
1845
|
+
isBordered: nullishToOptional(z40.boolean())
|
|
1833
1846
|
});
|
|
1834
1847
|
var PageBlockBaseV1 = z40.object({
|
|
1835
1848
|
persistentId: z40.string(),
|
|
@@ -1856,6 +1869,8 @@ var PageBlockBaseV1 = z40.object({
|
|
|
1856
1869
|
asset: nullishToOptional(PageBlockAsset),
|
|
1857
1870
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1858
1871
|
imageAlt: nullishToOptional(z40.string()),
|
|
1872
|
+
openLightbox: nullishToOptional(z40.boolean()),
|
|
1873
|
+
isBordered: nullishToOptional(z40.boolean()),
|
|
1859
1874
|
// Shortcuts block
|
|
1860
1875
|
shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
|
|
1861
1876
|
// Guidelines
|
|
@@ -1877,10 +1892,13 @@ var PageBlockBaseV1 = z40.object({
|
|
|
1877
1892
|
// Tables
|
|
1878
1893
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1879
1894
|
columnId: nullishToOptional(z40.string()),
|
|
1880
|
-
//
|
|
1895
|
+
// Design tokens
|
|
1881
1896
|
theme: nullishToOptional(PageBlockTheme),
|
|
1882
1897
|
swatches: nullishToOptional(PageBlockSwatch.array()),
|
|
1883
1898
|
blacklistedElementProperties: nullishToOptional(z40.array(z40.string())),
|
|
1899
|
+
tokenBlockConfig: nullishToOptional(PageBlockTokenBlockConfig),
|
|
1900
|
+
// (Vector) assets
|
|
1901
|
+
assetBlockConfig: nullishToOptional(PageBlockAssetBlockConfig),
|
|
1884
1902
|
// Figma components
|
|
1885
1903
|
figmaComponentsBlockConfig: nullishToOptional(PageBlockFigmaComponentBlockConfig),
|
|
1886
1904
|
selectedFigmaComponent: nullishToOptional(PageBlockSelectedFigmaComponent),
|
|
@@ -2178,7 +2196,6 @@ var PageBlockImageAlignment = z44.enum(["Left", "Center", "Stretch"]);
|
|
|
2178
2196
|
var PageBlockTableCellAlignment = z44.enum(["Left", "Center", "Right"]);
|
|
2179
2197
|
var PageBlockPreviewContainerSize = z44.enum(["Centered", "NaturalHeight"]);
|
|
2180
2198
|
var PageBlockThemeDisplayMode = z44.enum(["Split", "Override"]);
|
|
2181
|
-
var PageBlockTokenNameFormat = z44.enum(["Name", "GroupAndName", "FullPath", "CustomProperty"]);
|
|
2182
2199
|
var PageBlockTokenValueFormat = z44.enum(["ResolvedValue", "ReferenceName", "NoValue"]);
|
|
2183
2200
|
var PageBlockImageResourceReference = z44.object({
|
|
2184
2201
|
resourceId: z44.string(),
|
|
@@ -2427,7 +2444,9 @@ var PageBlockItemTableImageNode = z44.object({
|
|
|
2427
2444
|
caption: PageBlockItemImageValue.shape.caption,
|
|
2428
2445
|
alt: PageBlockItemImageValue.shape.alt,
|
|
2429
2446
|
value: PageBlockItemImageValue.shape.value,
|
|
2430
|
-
alignment: PageBlockItemImageValue.shape.alignment
|
|
2447
|
+
alignment: PageBlockItemImageValue.shape.alignment,
|
|
2448
|
+
openLightbox: PageBlockItemImageValue.shape.openLightbox,
|
|
2449
|
+
isBordered: PageBlockItemImageValue.shape.isBordered
|
|
2431
2450
|
});
|
|
2432
2451
|
var PageBlockItemTableNode = z44.discriminatedUnion("type", [
|
|
2433
2452
|
PageBlockItemTableRichTextNode,
|
|
@@ -6360,7 +6379,7 @@ var DTOExporterMembership = z225.object({
|
|
|
6360
6379
|
exporterId: z225.string(),
|
|
6361
6380
|
role: DTOExporterMembershipRole
|
|
6362
6381
|
});
|
|
6363
|
-
var
|
|
6382
|
+
var DTOExporterResponse = z225.object({
|
|
6364
6383
|
exporter: DTOExporter,
|
|
6365
6384
|
membership: DTOExporterMembership
|
|
6366
6385
|
});
|
|
@@ -6432,6 +6451,12 @@ var DTOExportJob = z226.object({
|
|
|
6432
6451
|
var DTOExportJobResponse = z226.object({
|
|
6433
6452
|
job: DTOExportJob
|
|
6434
6453
|
});
|
|
6454
|
+
var DTOExportJobResponseLegacy = z226.object({
|
|
6455
|
+
job: z226.object({
|
|
6456
|
+
id: z226.string(),
|
|
6457
|
+
status: ExportJobStatus
|
|
6458
|
+
})
|
|
6459
|
+
});
|
|
6435
6460
|
|
|
6436
6461
|
// src/api/dto/export/pipeline.ts
|
|
6437
6462
|
import { z as z227 } from "zod";
|
|
@@ -7238,11 +7263,34 @@ var ExportersEndpoint = class {
|
|
|
7238
7263
|
constructor(requestExecutor) {
|
|
7239
7264
|
this.requestExecutor = requestExecutor;
|
|
7240
7265
|
}
|
|
7266
|
+
add(workspaceId, body) {
|
|
7267
|
+
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterResponse, {
|
|
7268
|
+
body,
|
|
7269
|
+
method: "POST"
|
|
7270
|
+
});
|
|
7271
|
+
}
|
|
7241
7272
|
list(workspaceId, query) {
|
|
7242
7273
|
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterListResponse, {
|
|
7243
7274
|
query: serializeQuery(query)
|
|
7244
7275
|
});
|
|
7245
7276
|
}
|
|
7277
|
+
get(workspaceId, exporterId) {
|
|
7278
|
+
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters/${exporterId}`, DTOExporterResponse);
|
|
7279
|
+
}
|
|
7280
|
+
};
|
|
7281
|
+
|
|
7282
|
+
// src/api/endpoints/codegen/jobs.ts
|
|
7283
|
+
import { z as z252 } from "zod";
|
|
7284
|
+
var ExporterJobsEndpoint = class {
|
|
7285
|
+
constructor(requestExecutor) {
|
|
7286
|
+
this.requestExecutor = requestExecutor;
|
|
7287
|
+
}
|
|
7288
|
+
list(workspaceId) {
|
|
7289
|
+
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/jobs`, z252.any());
|
|
7290
|
+
}
|
|
7291
|
+
get(workspaceId, jobId) {
|
|
7292
|
+
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/jobs/${jobId}`, DTOExportJobResponseLegacy);
|
|
7293
|
+
}
|
|
7246
7294
|
};
|
|
7247
7295
|
|
|
7248
7296
|
// src/api/endpoints/codegen/pipelines.ts
|
|
@@ -7282,13 +7330,15 @@ var CodegenEndpoint = class {
|
|
|
7282
7330
|
this.requestExecutor = requestExecutor;
|
|
7283
7331
|
__publicField(this, "exporters");
|
|
7284
7332
|
__publicField(this, "pipelines");
|
|
7333
|
+
__publicField(this, "jobs");
|
|
7285
7334
|
this.pipelines = new PipelinesEndpoint(requestExecutor);
|
|
7286
7335
|
this.exporters = new ExportersEndpoint(requestExecutor);
|
|
7336
|
+
this.jobs = new ExporterJobsEndpoint(requestExecutor);
|
|
7287
7337
|
}
|
|
7288
7338
|
};
|
|
7289
7339
|
|
|
7290
7340
|
// src/api/endpoints/design-system/versions/brands.ts
|
|
7291
|
-
import { z as
|
|
7341
|
+
import { z as z253 } from "zod";
|
|
7292
7342
|
var BrandsEndpoint = class {
|
|
7293
7343
|
constructor(requestExecutor) {
|
|
7294
7344
|
this.requestExecutor = requestExecutor;
|
|
@@ -7322,7 +7372,7 @@ var BrandsEndpoint = class {
|
|
|
7322
7372
|
});
|
|
7323
7373
|
}
|
|
7324
7374
|
delete(dsId, vId, brandId) {
|
|
7325
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`,
|
|
7375
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`, z253.any(), {
|
|
7326
7376
|
method: "DELETE"
|
|
7327
7377
|
});
|
|
7328
7378
|
}
|
|
@@ -7479,7 +7529,7 @@ var ImportJobsEndpoint = class {
|
|
|
7479
7529
|
};
|
|
7480
7530
|
|
|
7481
7531
|
// src/api/endpoints/design-system/versions/overrides.ts
|
|
7482
|
-
import { z as
|
|
7532
|
+
import { z as z254 } from "zod";
|
|
7483
7533
|
var OverridesEndpoint = class {
|
|
7484
7534
|
constructor(requestExecutor) {
|
|
7485
7535
|
this.requestExecutor = requestExecutor;
|
|
@@ -7487,7 +7537,7 @@ var OverridesEndpoint = class {
|
|
|
7487
7537
|
create(dsId, versionId, themeId, body) {
|
|
7488
7538
|
return this.requestExecutor.json(
|
|
7489
7539
|
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}/overrides`,
|
|
7490
|
-
|
|
7540
|
+
z254.any(),
|
|
7491
7541
|
{
|
|
7492
7542
|
method: "POST",
|
|
7493
7543
|
body
|
|
@@ -7497,7 +7547,7 @@ var OverridesEndpoint = class {
|
|
|
7497
7547
|
};
|
|
7498
7548
|
|
|
7499
7549
|
// src/api/endpoints/design-system/versions/property-definitions.ts
|
|
7500
|
-
import { z as
|
|
7550
|
+
import { z as z255 } from "zod";
|
|
7501
7551
|
var ElementPropertyDefinitionsEndpoint = class {
|
|
7502
7552
|
constructor(requestExecutor) {
|
|
7503
7553
|
this.requestExecutor = requestExecutor;
|
|
@@ -7525,7 +7575,7 @@ var ElementPropertyDefinitionsEndpoint = class {
|
|
|
7525
7575
|
delete(designSystemId, versionId, defId) {
|
|
7526
7576
|
return this.requestExecutor.json(
|
|
7527
7577
|
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
7528
|
-
|
|
7578
|
+
z255.any(),
|
|
7529
7579
|
{ method: "DELETE" }
|
|
7530
7580
|
);
|
|
7531
7581
|
}
|
|
@@ -7564,7 +7614,7 @@ var VersionStatsEndpoint = class {
|
|
|
7564
7614
|
};
|
|
7565
7615
|
|
|
7566
7616
|
// src/api/endpoints/design-system/versions/themes.ts
|
|
7567
|
-
import { z as
|
|
7617
|
+
import { z as z256 } from "zod";
|
|
7568
7618
|
var ThemesEndpoint = class {
|
|
7569
7619
|
constructor(requestExecutor) {
|
|
7570
7620
|
this.requestExecutor = requestExecutor;
|
|
@@ -7587,7 +7637,7 @@ var ThemesEndpoint = class {
|
|
|
7587
7637
|
});
|
|
7588
7638
|
}
|
|
7589
7639
|
delete(dsId, versionId, themeId) {
|
|
7590
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`,
|
|
7640
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`, z256.any(), {
|
|
7591
7641
|
method: "DELETE"
|
|
7592
7642
|
});
|
|
7593
7643
|
}
|
|
@@ -7734,7 +7784,7 @@ var DesignSystemContactsEndpoint = class {
|
|
|
7734
7784
|
};
|
|
7735
7785
|
|
|
7736
7786
|
// src/api/endpoints/design-system/design-systems.ts
|
|
7737
|
-
import { z as
|
|
7787
|
+
import { z as z258 } from "zod";
|
|
7738
7788
|
|
|
7739
7789
|
// src/api/endpoints/design-system/members.ts
|
|
7740
7790
|
var DesignSystemMembersEndpoint = class {
|
|
@@ -7755,7 +7805,7 @@ var DesignSystemMembersEndpoint = class {
|
|
|
7755
7805
|
};
|
|
7756
7806
|
|
|
7757
7807
|
// src/api/endpoints/design-system/sources.ts
|
|
7758
|
-
import { z as
|
|
7808
|
+
import { z as z257 } from "zod";
|
|
7759
7809
|
var DesignSystemSourcesEndpoint = class {
|
|
7760
7810
|
constructor(requestExecutor) {
|
|
7761
7811
|
this.requestExecutor = requestExecutor;
|
|
@@ -7770,7 +7820,7 @@ var DesignSystemSourcesEndpoint = class {
|
|
|
7770
7820
|
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
7771
7821
|
}
|
|
7772
7822
|
delete(dsId, sourceId) {
|
|
7773
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`,
|
|
7823
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z257.any(), { method: "DELETE" });
|
|
7774
7824
|
}
|
|
7775
7825
|
figmaImport(dsId, payload) {
|
|
7776
7826
|
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
@@ -7805,7 +7855,7 @@ var DesignSystemsEndpoint = class {
|
|
|
7805
7855
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
|
|
7806
7856
|
}
|
|
7807
7857
|
delete(dsId) {
|
|
7808
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`,
|
|
7858
|
+
return this.requestExecutor.json(`/design-systems/${dsId}`, z258.any(), { method: "DELETE" });
|
|
7809
7859
|
}
|
|
7810
7860
|
update(dsId, body) {
|
|
7811
7861
|
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
@@ -7849,7 +7899,7 @@ var WorkspaceInvitationsEndpoint = class {
|
|
|
7849
7899
|
};
|
|
7850
7900
|
|
|
7851
7901
|
// src/api/endpoints/workspaces/workspace-members.ts
|
|
7852
|
-
import { z as
|
|
7902
|
+
import { z as z259 } from "zod";
|
|
7853
7903
|
var WorkspaceMembersEndpoint = class {
|
|
7854
7904
|
constructor(requestExecutor) {
|
|
7855
7905
|
this.requestExecutor = requestExecutor;
|
|
@@ -7866,7 +7916,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7866
7916
|
});
|
|
7867
7917
|
}
|
|
7868
7918
|
invite(workspaceId, body) {
|
|
7869
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
7919
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, z259.any(), { method: "POST", body });
|
|
7870
7920
|
}
|
|
7871
7921
|
delete(workspaceId, userId) {
|
|
7872
7922
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/members/${userId}`, DTOWorkspaceResponse, {
|
|
@@ -7876,7 +7926,7 @@ var WorkspaceMembersEndpoint = class {
|
|
|
7876
7926
|
};
|
|
7877
7927
|
|
|
7878
7928
|
// src/api/endpoints/workspaces/workspaces.ts
|
|
7879
|
-
import { z as
|
|
7929
|
+
import { z as z260 } from "zod";
|
|
7880
7930
|
var WorkspacesEndpoint = class {
|
|
7881
7931
|
constructor(requestExecutor) {
|
|
7882
7932
|
this.requestExecutor = requestExecutor;
|
|
@@ -7899,10 +7949,10 @@ var WorkspacesEndpoint = class {
|
|
|
7899
7949
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
7900
7950
|
}
|
|
7901
7951
|
delete(workspaceId) {
|
|
7902
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}`,
|
|
7952
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z260.any(), { method: "DELETE" });
|
|
7903
7953
|
}
|
|
7904
7954
|
subscription(workspaceId) {
|
|
7905
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`,
|
|
7955
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/subscription`, z260.any(), { method: "GET" });
|
|
7906
7956
|
}
|
|
7907
7957
|
transferOwnership(workspaceId, body) {
|
|
7908
7958
|
return this.requestExecutor.json(`/workspaces/${workspaceId}/ownership`, DTOWorkspaceResponse, {
|
|
@@ -8002,9 +8052,9 @@ ${bodyText}`,
|
|
|
8002
8052
|
|
|
8003
8053
|
// src/api/transport/request-executor.ts
|
|
8004
8054
|
import fetch from "node-fetch";
|
|
8005
|
-
import { z as
|
|
8006
|
-
var ResponseWrapper =
|
|
8007
|
-
result:
|
|
8055
|
+
import { z as z261 } from "zod";
|
|
8056
|
+
var ResponseWrapper = z261.object({
|
|
8057
|
+
result: z261.record(z261.any())
|
|
8008
8058
|
});
|
|
8009
8059
|
var RequestExecutor = class {
|
|
8010
8060
|
constructor(testServerConfig) {
|
|
@@ -8081,7 +8131,7 @@ var SupernovaApiClient = class {
|
|
|
8081
8131
|
};
|
|
8082
8132
|
|
|
8083
8133
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8084
|
-
import { z as
|
|
8134
|
+
import { z as z262 } from "zod";
|
|
8085
8135
|
|
|
8086
8136
|
// src/yjs/version-room/base.ts
|
|
8087
8137
|
var VersionRoomBaseYDoc = class {
|
|
@@ -8611,24 +8661,24 @@ var FrontendVersionRoomYDoc = class {
|
|
|
8611
8661
|
};
|
|
8612
8662
|
|
|
8613
8663
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
8614
|
-
var DocumentationHierarchySettings =
|
|
8615
|
-
routingVersion:
|
|
8616
|
-
isDraftFeatureAdopted:
|
|
8617
|
-
isApprovalFeatureEnabled:
|
|
8618
|
-
approvalRequiredForPublishing:
|
|
8664
|
+
var DocumentationHierarchySettings = z262.object({
|
|
8665
|
+
routingVersion: z262.string(),
|
|
8666
|
+
isDraftFeatureAdopted: z262.boolean(),
|
|
8667
|
+
isApprovalFeatureEnabled: z262.boolean(),
|
|
8668
|
+
approvalRequiredForPublishing: z262.boolean()
|
|
8619
8669
|
});
|
|
8620
8670
|
function yjsToDocumentationHierarchy(doc) {
|
|
8621
8671
|
return new FrontendVersionRoomYDoc(doc).getDocumentationHierarchy();
|
|
8622
8672
|
}
|
|
8623
8673
|
|
|
8624
8674
|
// src/yjs/design-system-content/item-configuration.ts
|
|
8625
|
-
import { z as
|
|
8626
|
-
var DTODocumentationPageRoomHeaderData =
|
|
8627
|
-
title:
|
|
8675
|
+
import { z as z263 } from "zod";
|
|
8676
|
+
var DTODocumentationPageRoomHeaderData = z263.object({
|
|
8677
|
+
title: z263.string(),
|
|
8628
8678
|
configuration: DTODocumentationItemConfigurationV2
|
|
8629
8679
|
});
|
|
8630
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
8631
|
-
title:
|
|
8680
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z263.object({
|
|
8681
|
+
title: z263.string().optional(),
|
|
8632
8682
|
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
8633
8683
|
});
|
|
8634
8684
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -8679,7 +8729,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
8679
8729
|
header: rawHeader
|
|
8680
8730
|
};
|
|
8681
8731
|
return {
|
|
8682
|
-
title:
|
|
8732
|
+
title: z263.string().parse(title),
|
|
8683
8733
|
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
8684
8734
|
};
|
|
8685
8735
|
}
|
|
@@ -8689,9 +8739,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
8689
8739
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
8690
8740
|
|
|
8691
8741
|
// src/yjs/docs-editor/model/page.ts
|
|
8692
|
-
import { z as
|
|
8693
|
-
var DocumentationPageEditorModel =
|
|
8694
|
-
blocks:
|
|
8742
|
+
import { z as z264 } from "zod";
|
|
8743
|
+
var DocumentationPageEditorModel = z264.object({
|
|
8744
|
+
blocks: z264.array(DocumentationPageContentItem)
|
|
8695
8745
|
});
|
|
8696
8746
|
|
|
8697
8747
|
// src/yjs/docs-editor/prosemirror/inner-editor-schema.ts
|
|
@@ -12212,7 +12262,7 @@ var blocks = [
|
|
|
12212
12262
|
|
|
12213
12263
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
12214
12264
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
12215
|
-
import { z as
|
|
12265
|
+
import { z as z265 } from "zod";
|
|
12216
12266
|
function yDocToPage(yDoc, definitions) {
|
|
12217
12267
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
12218
12268
|
}
|
|
@@ -12292,7 +12342,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
12292
12342
|
return null;
|
|
12293
12343
|
return {
|
|
12294
12344
|
id,
|
|
12295
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
12345
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z265.string()) ?? "",
|
|
12296
12346
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
12297
12347
|
};
|
|
12298
12348
|
}
|
|
@@ -12327,7 +12377,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
12327
12377
|
});
|
|
12328
12378
|
}
|
|
12329
12379
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
12330
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
12380
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z265.string());
|
|
12331
12381
|
if (!definitionId) {
|
|
12332
12382
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
12333
12383
|
return [];
|
|
@@ -12369,7 +12419,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
12369
12419
|
if (!id)
|
|
12370
12420
|
return null;
|
|
12371
12421
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12372
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
12422
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z265.string().optional()));
|
|
12373
12423
|
return {
|
|
12374
12424
|
id,
|
|
12375
12425
|
type: "Block",
|
|
@@ -12497,10 +12547,10 @@ function parseRichTextAttribute(mark) {
|
|
|
12497
12547
|
return null;
|
|
12498
12548
|
}
|
|
12499
12549
|
function parseProsemirrorLink(mark) {
|
|
12500
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
12550
|
+
const href = getProsemirrorAttribute(mark, "href", z265.string().optional());
|
|
12501
12551
|
if (!href)
|
|
12502
12552
|
return null;
|
|
12503
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
12553
|
+
const target = getProsemirrorAttribute(mark, "target", z265.string().optional());
|
|
12504
12554
|
const openInNewTab = target === "_blank";
|
|
12505
12555
|
if (href.startsWith("@")) {
|
|
12506
12556
|
return {
|
|
@@ -12519,10 +12569,10 @@ function parseProsemirrorLink(mark) {
|
|
|
12519
12569
|
}
|
|
12520
12570
|
}
|
|
12521
12571
|
function parseProsemirrorCommentHighlight(mark) {
|
|
12522
|
-
const highlightId = getProsemirrorAttribute(mark, "highlightId",
|
|
12572
|
+
const highlightId = getProsemirrorAttribute(mark, "highlightId", z265.string().optional());
|
|
12523
12573
|
if (!highlightId)
|
|
12524
12574
|
return null;
|
|
12525
|
-
const isResolved = getProsemirrorAttribute(mark, "resolved",
|
|
12575
|
+
const isResolved = getProsemirrorAttribute(mark, "resolved", z265.boolean().optional()) ?? false;
|
|
12526
12576
|
return {
|
|
12527
12577
|
type: "Comment",
|
|
12528
12578
|
commentHighlightId: highlightId,
|
|
@@ -12534,7 +12584,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
12534
12584
|
if (!id)
|
|
12535
12585
|
return null;
|
|
12536
12586
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
12537
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
12587
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z265.boolean().optional()) !== false;
|
|
12538
12588
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
12539
12589
|
if (!tableChild) {
|
|
12540
12590
|
return emptyTable(id, variantId, 0);
|
|
@@ -12581,9 +12631,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
12581
12631
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
12582
12632
|
if (!id)
|
|
12583
12633
|
return null;
|
|
12584
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
12634
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z265.string().optional());
|
|
12585
12635
|
let columnWidth;
|
|
12586
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
12636
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z265.array(z265.number()).nullish());
|
|
12587
12637
|
if (columnWidthArray) {
|
|
12588
12638
|
columnWidth = roundDimension(columnWidthArray[0]);
|
|
12589
12639
|
}
|
|
@@ -12621,7 +12671,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
12621
12671
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
12622
12672
|
};
|
|
12623
12673
|
case "image":
|
|
12624
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12674
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z265.string());
|
|
12625
12675
|
if (!items)
|
|
12626
12676
|
return null;
|
|
12627
12677
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -12741,7 +12791,7 @@ function definitionExpectsPlaceholderItem(definition) {
|
|
|
12741
12791
|
);
|
|
12742
12792
|
}
|
|
12743
12793
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
12744
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
12794
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z265.string());
|
|
12745
12795
|
if (!itemsString)
|
|
12746
12796
|
return null;
|
|
12747
12797
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -12753,18 +12803,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
12753
12803
|
}
|
|
12754
12804
|
function parseAppearance(prosemirrorNode) {
|
|
12755
12805
|
let appearance = {};
|
|
12756
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
12806
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z265.string().optional());
|
|
12757
12807
|
if (rawAppearanceString) {
|
|
12758
12808
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
12759
12809
|
if (parsedAppearance.success) {
|
|
12760
12810
|
appearance = parsedAppearance.data;
|
|
12761
12811
|
}
|
|
12762
12812
|
}
|
|
12763
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
12813
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z265.number().optional());
|
|
12764
12814
|
if (columns) {
|
|
12765
12815
|
appearance.numberOfColumns = columns;
|
|
12766
12816
|
}
|
|
12767
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
12817
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z265.string().optional());
|
|
12768
12818
|
if (backgroundColor) {
|
|
12769
12819
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
12770
12820
|
if (parsedColor.success) {
|
|
@@ -12859,13 +12909,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
12859
12909
|
}
|
|
12860
12910
|
}
|
|
12861
12911
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
12862
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
12912
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z265.string());
|
|
12863
12913
|
if (!id)
|
|
12864
12914
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
12865
12915
|
return id;
|
|
12866
12916
|
}
|
|
12867
12917
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
12868
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
12918
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z265.string()));
|
|
12869
12919
|
}
|
|
12870
12920
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
12871
12921
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -13091,11 +13141,11 @@ export {
|
|
|
13091
13141
|
DTOExportJobDesignSystemVersionPreview,
|
|
13092
13142
|
DTOExportJobDestinations,
|
|
13093
13143
|
DTOExportJobResponse,
|
|
13144
|
+
DTOExportJobResponseLegacy,
|
|
13094
13145
|
DTOExportJobResult,
|
|
13095
13146
|
DTOExportJobsListFilter,
|
|
13096
13147
|
DTOExporter,
|
|
13097
13148
|
DTOExporterCreateInput,
|
|
13098
|
-
DTOExporterCreateOutput,
|
|
13099
13149
|
DTOExporterGitProviderEnum,
|
|
13100
13150
|
DTOExporterListQuery,
|
|
13101
13151
|
DTOExporterListResponse,
|
|
@@ -13112,6 +13162,7 @@ export {
|
|
|
13112
13162
|
DTOExporterPropertyDefinitionValueMap,
|
|
13113
13163
|
DTOExporterPropertyDefinitionsResponse,
|
|
13114
13164
|
DTOExporterPropertyType,
|
|
13165
|
+
DTOExporterResponse,
|
|
13115
13166
|
DTOExporterSource,
|
|
13116
13167
|
DTOExporterType,
|
|
13117
13168
|
DTOExporterUpdateInput,
|
|
@@ -13227,6 +13278,7 @@ export {
|
|
|
13227
13278
|
ElementPropertyValuesEndpoint,
|
|
13228
13279
|
ElementsActionEndpoint,
|
|
13229
13280
|
ElementsEndpoint,
|
|
13281
|
+
ExporterJobsEndpoint,
|
|
13230
13282
|
ExportersEndpoint,
|
|
13231
13283
|
FigmaComponentGroupsEndpoint,
|
|
13232
13284
|
FigmaComponentsEndpoint,
|