@supernova-studio/model 0.52.18 → 0.53.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 +2003 -1362
- package/dist/index.d.ts +2003 -1362
- package/dist/index.js +217 -207
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +857 -847
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/documentation/block-definitions/item.ts +1 -1
- package/src/dsm/elements/data/documentation-block-v2.ts +30 -11
- package/src/helpers/nullish-to-optional.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -457,7 +457,7 @@ function isImportedAsset(asset) {
|
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
// src/dsm/components/asset-rendering.ts
|
|
460
|
-
import { z as
|
|
460
|
+
import { z as z98 } from "zod";
|
|
461
461
|
|
|
462
462
|
// src/dsm/import/support/figma-files.ts
|
|
463
463
|
import { z as z22 } from "zod";
|
|
@@ -475,10 +475,10 @@ var FigmaFileAccessData = z22.object({
|
|
|
475
475
|
});
|
|
476
476
|
|
|
477
477
|
// src/dsm/import/support/import-context.ts
|
|
478
|
-
import { z as
|
|
478
|
+
import { z as z89 } from "zod";
|
|
479
479
|
|
|
480
480
|
// src/dsm/data-sources/data-source.ts
|
|
481
|
-
import { z as
|
|
481
|
+
import { z as z87 } from "zod";
|
|
482
482
|
|
|
483
483
|
// src/dsm/import/warning.ts
|
|
484
484
|
import { z as z23 } from "zod";
|
|
@@ -509,7 +509,7 @@ var ImportWarning = z23.object({
|
|
|
509
509
|
});
|
|
510
510
|
|
|
511
511
|
// src/dsm/data-sources/import-summary.ts
|
|
512
|
-
import { z as
|
|
512
|
+
import { z as z86 } from "zod";
|
|
513
513
|
|
|
514
514
|
// src/dsm/elements/data/base.ts
|
|
515
515
|
import { z as z24 } from "zod";
|
|
@@ -2027,280 +2027,486 @@ function sanitizeSpanAttribute(attribute) {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
|
|
2029
2029
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
2030
|
+
import { z as z44 } from "zod";
|
|
2031
|
+
|
|
2032
|
+
// src/dsm/documentation/block-definitions/item.ts
|
|
2033
|
+
import { z as z43 } from "zod";
|
|
2034
|
+
|
|
2035
|
+
// src/dsm/documentation/block-definitions/aux.ts
|
|
2030
2036
|
import { z as z41 } from "zod";
|
|
2031
|
-
var
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
var
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2037
|
+
var PageBlockDefinitionAppearance = z41.object({
|
|
2038
|
+
isBordered: z41.boolean().optional(),
|
|
2039
|
+
hasBackground: z41.boolean().optional(),
|
|
2040
|
+
isEditorPresentationDifferent: z41.boolean().optional(),
|
|
2041
|
+
showBlockHeaderInEditor: z41.boolean().optional()
|
|
2042
|
+
});
|
|
2043
|
+
|
|
2044
|
+
// src/dsm/documentation/block-definitions/variant.ts
|
|
2045
|
+
import { z as z42 } from "zod";
|
|
2046
|
+
var PageBlockDefinitionLayoutType = z42.enum(["Column", "Row"]);
|
|
2047
|
+
var PageBlockDefinitionLayoutGap = z42.enum(["Small", "Medium", "Large", "None"]);
|
|
2048
|
+
var PageBlockDefinitionLayoutAlign = z42.enum(["Start", "Center", "End"]);
|
|
2049
|
+
var PageBlockDefinitionLayoutResizing = z42.enum(["Fill", "Hug"]);
|
|
2050
|
+
var PageBlockDefinitionLayoutBase = z42.object({
|
|
2051
|
+
type: PageBlockDefinitionLayoutType,
|
|
2052
|
+
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2053
|
+
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2054
|
+
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2055
|
+
});
|
|
2056
|
+
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2057
|
+
children: z42.lazy(() => z42.array(PageBlockDefinitionLayout.or(z42.string())))
|
|
2058
|
+
});
|
|
2059
|
+
var PageBlockDefinitionVariant = z42.object({
|
|
2060
|
+
id: z42.string(),
|
|
2061
|
+
name: z42.string(),
|
|
2062
|
+
image: z42.string().optional(),
|
|
2063
|
+
description: z42.string().optional(),
|
|
2064
|
+
documentationLink: z42.string().optional(),
|
|
2065
|
+
layout: PageBlockDefinitionLayout,
|
|
2066
|
+
maxColumns: z42.number().optional(),
|
|
2067
|
+
defaultColumns: z42.number().optional(),
|
|
2068
|
+
appearance: PageBlockDefinitionAppearance.optional()
|
|
2069
|
+
});
|
|
2070
|
+
|
|
2071
|
+
// src/dsm/documentation/block-definitions/item.ts
|
|
2072
|
+
var PageBlockDefinitionPropertyType = z43.enum([
|
|
2073
|
+
"RichText",
|
|
2074
|
+
"MultiRichText",
|
|
2075
|
+
"RichTextEditor",
|
|
2076
|
+
"Text",
|
|
2077
|
+
"Boolean",
|
|
2078
|
+
"Number",
|
|
2079
|
+
"SingleSelect",
|
|
2080
|
+
"MultiSelect",
|
|
2081
|
+
"Image",
|
|
2082
|
+
"Token",
|
|
2083
|
+
"TokenType",
|
|
2084
|
+
"TokenProperty",
|
|
2085
|
+
"Component",
|
|
2086
|
+
"ComponentProperty",
|
|
2087
|
+
"Asset",
|
|
2088
|
+
"AssetProperty",
|
|
2089
|
+
"FigmaNode",
|
|
2090
|
+
"EmbedURL",
|
|
2091
|
+
"URL",
|
|
2092
|
+
"Markdown",
|
|
2093
|
+
"Code",
|
|
2094
|
+
"CodeSandbox",
|
|
2095
|
+
"Table",
|
|
2096
|
+
"Divider",
|
|
2097
|
+
"Storybook",
|
|
2098
|
+
"Color",
|
|
2099
|
+
"FigmaComponent"
|
|
2100
|
+
]);
|
|
2101
|
+
var PageBlockDefinitionRichTextPropertyStyle = z43.enum([
|
|
2102
|
+
"Title1",
|
|
2103
|
+
"Title2",
|
|
2104
|
+
"Title3",
|
|
2105
|
+
"Title4",
|
|
2106
|
+
"Title5",
|
|
2107
|
+
"Quote",
|
|
2108
|
+
"Callout",
|
|
2109
|
+
"Default"
|
|
2110
|
+
]);
|
|
2111
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z43.enum(["OL", "UL"]);
|
|
2112
|
+
var PageBlockDefinitionRichTextEditorPropertyStyle = z43.enum([
|
|
2113
|
+
"OL",
|
|
2114
|
+
"UL",
|
|
2115
|
+
"Bold",
|
|
2116
|
+
"Italic",
|
|
2117
|
+
"Link",
|
|
2118
|
+
"Strikethrough",
|
|
2119
|
+
"InlineCode"
|
|
2120
|
+
]);
|
|
2121
|
+
var PageBlockDefinitionTextPropertyStyle = z43.enum([
|
|
2122
|
+
"Title1",
|
|
2123
|
+
"Title2",
|
|
2124
|
+
"Title3",
|
|
2125
|
+
"Title4",
|
|
2126
|
+
"Title5",
|
|
2127
|
+
"Default",
|
|
2128
|
+
"DefaultBold",
|
|
2129
|
+
"DefaultSemibold",
|
|
2130
|
+
"Small",
|
|
2131
|
+
"SmallBold",
|
|
2132
|
+
"SmallSemibold",
|
|
2133
|
+
"Custom"
|
|
2134
|
+
]);
|
|
2135
|
+
var PageBlockDefinitionTextPropertyColor = z43.enum(["Neutral", "NeutralFaded"]);
|
|
2136
|
+
var PageBlockDefinitionBooleanPropertyStyle = z43.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2137
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z43.enum([
|
|
2138
|
+
"SegmentedControl",
|
|
2139
|
+
"ToggleButton",
|
|
2140
|
+
"Select",
|
|
2141
|
+
"Checkbox"
|
|
2142
|
+
]);
|
|
2143
|
+
var PageBlockDefinitionSingleSelectPropertyColor = z43.enum([
|
|
2144
|
+
"Green",
|
|
2145
|
+
"Red",
|
|
2146
|
+
"Yellow",
|
|
2147
|
+
"Blue",
|
|
2148
|
+
"Purple",
|
|
2149
|
+
"Orange",
|
|
2150
|
+
"Pink",
|
|
2151
|
+
"Teal",
|
|
2152
|
+
"Brown",
|
|
2153
|
+
"Grey",
|
|
2154
|
+
"LightGrey",
|
|
2155
|
+
"Cyan",
|
|
2156
|
+
"Fuchsia"
|
|
2157
|
+
]);
|
|
2158
|
+
var IconSet = z43.enum(["CheckCircle", "CrossCircle", "Alert"]);
|
|
2159
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z43.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2160
|
+
var PageBlockDefinitionImageAspectRatio = z43.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2161
|
+
var PageBlockDefinitionImageWidth = z43.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2162
|
+
var PageBlockDefinitionSelectChoice = z43.object({
|
|
2163
|
+
value: z43.string(),
|
|
2164
|
+
name: z43.string(),
|
|
2165
|
+
icon: IconSet.optional(),
|
|
2166
|
+
customIconUrl: z43.string().optional(),
|
|
2167
|
+
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
2168
|
+
});
|
|
2169
|
+
var PageBlockDefinitionUntypedPropertyOptions = z43.record(z43.any());
|
|
2170
|
+
var PageBlockDefinitionRichTextOptions = z43.object({
|
|
2171
|
+
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2172
|
+
});
|
|
2173
|
+
var PageBlockDefinitionMutiRichTextOptions = z43.object({
|
|
2174
|
+
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2175
|
+
});
|
|
2176
|
+
var PageBlockDefinitionRichTextEditorOptions = z43.object({
|
|
2177
|
+
placeholder: z43.string().optional(),
|
|
2178
|
+
allowedInlineStyles: z43.array(PageBlockDefinitionRichTextEditorPropertyStyle).optional()
|
|
2179
|
+
});
|
|
2180
|
+
var PageBlockDefinitionTextOptions = z43.object({
|
|
2181
|
+
placeholder: z43.string().optional(),
|
|
2182
|
+
defaultValue: z43.string().optional(),
|
|
2183
|
+
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2184
|
+
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
2185
|
+
allowLineBreaks: z43.boolean().optional()
|
|
2186
|
+
});
|
|
2187
|
+
var PageBlockDefinitionSelectOptions = z43.object({
|
|
2188
|
+
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2189
|
+
defaultChoice: z43.string(),
|
|
2190
|
+
choices: z43.array(PageBlockDefinitionSelectChoice)
|
|
2191
|
+
});
|
|
2192
|
+
var PageBlockDefinitionImageOptions = z43.object({
|
|
2193
|
+
width: PageBlockDefinitionImageWidth.optional(),
|
|
2194
|
+
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2195
|
+
allowCaption: z43.boolean().optional(),
|
|
2196
|
+
recommendation: z43.string().optional()
|
|
2197
|
+
});
|
|
2198
|
+
var PageBlockDefinitionBooleanOptions = z43.object({
|
|
2199
|
+
defaultvalue: z43.boolean().optional(),
|
|
2200
|
+
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2201
|
+
});
|
|
2202
|
+
var PageBlockDefinitionNumberOptions = z43.object({
|
|
2203
|
+
defaultValue: z43.number(),
|
|
2204
|
+
min: z43.number().optional(),
|
|
2205
|
+
max: z43.number().optional(),
|
|
2206
|
+
step: z43.number().optional(),
|
|
2207
|
+
placeholder: z43.string().optional()
|
|
2208
|
+
});
|
|
2209
|
+
var PageBlockDefinitionComponentOptions = z43.object({
|
|
2210
|
+
renderLayoutAs: z43.enum(["List", "Table"]).optional(),
|
|
2211
|
+
allowPropertySelection: z43.boolean().optional()
|
|
2212
|
+
});
|
|
2213
|
+
var PageBlockDefinitionProperty = z43.object({
|
|
2214
|
+
id: z43.string(),
|
|
2215
|
+
name: z43.string(),
|
|
2216
|
+
type: PageBlockDefinitionPropertyType,
|
|
2217
|
+
description: z43.string().optional(),
|
|
2218
|
+
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2219
|
+
variantOptions: z43.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2220
|
+
});
|
|
2221
|
+
var PageBlockDefinitionItem = z43.object({
|
|
2222
|
+
properties: z43.array(PageBlockDefinitionProperty),
|
|
2223
|
+
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2224
|
+
variants: z43.array(PageBlockDefinitionVariant),
|
|
2225
|
+
defaultVariantKey: z43.string()
|
|
2226
|
+
});
|
|
2227
|
+
|
|
2228
|
+
// src/dsm/elements/data/documentation-block-v2.ts
|
|
2229
|
+
var PageBlockLinkType = z44.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
2230
|
+
var PageBlockImageType = z44.enum(["Resource", "FigmaNode"]);
|
|
2231
|
+
var PageBlockImageAlignment = z44.enum(["Left", "Center", "Stretch"]);
|
|
2232
|
+
var PageBlockTableCellAlignment = z44.enum(["Left", "Center", "Right"]);
|
|
2233
|
+
var PageBlockPreviewContainerSize = z44.enum(["Centered", "NaturalHeight"]);
|
|
2234
|
+
var PageBlockThemeDisplayMode = z44.enum(["Split", "Override"]);
|
|
2235
|
+
var PageBlockImageResourceReference = z44.object({
|
|
2236
|
+
resourceId: z44.string(),
|
|
2237
|
+
url: z44.string()
|
|
2238
|
+
});
|
|
2239
|
+
var PageBlockResourceFrameNodeReference = z44.object({
|
|
2240
|
+
sourceId: z44.string(),
|
|
2241
|
+
frameReferenceId: z44.string()
|
|
2242
|
+
});
|
|
2243
|
+
var PageBlockImageReference = z44.object({
|
|
2046
2244
|
type: PageBlockImageType,
|
|
2047
2245
|
resource: PageBlockImageResourceReference.optional(),
|
|
2048
2246
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
2049
2247
|
});
|
|
2050
|
-
var PageBlockColorV2 =
|
|
2051
|
-
value:
|
|
2052
|
-
referencedTokenId:
|
|
2248
|
+
var PageBlockColorV2 = z44.object({
|
|
2249
|
+
value: z44.string(),
|
|
2250
|
+
referencedTokenId: z44.string().optional()
|
|
2053
2251
|
});
|
|
2054
|
-
var PageBlockAssetEntityMeta =
|
|
2055
|
-
title:
|
|
2056
|
-
description:
|
|
2252
|
+
var PageBlockAssetEntityMeta = z44.object({
|
|
2253
|
+
title: z44.string().optional(),
|
|
2254
|
+
description: z44.string().optional(),
|
|
2057
2255
|
backgroundColor: PageBlockColorV2.optional()
|
|
2058
2256
|
});
|
|
2059
|
-
var PageBlockFigmaComponentEntityMeta =
|
|
2060
|
-
title:
|
|
2061
|
-
description:
|
|
2257
|
+
var PageBlockFigmaComponentEntityMeta = z44.object({
|
|
2258
|
+
title: z44.string().optional(),
|
|
2259
|
+
description: z44.string().optional(),
|
|
2062
2260
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2063
|
-
selectedComponentProperties:
|
|
2261
|
+
selectedComponentProperties: z44.array(z44.string()).optional()
|
|
2064
2262
|
});
|
|
2065
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
2066
|
-
title:
|
|
2067
|
-
description:
|
|
2263
|
+
var PageBlockFigmaNodeEntityMeta = z44.object({
|
|
2264
|
+
title: z44.string().optional(),
|
|
2265
|
+
description: z44.string().optional(),
|
|
2068
2266
|
backgroundColor: PageBlockColorV2.optional()
|
|
2069
2267
|
});
|
|
2070
|
-
var PageBlockAppearanceV2 =
|
|
2268
|
+
var PageBlockAppearanceV2 = z44.object({
|
|
2071
2269
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
2072
|
-
numberOfColumns:
|
|
2270
|
+
numberOfColumns: z44.number().optional()
|
|
2073
2271
|
});
|
|
2074
|
-
var PageBlockItemUntypedValue =
|
|
2075
|
-
value:
|
|
2076
|
-
}).and(
|
|
2077
|
-
var PageBlockLinkV2 =
|
|
2272
|
+
var PageBlockItemUntypedValue = z44.object({
|
|
2273
|
+
value: z44.any()
|
|
2274
|
+
}).and(z44.record(z44.any()));
|
|
2275
|
+
var PageBlockLinkV2 = z44.object({
|
|
2078
2276
|
type: PageBlockLinkType,
|
|
2079
|
-
documentationItemId:
|
|
2080
|
-
pageHeadingId:
|
|
2081
|
-
url:
|
|
2082
|
-
openInNewTab:
|
|
2277
|
+
documentationItemId: z44.string().optional(),
|
|
2278
|
+
pageHeadingId: z44.string().optional(),
|
|
2279
|
+
url: z44.string().optional(),
|
|
2280
|
+
openInNewTab: z44.boolean().optional()
|
|
2083
2281
|
});
|
|
2084
|
-
var PageBlockItemV2 =
|
|
2085
|
-
id:
|
|
2282
|
+
var PageBlockItemV2 = z44.object({
|
|
2283
|
+
id: z44.string(),
|
|
2086
2284
|
linksTo: PageBlockLinkV2.optional(),
|
|
2087
|
-
props:
|
|
2285
|
+
props: z44.record(PageBlockItemUntypedValue)
|
|
2088
2286
|
});
|
|
2089
|
-
var PageBlockDataV2 =
|
|
2090
|
-
packageId:
|
|
2091
|
-
variantId:
|
|
2092
|
-
indentLevel:
|
|
2287
|
+
var PageBlockDataV2 = z44.object({
|
|
2288
|
+
packageId: z44.string(),
|
|
2289
|
+
variantId: z44.string().optional(),
|
|
2290
|
+
indentLevel: z44.number(),
|
|
2093
2291
|
appearance: PageBlockAppearanceV2.optional(),
|
|
2094
|
-
items:
|
|
2292
|
+
items: z44.array(PageBlockItemV2)
|
|
2095
2293
|
});
|
|
2096
|
-
var PageBlockItemAssetValue =
|
|
2097
|
-
selectedPropertyIds:
|
|
2098
|
-
showSearch:
|
|
2294
|
+
var PageBlockItemAssetValue = z44.object({
|
|
2295
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2296
|
+
showSearch: z44.boolean().optional(),
|
|
2099
2297
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2100
2298
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2101
|
-
value:
|
|
2102
|
-
|
|
2103
|
-
entityId:
|
|
2104
|
-
entityType:
|
|
2299
|
+
value: z44.array(
|
|
2300
|
+
z44.object({
|
|
2301
|
+
entityId: z44.string(),
|
|
2302
|
+
entityType: z44.enum(["Asset", "AssetGroup"]),
|
|
2105
2303
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
2106
2304
|
})
|
|
2107
2305
|
).default([])
|
|
2108
2306
|
});
|
|
2109
|
-
var PageBlockItemAssetPropertyValue =
|
|
2110
|
-
value:
|
|
2307
|
+
var PageBlockItemAssetPropertyValue = z44.object({
|
|
2308
|
+
value: z44.array(z44.string()).default([])
|
|
2111
2309
|
});
|
|
2112
|
-
var PageBlockItemFigmaComponentValue =
|
|
2113
|
-
showComponentName:
|
|
2114
|
-
showComponentDescription:
|
|
2115
|
-
showPropertyList:
|
|
2310
|
+
var PageBlockItemFigmaComponentValue = z44.object({
|
|
2311
|
+
showComponentName: z44.boolean().optional(),
|
|
2312
|
+
showComponentDescription: z44.boolean().optional(),
|
|
2313
|
+
showPropertyList: z44.boolean().optional(),
|
|
2116
2314
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2117
2315
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2118
|
-
value:
|
|
2119
|
-
|
|
2120
|
-
entityId:
|
|
2121
|
-
entityType:
|
|
2316
|
+
value: z44.array(
|
|
2317
|
+
z44.object({
|
|
2318
|
+
entityId: z44.string(),
|
|
2319
|
+
entityType: z44.enum(["FigmaComponent"]),
|
|
2122
2320
|
entityMeta: PageBlockFigmaComponentEntityMeta.optional()
|
|
2123
2321
|
})
|
|
2124
2322
|
).default([])
|
|
2125
2323
|
});
|
|
2126
|
-
var PageBlockItemBooleanValue =
|
|
2127
|
-
value:
|
|
2324
|
+
var PageBlockItemBooleanValue = z44.object({
|
|
2325
|
+
value: z44.boolean()
|
|
2128
2326
|
});
|
|
2129
|
-
var PageBlockItemCodeValue =
|
|
2327
|
+
var PageBlockItemCodeValue = z44.object({
|
|
2130
2328
|
format: PageBlockCodeLanguage.optional(),
|
|
2131
|
-
caption:
|
|
2132
|
-
value:
|
|
2133
|
-
});
|
|
2134
|
-
var PageBlockItemSandboxValue =
|
|
2135
|
-
showCode:
|
|
2136
|
-
showControls:
|
|
2137
|
-
backgroundColor:
|
|
2138
|
-
alignPreview:
|
|
2139
|
-
previewHeight:
|
|
2140
|
-
value:
|
|
2141
|
-
});
|
|
2142
|
-
var PageBlockItemColorValue =
|
|
2143
|
-
var PageBlockItemComponentValue =
|
|
2144
|
-
selectedPropertyIds:
|
|
2145
|
-
selectedBrandId:
|
|
2146
|
-
value:
|
|
2147
|
-
|
|
2148
|
-
entityId:
|
|
2149
|
-
entityType:
|
|
2329
|
+
caption: z44.string().optional(),
|
|
2330
|
+
value: z44.string()
|
|
2331
|
+
});
|
|
2332
|
+
var PageBlockItemSandboxValue = z44.object({
|
|
2333
|
+
showCode: z44.boolean().optional(),
|
|
2334
|
+
showControls: z44.boolean().optional(),
|
|
2335
|
+
backgroundColor: z44.string().optional(),
|
|
2336
|
+
alignPreview: z44.enum(["Left", "Center"]).optional(),
|
|
2337
|
+
previewHeight: z44.number().optional(),
|
|
2338
|
+
value: z44.string()
|
|
2339
|
+
});
|
|
2340
|
+
var PageBlockItemColorValue = z44.record(z44.any());
|
|
2341
|
+
var PageBlockItemComponentValue = z44.object({
|
|
2342
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2343
|
+
selectedBrandId: z44.string().optional(),
|
|
2344
|
+
value: z44.array(
|
|
2345
|
+
z44.object({
|
|
2346
|
+
entityId: z44.string(),
|
|
2347
|
+
entityType: z44.enum(["Component", "ComponentGroup"])
|
|
2150
2348
|
})
|
|
2151
2349
|
).default([])
|
|
2152
2350
|
});
|
|
2153
|
-
var PageBlockItemComponentPropertyValue =
|
|
2154
|
-
value:
|
|
2155
|
-
});
|
|
2156
|
-
var PageBlockItemDividerValue =
|
|
2157
|
-
var PageBlockItemEmbedValue =
|
|
2158
|
-
value:
|
|
2159
|
-
caption:
|
|
2160
|
-
height:
|
|
2161
|
-
openGraph:
|
|
2162
|
-
title:
|
|
2163
|
-
description:
|
|
2164
|
-
imageUrl:
|
|
2351
|
+
var PageBlockItemComponentPropertyValue = z44.object({
|
|
2352
|
+
value: z44.string()
|
|
2353
|
+
});
|
|
2354
|
+
var PageBlockItemDividerValue = z44.object({});
|
|
2355
|
+
var PageBlockItemEmbedValue = z44.object({
|
|
2356
|
+
value: z44.string().optional(),
|
|
2357
|
+
caption: z44.string().optional(),
|
|
2358
|
+
height: z44.number().optional(),
|
|
2359
|
+
openGraph: z44.object({
|
|
2360
|
+
title: z44.string().optional(),
|
|
2361
|
+
description: z44.string().optional(),
|
|
2362
|
+
imageUrl: z44.string().optional()
|
|
2165
2363
|
}).optional()
|
|
2166
2364
|
});
|
|
2167
|
-
var PageBlockItemFigmaNodeValue =
|
|
2168
|
-
showSearch:
|
|
2365
|
+
var PageBlockItemFigmaNodeValue = z44.object({
|
|
2366
|
+
showSearch: z44.boolean().optional(),
|
|
2169
2367
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
2170
2368
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2171
|
-
showFrameDetails:
|
|
2172
|
-
value:
|
|
2173
|
-
|
|
2174
|
-
entityId:
|
|
2369
|
+
showFrameDetails: z44.boolean().optional(),
|
|
2370
|
+
value: z44.array(
|
|
2371
|
+
z44.object({
|
|
2372
|
+
entityId: z44.string(),
|
|
2175
2373
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
2176
2374
|
})
|
|
2177
2375
|
).default([])
|
|
2178
2376
|
});
|
|
2179
|
-
var PageBlockItemImageValue =
|
|
2180
|
-
alt:
|
|
2181
|
-
caption:
|
|
2377
|
+
var PageBlockItemImageValue = z44.object({
|
|
2378
|
+
alt: z44.string().optional(),
|
|
2379
|
+
caption: z44.string().optional(),
|
|
2182
2380
|
alignment: PageBlockImageAlignment.optional(),
|
|
2183
2381
|
value: PageBlockImageReference.optional()
|
|
2184
2382
|
});
|
|
2185
|
-
var PageBlockItemMarkdownValue =
|
|
2186
|
-
value:
|
|
2383
|
+
var PageBlockItemMarkdownValue = z44.object({
|
|
2384
|
+
value: z44.string()
|
|
2187
2385
|
});
|
|
2188
|
-
var PageBlockItemMultiRichTextValue =
|
|
2386
|
+
var PageBlockItemMultiRichTextValue = z44.object({
|
|
2189
2387
|
value: PageBlockText.array()
|
|
2190
2388
|
});
|
|
2191
|
-
var PageBlockItemMultiSelectValue =
|
|
2192
|
-
value:
|
|
2389
|
+
var PageBlockItemMultiSelectValue = z44.object({
|
|
2390
|
+
value: z44.array(z44.string()).default([])
|
|
2193
2391
|
});
|
|
2194
|
-
var PageBlockItemNumberValue =
|
|
2195
|
-
value:
|
|
2392
|
+
var PageBlockItemNumberValue = z44.object({
|
|
2393
|
+
value: z44.number()
|
|
2196
2394
|
});
|
|
2197
|
-
var PageBlockItemRichTextValue =
|
|
2395
|
+
var PageBlockItemRichTextValue = z44.object({
|
|
2198
2396
|
value: PageBlockText,
|
|
2199
2397
|
calloutType: PageBlockCalloutType.optional()
|
|
2200
2398
|
});
|
|
2201
|
-
var
|
|
2202
|
-
value:
|
|
2399
|
+
var PageBlockItemSingleSelectValue = z44.object({
|
|
2400
|
+
value: z44.string()
|
|
2203
2401
|
});
|
|
2204
|
-
var
|
|
2205
|
-
|
|
2402
|
+
var PageBlockItemStorybookValue = z44.object({
|
|
2403
|
+
caption: z44.string().optional(),
|
|
2404
|
+
height: z44.number().optional(),
|
|
2405
|
+
embedUrl: z44.string().optional(),
|
|
2406
|
+
value: z44.string().optional()
|
|
2206
2407
|
});
|
|
2207
|
-
var
|
|
2208
|
-
|
|
2209
|
-
height: z41.number().optional(),
|
|
2210
|
-
embedUrl: z41.string().optional(),
|
|
2211
|
-
value: z41.string().optional()
|
|
2408
|
+
var PageBlockItemTextValue = z44.object({
|
|
2409
|
+
value: z44.string()
|
|
2212
2410
|
});
|
|
2213
|
-
var
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
var PageBlockItemTokenValue = z41.object({
|
|
2217
|
-
selectedPropertyIds: z41.array(z41.string()).optional(),
|
|
2218
|
-
selectedThemeIds: z41.array(z41.string()).optional(),
|
|
2411
|
+
var PageBlockItemTokenValue = z44.object({
|
|
2412
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2413
|
+
selectedThemeIds: z44.array(z44.string()).optional(),
|
|
2219
2414
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
2220
|
-
value:
|
|
2221
|
-
|
|
2222
|
-
entityId:
|
|
2223
|
-
entityType:
|
|
2224
|
-
entityMeta:
|
|
2225
|
-
showNestedGroups:
|
|
2415
|
+
value: z44.array(
|
|
2416
|
+
z44.object({
|
|
2417
|
+
entityId: z44.string(),
|
|
2418
|
+
entityType: z44.enum(["Token", "TokenGroup"]),
|
|
2419
|
+
entityMeta: z44.object({
|
|
2420
|
+
showNestedGroups: z44.boolean().optional()
|
|
2226
2421
|
}).optional()
|
|
2227
2422
|
})
|
|
2228
2423
|
).default([])
|
|
2229
2424
|
});
|
|
2230
|
-
var PageBlockItemTokenPropertyValue =
|
|
2231
|
-
selectedPropertyIds:
|
|
2232
|
-
selectedThemeIds:
|
|
2233
|
-
value:
|
|
2425
|
+
var PageBlockItemTokenPropertyValue = z44.object({
|
|
2426
|
+
selectedPropertyIds: z44.array(z44.string()).optional(),
|
|
2427
|
+
selectedThemeIds: z44.array(z44.string()).optional(),
|
|
2428
|
+
value: z44.array(z44.string()).default([])
|
|
2234
2429
|
});
|
|
2235
|
-
var PageBlockItemTokenTypeValue =
|
|
2236
|
-
value:
|
|
2430
|
+
var PageBlockItemTokenTypeValue = z44.object({
|
|
2431
|
+
value: z44.array(DesignTokenType).default([])
|
|
2237
2432
|
});
|
|
2238
|
-
var PageBlockItemUrlValue =
|
|
2239
|
-
value:
|
|
2433
|
+
var PageBlockItemUrlValue = z44.object({
|
|
2434
|
+
value: z44.string()
|
|
2240
2435
|
});
|
|
2241
|
-
var
|
|
2242
|
-
type:
|
|
2243
|
-
id: z41.string(),
|
|
2436
|
+
var PageBlockItemRichTextEditorParagraphNode = z44.object({
|
|
2437
|
+
type: z44.literal("Paragraph"),
|
|
2244
2438
|
value: PageBlockItemRichTextValue.shape.value
|
|
2245
2439
|
});
|
|
2246
|
-
var
|
|
2247
|
-
type:
|
|
2440
|
+
var PageBlockItemRichTextEditorListNode = z44.object({
|
|
2441
|
+
type: z44.literal("List"),
|
|
2442
|
+
listType: PageBlockDefinitionMultiRichTextPropertyStyle,
|
|
2248
2443
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
2249
2444
|
});
|
|
2250
|
-
var
|
|
2251
|
-
|
|
2252
|
-
|
|
2445
|
+
var PageBlockItemRichTextEditorNode = z44.discriminatedUnion("type", [
|
|
2446
|
+
PageBlockItemRichTextEditorParagraphNode,
|
|
2447
|
+
PageBlockItemRichTextEditorListNode
|
|
2448
|
+
]);
|
|
2449
|
+
var PageBlockItemRichTextEditorValue = z44.object({
|
|
2450
|
+
value: PageBlockItemRichTextEditorNode.array()
|
|
2451
|
+
});
|
|
2452
|
+
var PageBlockItemTableRichTextNode = z44.object({
|
|
2453
|
+
type: z44.literal("RichText"),
|
|
2454
|
+
id: z44.string(),
|
|
2455
|
+
value: PageBlockItemRichTextValue.shape.value
|
|
2456
|
+
});
|
|
2457
|
+
var PageBlockItemTableImageNode = z44.object({
|
|
2458
|
+
type: z44.literal("Image"),
|
|
2459
|
+
id: z44.string(),
|
|
2253
2460
|
caption: PageBlockItemImageValue.shape.caption,
|
|
2254
2461
|
value: PageBlockItemImageValue.shape.value
|
|
2255
2462
|
});
|
|
2256
|
-
var PageBlockItemTableNode =
|
|
2463
|
+
var PageBlockItemTableNode = z44.discriminatedUnion("type", [
|
|
2257
2464
|
PageBlockItemTableRichTextNode,
|
|
2258
|
-
// PageBlockItemTableMultiRichTextNode,
|
|
2259
2465
|
PageBlockItemTableImageNode
|
|
2260
2466
|
]);
|
|
2261
|
-
var PageBlockItemTableCell =
|
|
2262
|
-
id:
|
|
2263
|
-
nodes:
|
|
2264
|
-
columnWidth:
|
|
2467
|
+
var PageBlockItemTableCell = z44.object({
|
|
2468
|
+
id: z44.string(),
|
|
2469
|
+
nodes: z44.array(PageBlockItemTableNode),
|
|
2470
|
+
columnWidth: z44.number().optional(),
|
|
2265
2471
|
alignment: PageBlockTableCellAlignment
|
|
2266
2472
|
});
|
|
2267
|
-
var PageBlockItemTableRow =
|
|
2268
|
-
cells:
|
|
2473
|
+
var PageBlockItemTableRow = z44.object({
|
|
2474
|
+
cells: z44.array(PageBlockItemTableCell)
|
|
2269
2475
|
});
|
|
2270
|
-
var PageBlockItemTableValue =
|
|
2271
|
-
highlightHeaderColumn:
|
|
2272
|
-
highlightHeaderRow:
|
|
2273
|
-
showBorder:
|
|
2274
|
-
value:
|
|
2476
|
+
var PageBlockItemTableValue = z44.object({
|
|
2477
|
+
highlightHeaderColumn: z44.boolean().optional(),
|
|
2478
|
+
highlightHeaderRow: z44.boolean().optional(),
|
|
2479
|
+
showBorder: z44.boolean().optional(),
|
|
2480
|
+
value: z44.array(PageBlockItemTableRow).default([])
|
|
2275
2481
|
});
|
|
2276
2482
|
|
|
2277
2483
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
2278
|
-
import { z as
|
|
2484
|
+
import { z as z48 } from "zod";
|
|
2279
2485
|
|
|
2280
2486
|
// src/dsm/elements/data/documentation-v1.ts
|
|
2281
|
-
import { z as
|
|
2487
|
+
import { z as z47 } from "zod";
|
|
2282
2488
|
|
|
2283
2489
|
// src/dsm/elements/data/item-header-v1.ts
|
|
2284
|
-
import { z as
|
|
2490
|
+
import { z as z46 } from "zod";
|
|
2285
2491
|
|
|
2286
2492
|
// src/dsm/elements/data/item-header.ts
|
|
2287
|
-
import { z as
|
|
2288
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
2289
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
2493
|
+
import { z as z45 } from "zod";
|
|
2494
|
+
var DocumentationItemHeaderAlignmentSchema = z45.enum(["Left", "Center"]);
|
|
2495
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z45.enum(["AspectFill", "AspectFit"]);
|
|
2290
2496
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
2291
2497
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
2292
2498
|
|
|
2293
2499
|
// src/dsm/elements/data/item-header-v1.ts
|
|
2294
|
-
var DocumentationItemHeaderV1 =
|
|
2295
|
-
description:
|
|
2500
|
+
var DocumentationItemHeaderV1 = z46.object({
|
|
2501
|
+
description: z46.string(),
|
|
2296
2502
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2297
2503
|
foregroundColor: ColorTokenData.nullish(),
|
|
2298
2504
|
backgroundColor: ColorTokenData.nullish(),
|
|
2299
2505
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
2300
2506
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2301
|
-
showBackgroundOverlay:
|
|
2302
|
-
showCoverText:
|
|
2303
|
-
minHeight:
|
|
2507
|
+
showBackgroundOverlay: z46.boolean(),
|
|
2508
|
+
showCoverText: z46.boolean(),
|
|
2509
|
+
minHeight: z46.number().nullish()
|
|
2304
2510
|
});
|
|
2305
2511
|
var defaultDocumentationItemHeaderV1 = {
|
|
2306
2512
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2311,10 +2517,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
2311
2517
|
};
|
|
2312
2518
|
|
|
2313
2519
|
// src/dsm/elements/data/documentation-v1.ts
|
|
2314
|
-
var DocumentationItemConfigurationV1 =
|
|
2315
|
-
showSidebar:
|
|
2316
|
-
isPrivate:
|
|
2317
|
-
isHidden:
|
|
2520
|
+
var DocumentationItemConfigurationV1 = z47.object({
|
|
2521
|
+
showSidebar: z47.boolean(),
|
|
2522
|
+
isPrivate: z47.boolean().optional(),
|
|
2523
|
+
isHidden: z47.boolean().optional(),
|
|
2318
2524
|
header: DocumentationItemHeaderV1
|
|
2319
2525
|
});
|
|
2320
2526
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -2323,29 +2529,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
2323
2529
|
};
|
|
2324
2530
|
|
|
2325
2531
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
2326
|
-
var DocumentationPageDataV1 =
|
|
2327
|
-
blocks:
|
|
2532
|
+
var DocumentationPageDataV1 = z48.object({
|
|
2533
|
+
blocks: z48.array(PageBlockV1),
|
|
2328
2534
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2329
2535
|
});
|
|
2330
2536
|
|
|
2331
2537
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
2332
|
-
import { z as
|
|
2538
|
+
import { z as z51 } from "zod";
|
|
2333
2539
|
|
|
2334
2540
|
// src/dsm/elements/data/documentation-v2.ts
|
|
2335
|
-
import { z as
|
|
2541
|
+
import { z as z50 } from "zod";
|
|
2336
2542
|
|
|
2337
2543
|
// src/dsm/elements/data/item-header-v2.ts
|
|
2338
|
-
import { z as
|
|
2339
|
-
var DocumentationItemHeaderV2 =
|
|
2340
|
-
description:
|
|
2544
|
+
import { z as z49 } from "zod";
|
|
2545
|
+
var DocumentationItemHeaderV2 = z49.object({
|
|
2546
|
+
description: z49.string(),
|
|
2341
2547
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
2342
2548
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
2343
2549
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
2344
2550
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
2345
2551
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
2346
|
-
showBackgroundOverlay:
|
|
2347
|
-
showCoverText:
|
|
2348
|
-
minHeight:
|
|
2552
|
+
showBackgroundOverlay: z49.boolean(),
|
|
2553
|
+
showCoverText: z49.boolean(),
|
|
2554
|
+
minHeight: z49.number().nullish()
|
|
2349
2555
|
});
|
|
2350
2556
|
var defaultDocumentationItemHeaderV2 = {
|
|
2351
2557
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -2356,10 +2562,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
2356
2562
|
};
|
|
2357
2563
|
|
|
2358
2564
|
// src/dsm/elements/data/documentation-v2.ts
|
|
2359
|
-
var DocumentationItemConfigurationV2 =
|
|
2360
|
-
showSidebar:
|
|
2361
|
-
isPrivate:
|
|
2362
|
-
isHidden:
|
|
2565
|
+
var DocumentationItemConfigurationV2 = z50.object({
|
|
2566
|
+
showSidebar: z50.boolean(),
|
|
2567
|
+
isPrivate: z50.boolean().optional(),
|
|
2568
|
+
isHidden: z50.boolean().optional(),
|
|
2363
2569
|
header: DocumentationItemHeaderV2
|
|
2364
2570
|
});
|
|
2365
2571
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -2370,122 +2576,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
2370
2576
|
};
|
|
2371
2577
|
|
|
2372
2578
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
2373
|
-
var DocumentationPageDataV2 =
|
|
2579
|
+
var DocumentationPageDataV2 = z51.object({
|
|
2374
2580
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2375
2581
|
});
|
|
2376
2582
|
|
|
2377
2583
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
2378
|
-
import { z as
|
|
2584
|
+
import { z as z54 } from "zod";
|
|
2379
2585
|
|
|
2380
2586
|
// src/dsm/elements/page-block-v2.ts
|
|
2381
|
-
import { z as
|
|
2587
|
+
import { z as z53 } from "zod";
|
|
2382
2588
|
|
|
2383
2589
|
// src/dsm/elements/base.ts
|
|
2384
|
-
import { z as
|
|
2385
|
-
var DesignElementOrigin =
|
|
2386
|
-
id:
|
|
2387
|
-
sourceId:
|
|
2388
|
-
name:
|
|
2389
|
-
});
|
|
2390
|
-
var DesignElementBase =
|
|
2391
|
-
id:
|
|
2392
|
-
persistentId:
|
|
2590
|
+
import { z as z52 } from "zod";
|
|
2591
|
+
var DesignElementOrigin = z52.object({
|
|
2592
|
+
id: z52.string(),
|
|
2593
|
+
sourceId: z52.string(),
|
|
2594
|
+
name: z52.string()
|
|
2595
|
+
});
|
|
2596
|
+
var DesignElementBase = z52.object({
|
|
2597
|
+
id: z52.string(),
|
|
2598
|
+
persistentId: z52.string(),
|
|
2393
2599
|
meta: ObjectMeta,
|
|
2394
|
-
designSystemVersionId:
|
|
2395
|
-
createdAt:
|
|
2396
|
-
updatedAt:
|
|
2600
|
+
designSystemVersionId: z52.string(),
|
|
2601
|
+
createdAt: z52.coerce.date(),
|
|
2602
|
+
updatedAt: z52.coerce.date()
|
|
2397
2603
|
});
|
|
2398
2604
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
2399
2605
|
origin: DesignElementOrigin
|
|
2400
2606
|
});
|
|
2401
|
-
var DesignElementGroupablePart =
|
|
2402
|
-
parentPersistentId:
|
|
2403
|
-
sortOrder:
|
|
2607
|
+
var DesignElementGroupablePart = z52.object({
|
|
2608
|
+
parentPersistentId: z52.string().optional(),
|
|
2609
|
+
sortOrder: z52.number()
|
|
2404
2610
|
});
|
|
2405
2611
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
2406
2612
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
2407
|
-
parentPersistentId:
|
|
2613
|
+
parentPersistentId: z52.string()
|
|
2408
2614
|
});
|
|
2409
|
-
var DesignElementBrandedPart =
|
|
2410
|
-
brandPersistentId:
|
|
2615
|
+
var DesignElementBrandedPart = z52.object({
|
|
2616
|
+
brandPersistentId: z52.string()
|
|
2411
2617
|
});
|
|
2412
|
-
var DesignElementSlugPart =
|
|
2413
|
-
slug:
|
|
2414
|
-
userSlug:
|
|
2618
|
+
var DesignElementSlugPart = z52.object({
|
|
2619
|
+
slug: z52.string().optional(),
|
|
2620
|
+
userSlug: z52.string().optional()
|
|
2415
2621
|
});
|
|
2416
2622
|
|
|
2417
2623
|
// src/dsm/elements/page-block-v2.ts
|
|
2418
2624
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
2419
2625
|
data: PageBlockDataV2
|
|
2420
2626
|
});
|
|
2421
|
-
var PageBlockEditorModelV2 =
|
|
2422
|
-
id:
|
|
2423
|
-
type:
|
|
2627
|
+
var PageBlockEditorModelV2 = z53.object({
|
|
2628
|
+
id: z53.string(),
|
|
2629
|
+
type: z53.literal("Block"),
|
|
2424
2630
|
data: PageBlockDataV2
|
|
2425
2631
|
});
|
|
2426
2632
|
|
|
2427
2633
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
2428
|
-
var PageSectionTypeV2 =
|
|
2429
|
-
var PageSectionColumnV2 =
|
|
2430
|
-
id:
|
|
2431
|
-
blocks:
|
|
2432
|
-
});
|
|
2433
|
-
var PageSectionItemV2 =
|
|
2434
|
-
id:
|
|
2435
|
-
title:
|
|
2436
|
-
columns:
|
|
2437
|
-
});
|
|
2438
|
-
var PageSectionPaddingV2 =
|
|
2439
|
-
top:
|
|
2440
|
-
bottom:
|
|
2441
|
-
left:
|
|
2442
|
-
right:
|
|
2443
|
-
});
|
|
2444
|
-
var PageSectionAppearanceV2 =
|
|
2445
|
-
expandToEdges:
|
|
2446
|
-
contentExpandToEdges:
|
|
2634
|
+
var PageSectionTypeV2 = z54.enum(["Tabs"]);
|
|
2635
|
+
var PageSectionColumnV2 = z54.object({
|
|
2636
|
+
id: z54.string(),
|
|
2637
|
+
blocks: z54.array(PageBlockEditorModelV2)
|
|
2638
|
+
});
|
|
2639
|
+
var PageSectionItemV2 = z54.object({
|
|
2640
|
+
id: z54.string(),
|
|
2641
|
+
title: z54.string(),
|
|
2642
|
+
columns: z54.array(PageSectionColumnV2)
|
|
2643
|
+
});
|
|
2644
|
+
var PageSectionPaddingV2 = z54.object({
|
|
2645
|
+
top: z54.number().optional(),
|
|
2646
|
+
bottom: z54.number().optional(),
|
|
2647
|
+
left: z54.number().optional(),
|
|
2648
|
+
right: z54.number().optional()
|
|
2649
|
+
});
|
|
2650
|
+
var PageSectionAppearanceV2 = z54.object({
|
|
2651
|
+
expandToEdges: z54.boolean(),
|
|
2652
|
+
contentExpandToEdges: z54.boolean(),
|
|
2447
2653
|
backgroundColor: PageBlockColorV2.optional(),
|
|
2448
2654
|
foregroundColor: PageBlockColorV2.optional(),
|
|
2449
2655
|
padding: PageSectionPaddingV2.optional()
|
|
2450
2656
|
});
|
|
2451
|
-
var PageSectionEditorModelV2 =
|
|
2452
|
-
id:
|
|
2453
|
-
type:
|
|
2454
|
-
variantId:
|
|
2657
|
+
var PageSectionEditorModelV2 = z54.object({
|
|
2658
|
+
id: z54.string(),
|
|
2659
|
+
type: z54.literal("Section"),
|
|
2660
|
+
variantId: z54.string().optional(),
|
|
2455
2661
|
sectionType: PageSectionTypeV2,
|
|
2456
2662
|
appearance: PageSectionAppearanceV2,
|
|
2457
|
-
items:
|
|
2663
|
+
items: z54.array(PageSectionItemV2)
|
|
2458
2664
|
});
|
|
2459
2665
|
|
|
2460
2666
|
// src/dsm/elements/data/duration.ts
|
|
2461
|
-
import { z as
|
|
2462
|
-
var DurationUnit =
|
|
2463
|
-
var DurationValue =
|
|
2667
|
+
import { z as z55 } from "zod";
|
|
2668
|
+
var DurationUnit = z55.enum(["Ms"]);
|
|
2669
|
+
var DurationValue = z55.object({
|
|
2464
2670
|
unit: DurationUnit,
|
|
2465
|
-
measure:
|
|
2671
|
+
measure: z55.number()
|
|
2466
2672
|
});
|
|
2467
2673
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
2468
2674
|
|
|
2469
2675
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
2470
|
-
import { z as
|
|
2471
|
-
var FigmaFileStructureNodeType =
|
|
2472
|
-
var FigmaFileStructureNodeBase =
|
|
2473
|
-
id:
|
|
2474
|
-
name:
|
|
2676
|
+
import { z as z56 } from "zod";
|
|
2677
|
+
var FigmaFileStructureNodeType = z56.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
2678
|
+
var FigmaFileStructureNodeBase = z56.object({
|
|
2679
|
+
id: z56.string(),
|
|
2680
|
+
name: z56.string(),
|
|
2475
2681
|
type: FigmaFileStructureNodeType,
|
|
2476
2682
|
size: SizeOrUndefined,
|
|
2477
|
-
parentComponentSetId:
|
|
2683
|
+
parentComponentSetId: z56.string().optional()
|
|
2478
2684
|
});
|
|
2479
2685
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
2480
|
-
children:
|
|
2686
|
+
children: z56.lazy(() => FigmaFileStructureNode.array())
|
|
2481
2687
|
});
|
|
2482
|
-
var FigmaFileStructureStatistics =
|
|
2483
|
-
frames:
|
|
2484
|
-
components:
|
|
2485
|
-
componentSets:
|
|
2688
|
+
var FigmaFileStructureStatistics = z56.object({
|
|
2689
|
+
frames: z56.number().nullable().optional().transform((v) => v ?? 0),
|
|
2690
|
+
components: z56.number().nullable().optional().transform((v) => v ?? 0),
|
|
2691
|
+
componentSets: z56.number().nullable().optional().transform((v) => v ?? 0)
|
|
2486
2692
|
});
|
|
2487
|
-
var FigmaFileStructureElementData =
|
|
2488
|
-
value:
|
|
2693
|
+
var FigmaFileStructureElementData = z56.object({
|
|
2694
|
+
value: z56.object({
|
|
2489
2695
|
structure: FigmaFileStructureNode,
|
|
2490
2696
|
assetsInFile: FigmaFileStructureStatistics
|
|
2491
2697
|
})
|
|
@@ -2502,121 +2708,121 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
2502
2708
|
}
|
|
2503
2709
|
|
|
2504
2710
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
2505
|
-
import { z as
|
|
2506
|
-
var FigmaNodeRenderFormat =
|
|
2507
|
-
var FigmaNodeReferenceData =
|
|
2508
|
-
structureElementId:
|
|
2509
|
-
nodeId:
|
|
2510
|
-
fileId:
|
|
2511
|
-
valid:
|
|
2711
|
+
import { z as z57 } from "zod";
|
|
2712
|
+
var FigmaNodeRenderFormat = z57.enum(["Png", "Svg"]);
|
|
2713
|
+
var FigmaNodeReferenceData = z57.object({
|
|
2714
|
+
structureElementId: z57.string(),
|
|
2715
|
+
nodeId: z57.string(),
|
|
2716
|
+
fileId: z57.string().optional(),
|
|
2717
|
+
valid: z57.boolean(),
|
|
2512
2718
|
format: FigmaNodeRenderFormat.default("Png"),
|
|
2513
2719
|
// Asset data
|
|
2514
|
-
assetId:
|
|
2515
|
-
assetScale:
|
|
2516
|
-
assetWidth:
|
|
2517
|
-
assetHeight:
|
|
2518
|
-
assetUrl:
|
|
2519
|
-
assetOriginKey:
|
|
2520
|
-
});
|
|
2521
|
-
var FigmaNodeReferenceElementData =
|
|
2720
|
+
assetId: z57.string().optional(),
|
|
2721
|
+
assetScale: z57.number().optional(),
|
|
2722
|
+
assetWidth: z57.number().optional(),
|
|
2723
|
+
assetHeight: z57.number().optional(),
|
|
2724
|
+
assetUrl: z57.string().optional(),
|
|
2725
|
+
assetOriginKey: z57.string().optional()
|
|
2726
|
+
});
|
|
2727
|
+
var FigmaNodeReferenceElementData = z57.object({
|
|
2522
2728
|
value: FigmaNodeReferenceData
|
|
2523
2729
|
});
|
|
2524
2730
|
|
|
2525
2731
|
// src/dsm/elements/data/font-family.ts
|
|
2526
|
-
import { z as
|
|
2527
|
-
var FontFamilyValue =
|
|
2732
|
+
import { z as z58 } from "zod";
|
|
2733
|
+
var FontFamilyValue = z58.string();
|
|
2528
2734
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
2529
2735
|
|
|
2530
2736
|
// src/dsm/elements/data/font-size.ts
|
|
2531
|
-
import { z as
|
|
2532
|
-
var FontSizeUnit =
|
|
2533
|
-
var FontSizeValue =
|
|
2737
|
+
import { z as z59 } from "zod";
|
|
2738
|
+
var FontSizeUnit = z59.enum(["Pixels", "Rem", "Percent"]);
|
|
2739
|
+
var FontSizeValue = z59.object({
|
|
2534
2740
|
unit: FontSizeUnit,
|
|
2535
|
-
measure:
|
|
2741
|
+
measure: z59.number()
|
|
2536
2742
|
});
|
|
2537
2743
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
2538
2744
|
|
|
2539
2745
|
// src/dsm/elements/data/font-weight.ts
|
|
2540
|
-
import { z as
|
|
2541
|
-
var FontWeightValue =
|
|
2746
|
+
import { z as z60 } from "zod";
|
|
2747
|
+
var FontWeightValue = z60.string();
|
|
2542
2748
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
2543
2749
|
|
|
2544
2750
|
// src/dsm/elements/data/gradient.ts
|
|
2545
|
-
import { z as
|
|
2546
|
-
var GradientType =
|
|
2547
|
-
var GradientStop =
|
|
2548
|
-
position:
|
|
2751
|
+
import { z as z61 } from "zod";
|
|
2752
|
+
var GradientType = z61.enum(["Linear", "Radial", "Angular"]);
|
|
2753
|
+
var GradientStop = z61.object({
|
|
2754
|
+
position: z61.number(),
|
|
2549
2755
|
color: ColorTokenData
|
|
2550
2756
|
});
|
|
2551
|
-
var GradientLayerValue =
|
|
2757
|
+
var GradientLayerValue = z61.object({
|
|
2552
2758
|
from: Point2D,
|
|
2553
2759
|
to: Point2D,
|
|
2554
2760
|
type: GradientType,
|
|
2555
|
-
aspectRatio: nullishToOptional(
|
|
2761
|
+
aspectRatio: nullishToOptional(z61.number()),
|
|
2556
2762
|
// z.number(),
|
|
2557
|
-
stops:
|
|
2763
|
+
stops: z61.array(GradientStop).min(2)
|
|
2558
2764
|
});
|
|
2559
2765
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
2560
|
-
var GradientTokenValue =
|
|
2766
|
+
var GradientTokenValue = z61.array(GradientLayerData);
|
|
2561
2767
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
2562
2768
|
|
|
2563
2769
|
// src/dsm/elements/data/group.ts
|
|
2564
|
-
import { z as
|
|
2565
|
-
var DocumentationGroupBehavior =
|
|
2566
|
-
var ElementGroupDataV1 =
|
|
2770
|
+
import { z as z62 } from "zod";
|
|
2771
|
+
var DocumentationGroupBehavior = z62.enum(["Group", "Tabs"]);
|
|
2772
|
+
var ElementGroupDataV1 = z62.object({
|
|
2567
2773
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2568
2774
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
2569
2775
|
});
|
|
2570
|
-
var ElementGroupDataV2 =
|
|
2776
|
+
var ElementGroupDataV2 = z62.object({
|
|
2571
2777
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
2572
2778
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
2573
2779
|
});
|
|
2574
2780
|
|
|
2575
2781
|
// src/dsm/elements/data/letter-spacing.ts
|
|
2576
|
-
import { z as
|
|
2577
|
-
var LetterSpacingUnit =
|
|
2578
|
-
var LetterSpacingValue =
|
|
2782
|
+
import { z as z63 } from "zod";
|
|
2783
|
+
var LetterSpacingUnit = z63.enum(["Pixels", "Rem", "Percent"]);
|
|
2784
|
+
var LetterSpacingValue = z63.object({
|
|
2579
2785
|
unit: LetterSpacingUnit,
|
|
2580
|
-
measure:
|
|
2786
|
+
measure: z63.number()
|
|
2581
2787
|
});
|
|
2582
2788
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
2583
2789
|
|
|
2584
2790
|
// src/dsm/elements/data/line-height.ts
|
|
2585
|
-
import { z as
|
|
2586
|
-
var LineHeightUnit =
|
|
2587
|
-
var LineHeightValue =
|
|
2791
|
+
import { z as z64 } from "zod";
|
|
2792
|
+
var LineHeightUnit = z64.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
2793
|
+
var LineHeightValue = z64.object({
|
|
2588
2794
|
unit: LineHeightUnit,
|
|
2589
|
-
measure:
|
|
2795
|
+
measure: z64.number()
|
|
2590
2796
|
});
|
|
2591
2797
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
2592
2798
|
|
|
2593
2799
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
2594
|
-
import { z as
|
|
2595
|
-
var ParagraphIndentUnit =
|
|
2596
|
-
var ParagraphIndentValue =
|
|
2800
|
+
import { z as z65 } from "zod";
|
|
2801
|
+
var ParagraphIndentUnit = z65.enum(["Pixels", "Rem", "Percent"]);
|
|
2802
|
+
var ParagraphIndentValue = z65.object({
|
|
2597
2803
|
unit: ParagraphIndentUnit,
|
|
2598
|
-
measure:
|
|
2804
|
+
measure: z65.number()
|
|
2599
2805
|
});
|
|
2600
2806
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
2601
2807
|
|
|
2602
2808
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
2603
|
-
import { z as
|
|
2604
|
-
var ParagraphSpacingUnit =
|
|
2605
|
-
var ParagraphSpacingValue =
|
|
2809
|
+
import { z as z66 } from "zod";
|
|
2810
|
+
var ParagraphSpacingUnit = z66.enum(["Pixels", "Rem", "Percent"]);
|
|
2811
|
+
var ParagraphSpacingValue = z66.object({
|
|
2606
2812
|
unit: ParagraphSpacingUnit,
|
|
2607
|
-
measure:
|
|
2813
|
+
measure: z66.number()
|
|
2608
2814
|
});
|
|
2609
2815
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
2610
2816
|
|
|
2611
2817
|
// src/dsm/elements/data/product-copy.ts
|
|
2612
|
-
import { z as
|
|
2613
|
-
var ProductCopyValue =
|
|
2818
|
+
import { z as z67 } from "zod";
|
|
2819
|
+
var ProductCopyValue = z67.string();
|
|
2614
2820
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
2615
2821
|
|
|
2616
2822
|
// src/dsm/elements/data/safe-id.ts
|
|
2617
|
-
import { z as
|
|
2823
|
+
import { z as z68 } from "zod";
|
|
2618
2824
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
2619
|
-
var SafeIdSchema =
|
|
2825
|
+
var SafeIdSchema = z68.string().refine(
|
|
2620
2826
|
(value) => {
|
|
2621
2827
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
2622
2828
|
},
|
|
@@ -2626,58 +2832,58 @@ var SafeIdSchema = z65.string().refine(
|
|
|
2626
2832
|
);
|
|
2627
2833
|
|
|
2628
2834
|
// src/dsm/elements/data/shadow.ts
|
|
2629
|
-
import { z as
|
|
2630
|
-
var ShadowType =
|
|
2631
|
-
var ShadowLayerValue =
|
|
2835
|
+
import { z as z69 } from "zod";
|
|
2836
|
+
var ShadowType = z69.enum(["Drop", "Inner"]);
|
|
2837
|
+
var ShadowLayerValue = z69.object({
|
|
2632
2838
|
color: ColorTokenData,
|
|
2633
|
-
x:
|
|
2634
|
-
y:
|
|
2635
|
-
radius:
|
|
2636
|
-
spread:
|
|
2839
|
+
x: z69.number(),
|
|
2840
|
+
y: z69.number(),
|
|
2841
|
+
radius: z69.number(),
|
|
2842
|
+
spread: z69.number(),
|
|
2637
2843
|
opacity: OpacityTokenData.optional(),
|
|
2638
2844
|
type: ShadowType
|
|
2639
2845
|
});
|
|
2640
2846
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
2641
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
2847
|
+
var ShadowTokenData = tokenAliasOrValue(z69.array(ShadowTokenDataBase));
|
|
2642
2848
|
|
|
2643
2849
|
// src/dsm/elements/data/size.ts
|
|
2644
|
-
import { z as
|
|
2645
|
-
var SizeUnit =
|
|
2646
|
-
var SizeValue =
|
|
2850
|
+
import { z as z70 } from "zod";
|
|
2851
|
+
var SizeUnit = z70.enum(["Pixels", "Rem", "Percent"]);
|
|
2852
|
+
var SizeValue = z70.object({
|
|
2647
2853
|
unit: SizeUnit,
|
|
2648
|
-
measure:
|
|
2854
|
+
measure: z70.number()
|
|
2649
2855
|
});
|
|
2650
2856
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
2651
2857
|
|
|
2652
2858
|
// src/dsm/elements/data/space.ts
|
|
2653
|
-
import { z as
|
|
2654
|
-
var SpaceUnit =
|
|
2655
|
-
var SpaceValue =
|
|
2859
|
+
import { z as z71 } from "zod";
|
|
2860
|
+
var SpaceUnit = z71.enum(["Pixels", "Rem", "Percent"]);
|
|
2861
|
+
var SpaceValue = z71.object({
|
|
2656
2862
|
unit: SpaceUnit,
|
|
2657
|
-
measure:
|
|
2863
|
+
measure: z71.number()
|
|
2658
2864
|
});
|
|
2659
2865
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
2660
2866
|
|
|
2661
2867
|
// src/dsm/elements/data/string.ts
|
|
2662
|
-
import { z as
|
|
2663
|
-
var StringValue =
|
|
2868
|
+
import { z as z72 } from "zod";
|
|
2869
|
+
var StringValue = z72.string();
|
|
2664
2870
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
2665
2871
|
|
|
2666
2872
|
// src/dsm/elements/data/text-case.ts
|
|
2667
|
-
import { z as
|
|
2668
|
-
var TextCase =
|
|
2873
|
+
import { z as z73 } from "zod";
|
|
2874
|
+
var TextCase = z73.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
2669
2875
|
var TextCaseValue = TextCase;
|
|
2670
2876
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
2671
2877
|
|
|
2672
2878
|
// src/dsm/elements/data/text-decoration.ts
|
|
2673
|
-
import { z as
|
|
2674
|
-
var TextDecoration =
|
|
2879
|
+
import { z as z74 } from "zod";
|
|
2880
|
+
var TextDecoration = z74.enum(["None", "Underline", "Strikethrough"]);
|
|
2675
2881
|
var TextDecorationValue = TextDecoration;
|
|
2676
2882
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
2677
2883
|
|
|
2678
2884
|
// src/dsm/elements/data/typography.ts
|
|
2679
|
-
import { z as
|
|
2680
|
-
var TypographyValue =
|
|
2885
|
+
import { z as z75 } from "zod";
|
|
2886
|
+
var TypographyValue = z75.object({
|
|
2681
2887
|
fontSize: FontSizeTokenData,
|
|
2682
2888
|
fontFamily: FontFamilyTokenData,
|
|
2683
2889
|
fontWeight: FontWeightTokenData,
|
|
@@ -2691,27 +2897,27 @@ var TypographyValue = z72.object({
|
|
|
2691
2897
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
2692
2898
|
|
|
2693
2899
|
// src/dsm/elements/data/visibility.ts
|
|
2694
|
-
import { z as
|
|
2695
|
-
var Visibility =
|
|
2900
|
+
import { z as z76 } from "zod";
|
|
2901
|
+
var Visibility = z76.enum(["Hidden", "Visible"]);
|
|
2696
2902
|
var VisibilityValue = Visibility;
|
|
2697
2903
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
2698
2904
|
|
|
2699
2905
|
// src/dsm/elements/data/z-index.ts
|
|
2700
|
-
import { z as
|
|
2701
|
-
var ZIndexUnit =
|
|
2702
|
-
var ZIndexValue =
|
|
2906
|
+
import { z as z77 } from "zod";
|
|
2907
|
+
var ZIndexUnit = z77.enum(["Raw"]);
|
|
2908
|
+
var ZIndexValue = z77.object({
|
|
2703
2909
|
unit: ZIndexUnit,
|
|
2704
|
-
measure:
|
|
2910
|
+
measure: z77.number()
|
|
2705
2911
|
});
|
|
2706
2912
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
2707
2913
|
|
|
2708
2914
|
// src/dsm/elements/documentation-page-v1.ts
|
|
2709
|
-
import { z as
|
|
2915
|
+
import { z as z79 } from "zod";
|
|
2710
2916
|
|
|
2711
2917
|
// src/dsm/elements/group.ts
|
|
2712
|
-
import { z as
|
|
2918
|
+
import { z as z78 } from "zod";
|
|
2713
2919
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
2714
|
-
shortPersistentId:
|
|
2920
|
+
shortPersistentId: z78.string().optional(),
|
|
2715
2921
|
childType: DesignElementType,
|
|
2716
2922
|
data: ElementGroupDataV2.optional()
|
|
2717
2923
|
});
|
|
@@ -2719,7 +2925,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
2719
2925
|
|
|
2720
2926
|
// src/dsm/elements/documentation-page-v1.ts
|
|
2721
2927
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2722
|
-
shortPersistentId:
|
|
2928
|
+
shortPersistentId: z79.string(),
|
|
2723
2929
|
data: DocumentationPageDataV1
|
|
2724
2930
|
});
|
|
2725
2931
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -2729,24 +2935,24 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
2729
2935
|
});
|
|
2730
2936
|
|
|
2731
2937
|
// src/dsm/elements/documentation-page-v2.ts
|
|
2732
|
-
import { z as
|
|
2938
|
+
import { z as z80 } from "zod";
|
|
2733
2939
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
2734
|
-
shortPersistentId:
|
|
2940
|
+
shortPersistentId: z80.string(),
|
|
2735
2941
|
data: DocumentationPageDataV2.extend({
|
|
2736
|
-
oldBlocks:
|
|
2942
|
+
oldBlocks: z80.array(PageBlockV1).optional()
|
|
2737
2943
|
})
|
|
2738
2944
|
});
|
|
2739
2945
|
|
|
2740
2946
|
// src/dsm/elements/figma-component.ts
|
|
2741
|
-
import { z as
|
|
2742
|
-
var FigmaComponentOriginPart =
|
|
2743
|
-
nodeId:
|
|
2744
|
-
width:
|
|
2745
|
-
height:
|
|
2947
|
+
import { z as z81 } from "zod";
|
|
2948
|
+
var FigmaComponentOriginPart = z81.object({
|
|
2949
|
+
nodeId: z81.string().optional(),
|
|
2950
|
+
width: z81.number().optional(),
|
|
2951
|
+
height: z81.number().optional()
|
|
2746
2952
|
});
|
|
2747
|
-
var FigmaComponentAsset =
|
|
2748
|
-
assetId:
|
|
2749
|
-
assetPath:
|
|
2953
|
+
var FigmaComponentAsset = z81.object({
|
|
2954
|
+
assetId: z81.string(),
|
|
2955
|
+
assetPath: z81.string()
|
|
2750
2956
|
});
|
|
2751
2957
|
var FigmaComponentOrigin = DesignElementOrigin.extend(FigmaComponentOriginPart.shape);
|
|
2752
2958
|
var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -2754,20 +2960,20 @@ var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart
|
|
|
2754
2960
|
thumbnail: FigmaComponentAsset,
|
|
2755
2961
|
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
2756
2962
|
svg: FigmaComponentAsset.optional(),
|
|
2757
|
-
isAsset:
|
|
2758
|
-
parentComponentPersistentId: nullishToOptional(
|
|
2963
|
+
isAsset: z81.boolean(),
|
|
2964
|
+
parentComponentPersistentId: nullishToOptional(z81.string())
|
|
2759
2965
|
});
|
|
2760
2966
|
function isImportedFigmaComponent(component) {
|
|
2761
2967
|
return !!component.origin;
|
|
2762
2968
|
}
|
|
2763
2969
|
|
|
2764
2970
|
// src/dsm/elements/figma-file-structures.ts
|
|
2765
|
-
import { z as
|
|
2766
|
-
var FigmaFileStructureOrigin =
|
|
2767
|
-
sourceId:
|
|
2768
|
-
fileId:
|
|
2971
|
+
import { z as z82 } from "zod";
|
|
2972
|
+
var FigmaFileStructureOrigin = z82.object({
|
|
2973
|
+
sourceId: z82.string(),
|
|
2974
|
+
fileId: z82.string().optional()
|
|
2769
2975
|
});
|
|
2770
|
-
var FigmaFileStructureData =
|
|
2976
|
+
var FigmaFileStructureData = z82.object({
|
|
2771
2977
|
rootNode: FigmaFileStructureNode,
|
|
2772
2978
|
assetsInFile: FigmaFileStructureStatistics
|
|
2773
2979
|
});
|
|
@@ -2783,10 +2989,10 @@ function traverseStructure(node, action) {
|
|
|
2783
2989
|
}
|
|
2784
2990
|
|
|
2785
2991
|
// src/dsm/elements/figma-node-reference.ts
|
|
2786
|
-
import { z as
|
|
2787
|
-
var FigmaNodeReferenceOrigin =
|
|
2788
|
-
sourceId:
|
|
2789
|
-
parentName:
|
|
2992
|
+
import { z as z83 } from "zod";
|
|
2993
|
+
var FigmaNodeReferenceOrigin = z83.object({
|
|
2994
|
+
sourceId: z83.string(),
|
|
2995
|
+
parentName: z83.string().optional()
|
|
2790
2996
|
});
|
|
2791
2997
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
2792
2998
|
data: FigmaNodeReferenceData,
|
|
@@ -2794,18 +3000,18 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
2794
3000
|
});
|
|
2795
3001
|
|
|
2796
3002
|
// src/dsm/elements/theme.ts
|
|
2797
|
-
import { z as
|
|
3003
|
+
import { z as z85 } from "zod";
|
|
2798
3004
|
|
|
2799
3005
|
// src/dsm/elements/tokens.ts
|
|
2800
|
-
import { z as
|
|
2801
|
-
var DesignTokenOriginPart =
|
|
2802
|
-
referenceOriginId:
|
|
2803
|
-
referenceOriginKey:
|
|
2804
|
-
referenceOriginName:
|
|
2805
|
-
referenceOriginRemote:
|
|
2806
|
-
referencePersistentId:
|
|
2807
|
-
referenceResolutionFailed:
|
|
2808
|
-
key:
|
|
3006
|
+
import { z as z84 } from "zod";
|
|
3007
|
+
var DesignTokenOriginPart = z84.object({
|
|
3008
|
+
referenceOriginId: z84.string().optional(),
|
|
3009
|
+
referenceOriginKey: z84.string().optional(),
|
|
3010
|
+
referenceOriginName: z84.string().optional(),
|
|
3011
|
+
referenceOriginRemote: z84.boolean().optional(),
|
|
3012
|
+
referencePersistentId: z84.string().optional(),
|
|
3013
|
+
referenceResolutionFailed: z84.boolean().optional(),
|
|
3014
|
+
key: z84.string().optional()
|
|
2809
3015
|
});
|
|
2810
3016
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
2811
3017
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -2817,111 +3023,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
2817
3023
|
brandPersistentId: true,
|
|
2818
3024
|
designSystemVersionId: true
|
|
2819
3025
|
});
|
|
2820
|
-
var BlurTokenTypedData =
|
|
2821
|
-
type:
|
|
3026
|
+
var BlurTokenTypedData = z84.object({
|
|
3027
|
+
type: z84.literal("Blur"),
|
|
2822
3028
|
data: BlurTokenData
|
|
2823
3029
|
});
|
|
2824
|
-
var ColorTokenTypedData =
|
|
2825
|
-
type:
|
|
3030
|
+
var ColorTokenTypedData = z84.object({
|
|
3031
|
+
type: z84.literal("Color"),
|
|
2826
3032
|
data: ColorTokenData
|
|
2827
3033
|
});
|
|
2828
|
-
var GradientTokenTypedData =
|
|
2829
|
-
type:
|
|
3034
|
+
var GradientTokenTypedData = z84.object({
|
|
3035
|
+
type: z84.literal("Gradient"),
|
|
2830
3036
|
data: GradientTokenData
|
|
2831
3037
|
});
|
|
2832
|
-
var OpacityTokenTypedData =
|
|
2833
|
-
type:
|
|
3038
|
+
var OpacityTokenTypedData = z84.object({
|
|
3039
|
+
type: z84.literal("Opacity"),
|
|
2834
3040
|
data: OpacityTokenData
|
|
2835
3041
|
});
|
|
2836
|
-
var ShadowTokenTypedData =
|
|
2837
|
-
type:
|
|
3042
|
+
var ShadowTokenTypedData = z84.object({
|
|
3043
|
+
type: z84.literal("Shadow"),
|
|
2838
3044
|
data: ShadowTokenData
|
|
2839
3045
|
});
|
|
2840
|
-
var TypographyTokenTypedData =
|
|
2841
|
-
type:
|
|
3046
|
+
var TypographyTokenTypedData = z84.object({
|
|
3047
|
+
type: z84.literal("Typography"),
|
|
2842
3048
|
data: TypographyTokenData
|
|
2843
3049
|
});
|
|
2844
|
-
var StringTokenTypedData =
|
|
2845
|
-
type:
|
|
3050
|
+
var StringTokenTypedData = z84.object({
|
|
3051
|
+
type: z84.literal("String"),
|
|
2846
3052
|
data: StringTokenData
|
|
2847
3053
|
});
|
|
2848
|
-
var DimensionTokenTypedData =
|
|
2849
|
-
type:
|
|
3054
|
+
var DimensionTokenTypedData = z84.object({
|
|
3055
|
+
type: z84.literal("Dimension"),
|
|
2850
3056
|
data: DimensionTokenData
|
|
2851
3057
|
});
|
|
2852
|
-
var FontSizeTokenTypedData =
|
|
2853
|
-
type:
|
|
3058
|
+
var FontSizeTokenTypedData = z84.object({
|
|
3059
|
+
type: z84.literal("FontSize"),
|
|
2854
3060
|
data: FontSizeTokenData
|
|
2855
3061
|
});
|
|
2856
|
-
var FontFamilyTokenTypedData =
|
|
2857
|
-
type:
|
|
3062
|
+
var FontFamilyTokenTypedData = z84.object({
|
|
3063
|
+
type: z84.literal("FontFamily"),
|
|
2858
3064
|
data: FontFamilyTokenData
|
|
2859
3065
|
});
|
|
2860
|
-
var FontWeightTokenTypedData =
|
|
2861
|
-
type:
|
|
3066
|
+
var FontWeightTokenTypedData = z84.object({
|
|
3067
|
+
type: z84.literal("FontWeight"),
|
|
2862
3068
|
data: FontWeightTokenData
|
|
2863
3069
|
});
|
|
2864
|
-
var LetterSpacingTokenTypedData =
|
|
2865
|
-
type:
|
|
3070
|
+
var LetterSpacingTokenTypedData = z84.object({
|
|
3071
|
+
type: z84.literal("LetterSpacing"),
|
|
2866
3072
|
data: LetterSpacingTokenData
|
|
2867
3073
|
});
|
|
2868
|
-
var LineHeightTokenTypedData =
|
|
2869
|
-
type:
|
|
3074
|
+
var LineHeightTokenTypedData = z84.object({
|
|
3075
|
+
type: z84.literal("LineHeight"),
|
|
2870
3076
|
data: LineHeightTokenData
|
|
2871
3077
|
});
|
|
2872
|
-
var ParagraphSpacingTokenTypedData =
|
|
2873
|
-
type:
|
|
3078
|
+
var ParagraphSpacingTokenTypedData = z84.object({
|
|
3079
|
+
type: z84.literal("ParagraphSpacing"),
|
|
2874
3080
|
data: ParagraphSpacingTokenData
|
|
2875
3081
|
});
|
|
2876
|
-
var TextCaseTokenTypedData =
|
|
2877
|
-
type:
|
|
3082
|
+
var TextCaseTokenTypedData = z84.object({
|
|
3083
|
+
type: z84.literal("TextCase"),
|
|
2878
3084
|
data: TextCaseTokenData
|
|
2879
3085
|
});
|
|
2880
|
-
var TextDecorationTokenTypedData =
|
|
2881
|
-
type:
|
|
3086
|
+
var TextDecorationTokenTypedData = z84.object({
|
|
3087
|
+
type: z84.literal("TextDecoration"),
|
|
2882
3088
|
data: TextDecorationTokenData
|
|
2883
3089
|
});
|
|
2884
|
-
var BorderRadiusTokenTypedData =
|
|
2885
|
-
type:
|
|
3090
|
+
var BorderRadiusTokenTypedData = z84.object({
|
|
3091
|
+
type: z84.literal("BorderRadius"),
|
|
2886
3092
|
data: BorderRadiusTokenData
|
|
2887
3093
|
});
|
|
2888
|
-
var BorderWidthTokenTypedData =
|
|
2889
|
-
type:
|
|
3094
|
+
var BorderWidthTokenTypedData = z84.object({
|
|
3095
|
+
type: z84.literal("BorderWidth"),
|
|
2890
3096
|
data: BorderWidthTokenData
|
|
2891
3097
|
});
|
|
2892
|
-
var BorderTypedData =
|
|
2893
|
-
type:
|
|
3098
|
+
var BorderTypedData = z84.object({
|
|
3099
|
+
type: z84.literal("Border"),
|
|
2894
3100
|
data: BorderTokenData
|
|
2895
3101
|
});
|
|
2896
|
-
var ProductCopyTypedData =
|
|
2897
|
-
type:
|
|
3102
|
+
var ProductCopyTypedData = z84.object({
|
|
3103
|
+
type: z84.literal("ProductCopy"),
|
|
2898
3104
|
data: ProductCopyTokenData
|
|
2899
3105
|
});
|
|
2900
|
-
var SizeTypedData =
|
|
2901
|
-
type:
|
|
3106
|
+
var SizeTypedData = z84.object({
|
|
3107
|
+
type: z84.literal("Size"),
|
|
2902
3108
|
data: SizeTokenData
|
|
2903
3109
|
});
|
|
2904
|
-
var SpaceTypedData =
|
|
2905
|
-
type:
|
|
3110
|
+
var SpaceTypedData = z84.object({
|
|
3111
|
+
type: z84.literal("Space"),
|
|
2906
3112
|
data: SpaceTokenData
|
|
2907
3113
|
});
|
|
2908
|
-
var VisibilityTypedData =
|
|
2909
|
-
type:
|
|
3114
|
+
var VisibilityTypedData = z84.object({
|
|
3115
|
+
type: z84.literal("Visibility"),
|
|
2910
3116
|
data: VisibilityTokenData
|
|
2911
3117
|
});
|
|
2912
|
-
var ZIndexTypedData =
|
|
2913
|
-
type:
|
|
3118
|
+
var ZIndexTypedData = z84.object({
|
|
3119
|
+
type: z84.literal("ZIndex"),
|
|
2914
3120
|
data: ZIndexTokenData
|
|
2915
3121
|
});
|
|
2916
|
-
var DurationTypedData =
|
|
2917
|
-
type:
|
|
3122
|
+
var DurationTypedData = z84.object({
|
|
3123
|
+
type: z84.literal("Duration"),
|
|
2918
3124
|
data: DurationTokenData
|
|
2919
3125
|
});
|
|
2920
|
-
var FontTypedData =
|
|
2921
|
-
type:
|
|
2922
|
-
data:
|
|
3126
|
+
var FontTypedData = z84.object({
|
|
3127
|
+
type: z84.literal("Font"),
|
|
3128
|
+
data: z84.record(z84.any())
|
|
2923
3129
|
});
|
|
2924
|
-
var DesignTokenTypedData =
|
|
3130
|
+
var DesignTokenTypedData = z84.discriminatedUnion("type", [
|
|
2925
3131
|
BlurTokenTypedData,
|
|
2926
3132
|
BorderRadiusTokenTypedData,
|
|
2927
3133
|
BorderWidthTokenTypedData,
|
|
@@ -2971,32 +3177,32 @@ function designTokenTypeFilter(type) {
|
|
|
2971
3177
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
2972
3178
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
2973
3179
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
2974
|
-
|
|
2975
|
-
tokenPersistentId:
|
|
3180
|
+
z85.object({
|
|
3181
|
+
tokenPersistentId: z85.string(),
|
|
2976
3182
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
2977
3183
|
})
|
|
2978
3184
|
);
|
|
2979
|
-
var ThemeElementData =
|
|
2980
|
-
value:
|
|
2981
|
-
overrides:
|
|
3185
|
+
var ThemeElementData = z85.object({
|
|
3186
|
+
value: z85.object({
|
|
3187
|
+
overrides: z85.array(ThemeOverride)
|
|
2982
3188
|
})
|
|
2983
3189
|
});
|
|
2984
|
-
var ThemeOriginPart =
|
|
2985
|
-
var ThemeOriginObject =
|
|
2986
|
-
id:
|
|
2987
|
-
name:
|
|
3190
|
+
var ThemeOriginPart = z85.object({});
|
|
3191
|
+
var ThemeOriginObject = z85.object({
|
|
3192
|
+
id: z85.string(),
|
|
3193
|
+
name: z85.string()
|
|
2988
3194
|
});
|
|
2989
|
-
var ThemeOriginSource =
|
|
2990
|
-
sourceId:
|
|
2991
|
-
sourceObjects:
|
|
3195
|
+
var ThemeOriginSource = z85.object({
|
|
3196
|
+
sourceId: z85.string(),
|
|
3197
|
+
sourceObjects: z85.array(ThemeOriginObject)
|
|
2992
3198
|
});
|
|
2993
|
-
var ThemeOrigin =
|
|
2994
|
-
sources:
|
|
3199
|
+
var ThemeOrigin = z85.object({
|
|
3200
|
+
sources: z85.array(ThemeOriginSource)
|
|
2995
3201
|
});
|
|
2996
3202
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
2997
3203
|
origin: ThemeOrigin.optional(),
|
|
2998
|
-
overrides:
|
|
2999
|
-
codeName:
|
|
3204
|
+
overrides: z85.array(ThemeOverride),
|
|
3205
|
+
codeName: z85.string()
|
|
3000
3206
|
});
|
|
3001
3207
|
|
|
3002
3208
|
// src/dsm/elements/utils.ts
|
|
@@ -3066,17 +3272,17 @@ var PageBlockDefinitionsMap = class {
|
|
|
3066
3272
|
};
|
|
3067
3273
|
|
|
3068
3274
|
// src/dsm/data-sources/import-summary.ts
|
|
3069
|
-
var FileStructureStats =
|
|
3275
|
+
var FileStructureStats = z86.object({
|
|
3070
3276
|
frames: zeroNumberByDefault(),
|
|
3071
3277
|
components: zeroNumberByDefault(),
|
|
3072
3278
|
componentSets: zeroNumberByDefault()
|
|
3073
3279
|
});
|
|
3074
3280
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
3075
3281
|
// Backward compatibility
|
|
3076
|
-
|
|
3282
|
+
z86.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
3077
3283
|
);
|
|
3078
|
-
var SourceImportSummaryByTokenType =
|
|
3079
|
-
var SourceImportTokenSummary =
|
|
3284
|
+
var SourceImportSummaryByTokenType = z86.record(SourceImportSummaryByTokenTypeKey, z86.number());
|
|
3285
|
+
var SourceImportTokenSummary = z86.object({
|
|
3080
3286
|
tokensCreated: zeroNumberByDefault(),
|
|
3081
3287
|
tokensUpdated: zeroNumberByDefault(),
|
|
3082
3288
|
tokensDeleted: zeroNumberByDefault(),
|
|
@@ -3084,7 +3290,7 @@ var SourceImportTokenSummary = z83.object({
|
|
|
3084
3290
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
3085
3291
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
3086
3292
|
});
|
|
3087
|
-
var SourceImportComponentSummary =
|
|
3293
|
+
var SourceImportComponentSummary = z86.object({
|
|
3088
3294
|
componentsCreated: zeroNumberByDefault(),
|
|
3089
3295
|
componentsUpdated: zeroNumberByDefault(),
|
|
3090
3296
|
componentsDeleted: zeroNumberByDefault(),
|
|
@@ -3092,163 +3298,163 @@ var SourceImportComponentSummary = z83.object({
|
|
|
3092
3298
|
componentAssetsUpdated: zeroNumberByDefault(),
|
|
3093
3299
|
componentAssetsDeleted: zeroNumberByDefault()
|
|
3094
3300
|
});
|
|
3095
|
-
var SourceImportFrameSummary =
|
|
3301
|
+
var SourceImportFrameSummary = z86.object({
|
|
3096
3302
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
3097
|
-
invalidReferencesCount: nullishToOptional(
|
|
3098
|
-
});
|
|
3099
|
-
var SourceImportSummary =
|
|
3100
|
-
sourceId: nullishToOptional(
|
|
3101
|
-
brandId: nullishToOptional(
|
|
3102
|
-
versionId: nullishToOptional(
|
|
3103
|
-
error: nullishToOptional(
|
|
3104
|
-
isFailed:
|
|
3105
|
-
warnings:
|
|
3303
|
+
invalidReferencesCount: nullishToOptional(z86.number().optional())
|
|
3304
|
+
});
|
|
3305
|
+
var SourceImportSummary = z86.object({
|
|
3306
|
+
sourceId: nullishToOptional(z86.string()),
|
|
3307
|
+
brandId: nullishToOptional(z86.string()),
|
|
3308
|
+
versionId: nullishToOptional(z86.string()),
|
|
3309
|
+
error: nullishToOptional(z86.any()),
|
|
3310
|
+
isFailed: z86.boolean(),
|
|
3311
|
+
warnings: z86.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
3106
3312
|
...SourceImportTokenSummary.shape,
|
|
3107
3313
|
...SourceImportComponentSummary.shape,
|
|
3108
3314
|
...FileStructureStats.shape
|
|
3109
3315
|
});
|
|
3110
3316
|
function zeroNumberByDefault() {
|
|
3111
|
-
return
|
|
3317
|
+
return z86.number().nullish().transform((v) => v ?? 0);
|
|
3112
3318
|
}
|
|
3113
3319
|
|
|
3114
3320
|
// src/dsm/data-sources/data-source.ts
|
|
3115
|
-
var DataSourceRemoteType =
|
|
3116
|
-
var DataSourceUploadRemoteSource =
|
|
3117
|
-
var DataSourceFigmaState =
|
|
3118
|
-
var DataSourceAutoImportMode =
|
|
3119
|
-
var DataSourceStats =
|
|
3321
|
+
var DataSourceRemoteType = z87.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
3322
|
+
var DataSourceUploadRemoteSource = z87.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
3323
|
+
var DataSourceFigmaState = z87.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
3324
|
+
var DataSourceAutoImportMode = z87.enum(["Never", "Hourly"]);
|
|
3325
|
+
var DataSourceStats = z87.object({
|
|
3120
3326
|
tokens: zeroNumberByDefault2(),
|
|
3121
3327
|
components: zeroNumberByDefault2(),
|
|
3122
3328
|
assets: zeroNumberByDefault2(),
|
|
3123
3329
|
frames: zeroNumberByDefault2()
|
|
3124
3330
|
});
|
|
3125
|
-
var DataSourceFigmaFileData =
|
|
3126
|
-
lastUpdatedAt:
|
|
3127
|
-
});
|
|
3128
|
-
var DataSourceFigmaFileVersionData = z84.object({
|
|
3129
|
-
id: z84.string(),
|
|
3130
|
-
label: z84.string().optional(),
|
|
3131
|
-
description: z84.string().optional(),
|
|
3132
|
-
createdAt: z84.coerce.date()
|
|
3133
|
-
});
|
|
3134
|
-
var DataSourceFigmaScope = z84.object({
|
|
3135
|
-
assets: z84.boolean(),
|
|
3136
|
-
components: z84.boolean(),
|
|
3137
|
-
documentationFrames: z84.boolean(),
|
|
3138
|
-
tokens: z84.boolean(),
|
|
3139
|
-
themePersistentId: z84.string().optional(),
|
|
3140
|
-
isUnpublishedContentFallbackEnabled: z84.boolean()
|
|
3331
|
+
var DataSourceFigmaFileData = z87.object({
|
|
3332
|
+
lastUpdatedAt: z87.coerce.date()
|
|
3141
3333
|
});
|
|
3142
|
-
var
|
|
3334
|
+
var DataSourceFigmaFileVersionData = z87.object({
|
|
3335
|
+
id: z87.string(),
|
|
3336
|
+
label: z87.string().optional(),
|
|
3337
|
+
description: z87.string().optional(),
|
|
3338
|
+
createdAt: z87.coerce.date()
|
|
3339
|
+
});
|
|
3340
|
+
var DataSourceFigmaScope = z87.object({
|
|
3341
|
+
assets: z87.boolean(),
|
|
3342
|
+
components: z87.boolean(),
|
|
3343
|
+
documentationFrames: z87.boolean(),
|
|
3344
|
+
tokens: z87.boolean(),
|
|
3345
|
+
themePersistentId: z87.string().optional(),
|
|
3346
|
+
isUnpublishedContentFallbackEnabled: z87.boolean()
|
|
3347
|
+
});
|
|
3348
|
+
var DataSourceFigmaImportMetadata = z87.object({
|
|
3143
3349
|
fileData: DataSourceFigmaFileData.optional(),
|
|
3144
3350
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
3145
3351
|
});
|
|
3146
|
-
var DataSourceFigmaRemote =
|
|
3147
|
-
type:
|
|
3148
|
-
fileId:
|
|
3149
|
-
preferredCredentialId:
|
|
3150
|
-
ownerId:
|
|
3352
|
+
var DataSourceFigmaRemote = z87.object({
|
|
3353
|
+
type: z87.literal(DataSourceRemoteType.Enum.Figma),
|
|
3354
|
+
fileId: z87.string(),
|
|
3355
|
+
preferredCredentialId: z87.string().optional(),
|
|
3356
|
+
ownerId: z87.string(),
|
|
3151
3357
|
// todo remove or keep to reference who created data source
|
|
3152
|
-
ownerName:
|
|
3358
|
+
ownerName: z87.string(),
|
|
3153
3359
|
// todo probably remove
|
|
3154
3360
|
scope: DataSourceFigmaScope,
|
|
3155
3361
|
state: DataSourceFigmaState,
|
|
3156
|
-
requiresSync:
|
|
3362
|
+
requiresSync: z87.boolean().optional().transform((v) => v ?? false),
|
|
3157
3363
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
3158
|
-
downloadChunkSize:
|
|
3159
|
-
figmaRenderChunkSize:
|
|
3160
|
-
maxFileDepth:
|
|
3364
|
+
downloadChunkSize: z87.number().optional(),
|
|
3365
|
+
figmaRenderChunkSize: z87.number().optional(),
|
|
3366
|
+
maxFileDepth: z87.number().optional()
|
|
3161
3367
|
});
|
|
3162
|
-
var DataSourceTokenStudioRemote =
|
|
3163
|
-
type:
|
|
3368
|
+
var DataSourceTokenStudioRemote = z87.object({
|
|
3369
|
+
type: z87.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
3164
3370
|
});
|
|
3165
|
-
var DataSourceUploadImportMetadata =
|
|
3166
|
-
var DataSourceUploadRemote =
|
|
3167
|
-
type:
|
|
3168
|
-
remoteId:
|
|
3371
|
+
var DataSourceUploadImportMetadata = z87.record(z87.any());
|
|
3372
|
+
var DataSourceUploadRemote = z87.object({
|
|
3373
|
+
type: z87.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
3374
|
+
remoteId: z87.string(),
|
|
3169
3375
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
3170
3376
|
lastImportMetadata: DataSourceUploadImportMetadata.optional(),
|
|
3171
3377
|
warnings: nullishToOptional(ImportWarning.array())
|
|
3172
3378
|
});
|
|
3173
|
-
var DataSourceRemote =
|
|
3379
|
+
var DataSourceRemote = z87.discriminatedUnion("type", [
|
|
3174
3380
|
DataSourceFigmaRemote,
|
|
3175
3381
|
DataSourceUploadRemote,
|
|
3176
3382
|
DataSourceTokenStudioRemote
|
|
3177
3383
|
]);
|
|
3178
|
-
var DataSource =
|
|
3179
|
-
id:
|
|
3180
|
-
name:
|
|
3181
|
-
thumbnailUrl:
|
|
3182
|
-
createdAt:
|
|
3183
|
-
lastImportedAt:
|
|
3384
|
+
var DataSource = z87.object({
|
|
3385
|
+
id: z87.string(),
|
|
3386
|
+
name: z87.string(),
|
|
3387
|
+
thumbnailUrl: z87.string().optional(),
|
|
3388
|
+
createdAt: z87.coerce.date().optional(),
|
|
3389
|
+
lastImportedAt: z87.coerce.date().optional(),
|
|
3184
3390
|
lastImportSummary: SourceImportSummary.optional(),
|
|
3185
|
-
designSystemId:
|
|
3186
|
-
brandPersistentId:
|
|
3391
|
+
designSystemId: z87.string(),
|
|
3392
|
+
brandPersistentId: z87.string(),
|
|
3187
3393
|
autoImportMode: DataSourceAutoImportMode,
|
|
3188
3394
|
stats: DataSourceStats,
|
|
3189
3395
|
remote: DataSourceRemote,
|
|
3190
|
-
sortOrder:
|
|
3396
|
+
sortOrder: z87.number()
|
|
3191
3397
|
});
|
|
3192
|
-
var DataSourceVersion =
|
|
3193
|
-
id:
|
|
3194
|
-
createdAt:
|
|
3195
|
-
label:
|
|
3196
|
-
description:
|
|
3398
|
+
var DataSourceVersion = z87.object({
|
|
3399
|
+
id: z87.string(),
|
|
3400
|
+
createdAt: z87.coerce.date(),
|
|
3401
|
+
label: z87.string().nullish(),
|
|
3402
|
+
description: z87.string().nullish()
|
|
3197
3403
|
});
|
|
3198
3404
|
function zeroNumberByDefault2() {
|
|
3199
|
-
return
|
|
3405
|
+
return z87.number().nullish().transform((v) => v ?? 0);
|
|
3200
3406
|
}
|
|
3201
3407
|
|
|
3202
3408
|
// src/dsm/data-sources/import-job.ts
|
|
3203
|
-
import { z as
|
|
3204
|
-
var ImportJobState =
|
|
3205
|
-
var ImportJobOperation =
|
|
3409
|
+
import { z as z88 } from "zod";
|
|
3410
|
+
var ImportJobState = z88.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
3411
|
+
var ImportJobOperation = z88.enum(["Check", "Import"]);
|
|
3206
3412
|
var ImportJob = Entity.extend({
|
|
3207
|
-
designSystemId:
|
|
3208
|
-
designSystemVersionId:
|
|
3209
|
-
sourceIds:
|
|
3413
|
+
designSystemId: z88.string(),
|
|
3414
|
+
designSystemVersionId: z88.string(),
|
|
3415
|
+
sourceIds: z88.array(z88.string()),
|
|
3210
3416
|
state: ImportJobState,
|
|
3211
|
-
createdByUserId:
|
|
3212
|
-
importContextId:
|
|
3213
|
-
error:
|
|
3417
|
+
createdByUserId: z88.string().optional(),
|
|
3418
|
+
importContextId: z88.string(),
|
|
3419
|
+
error: z88.string().optional(),
|
|
3214
3420
|
sourceType: DataSourceRemoteType,
|
|
3215
|
-
importContextCleanedUp:
|
|
3421
|
+
importContextCleanedUp: z88.boolean()
|
|
3216
3422
|
});
|
|
3217
3423
|
|
|
3218
3424
|
// src/dsm/import/support/import-context.ts
|
|
3219
|
-
var ImportFunctionInput =
|
|
3220
|
-
importJobId:
|
|
3221
|
-
importContextId:
|
|
3222
|
-
designSystemId:
|
|
3425
|
+
var ImportFunctionInput = z89.object({
|
|
3426
|
+
importJobId: z89.string(),
|
|
3427
|
+
importContextId: z89.string(),
|
|
3428
|
+
designSystemId: z89.string().optional()
|
|
3223
3429
|
});
|
|
3224
|
-
var ImportedFigmaSourceData =
|
|
3225
|
-
sourceId:
|
|
3430
|
+
var ImportedFigmaSourceData = z89.object({
|
|
3431
|
+
sourceId: z89.string(),
|
|
3226
3432
|
figmaRemote: DataSourceFigmaRemote
|
|
3227
3433
|
});
|
|
3228
|
-
var FigmaImportBaseContext =
|
|
3229
|
-
designSystemId:
|
|
3434
|
+
var FigmaImportBaseContext = z89.object({
|
|
3435
|
+
designSystemId: z89.string(),
|
|
3230
3436
|
/**
|
|
3231
3437
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
3232
3438
|
* mentioned in the `importedSourceDataBySourceId`
|
|
3233
3439
|
*
|
|
3234
3440
|
* fileId: file data
|
|
3235
3441
|
*/
|
|
3236
|
-
fileAccessByFileId:
|
|
3442
|
+
fileAccessByFileId: z89.record(FigmaFileAccessData),
|
|
3237
3443
|
/**
|
|
3238
3444
|
* Figma source data for which import was requested
|
|
3239
3445
|
*
|
|
3240
3446
|
* sourceId: source data
|
|
3241
3447
|
*/
|
|
3242
|
-
importedSourceDataBySourceId:
|
|
3448
|
+
importedSourceDataBySourceId: z89.record(ImportedFigmaSourceData),
|
|
3243
3449
|
/**
|
|
3244
3450
|
* Array of warnings that will be written into the import result summary at the end
|
|
3245
3451
|
* of import job execution and displayed by the client.
|
|
3246
3452
|
*/
|
|
3247
|
-
importWarnings:
|
|
3453
|
+
importWarnings: z89.record(ImportWarning.array()).default({})
|
|
3248
3454
|
});
|
|
3249
3455
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
3250
|
-
sourcesWithMissingAccess:
|
|
3251
|
-
shadowOpacityOptional:
|
|
3456
|
+
sourcesWithMissingAccess: z89.array(z89.string()).default([]),
|
|
3457
|
+
shadowOpacityOptional: z89.boolean().default(false)
|
|
3252
3458
|
});
|
|
3253
3459
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
3254
3460
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -3260,72 +3466,72 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
3260
3466
|
*
|
|
3261
3467
|
* File id -> file download scope
|
|
3262
3468
|
*/
|
|
3263
|
-
fileDownloadScopesByFileId:
|
|
3469
|
+
fileDownloadScopesByFileId: z89.record(FigmaFileDownloadScope),
|
|
3264
3470
|
/**
|
|
3265
3471
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
3266
3472
|
* imported again.
|
|
3267
3473
|
*
|
|
3268
3474
|
* Source id -> import metadata
|
|
3269
3475
|
*/
|
|
3270
|
-
changedImportedSourceDataBySourceId:
|
|
3476
|
+
changedImportedSourceDataBySourceId: z89.record(ChangedImportedFigmaSourceData)
|
|
3271
3477
|
});
|
|
3272
3478
|
|
|
3273
3479
|
// src/dsm/import/support/import-model-collections.ts
|
|
3274
|
-
import { z as
|
|
3480
|
+
import { z as z97 } from "zod";
|
|
3275
3481
|
|
|
3276
3482
|
// src/dsm/import/component.ts
|
|
3277
|
-
import { z as
|
|
3483
|
+
import { z as z92 } from "zod";
|
|
3278
3484
|
|
|
3279
3485
|
// src/dsm/import/base.ts
|
|
3280
|
-
import { z as
|
|
3281
|
-
var ImportModelBase =
|
|
3282
|
-
id:
|
|
3486
|
+
import { z as z90 } from "zod";
|
|
3487
|
+
var ImportModelBase = z90.object({
|
|
3488
|
+
id: z90.string(),
|
|
3283
3489
|
meta: ObjectMeta,
|
|
3284
3490
|
origin: DesignElementOrigin,
|
|
3285
|
-
brandPersistentId:
|
|
3286
|
-
sortOrder:
|
|
3491
|
+
brandPersistentId: z90.string(),
|
|
3492
|
+
sortOrder: z90.number()
|
|
3287
3493
|
});
|
|
3288
3494
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
3289
3495
|
brandPersistentId: true,
|
|
3290
3496
|
origin: true,
|
|
3291
3497
|
sortOrder: true
|
|
3292
3498
|
}).extend({
|
|
3293
|
-
originId:
|
|
3294
|
-
originMetadata:
|
|
3499
|
+
originId: z90.string(),
|
|
3500
|
+
originMetadata: z90.record(z90.any())
|
|
3295
3501
|
});
|
|
3296
3502
|
|
|
3297
3503
|
// src/dsm/import/image.ts
|
|
3298
|
-
import { z as
|
|
3299
|
-
var ImageImportModelType =
|
|
3300
|
-
var ImageImportModelBase =
|
|
3504
|
+
import { z as z91 } from "zod";
|
|
3505
|
+
var ImageImportModelType = z91.enum(["Url", "FigmaRender"]);
|
|
3506
|
+
var ImageImportModelBase = z91.object({
|
|
3301
3507
|
scope: AssetScope
|
|
3302
3508
|
});
|
|
3303
3509
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
3304
|
-
type:
|
|
3305
|
-
url:
|
|
3306
|
-
originKey:
|
|
3307
|
-
extension:
|
|
3510
|
+
type: z91.literal(ImageImportModelType.enum.Url),
|
|
3511
|
+
url: z91.string(),
|
|
3512
|
+
originKey: z91.string(),
|
|
3513
|
+
extension: z91.string()
|
|
3308
3514
|
});
|
|
3309
|
-
var FigmaRenderFormat =
|
|
3515
|
+
var FigmaRenderFormat = z91.enum(["Svg", "Png", "Pdf"]);
|
|
3310
3516
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
3311
|
-
type:
|
|
3312
|
-
fileId:
|
|
3313
|
-
fileVersionId:
|
|
3314
|
-
nodeId:
|
|
3315
|
-
originKey:
|
|
3517
|
+
type: z91.literal(ImageImportModelType.enum.FigmaRender),
|
|
3518
|
+
fileId: z91.string(),
|
|
3519
|
+
fileVersionId: z91.string().optional(),
|
|
3520
|
+
nodeId: z91.string(),
|
|
3521
|
+
originKey: z91.string()
|
|
3316
3522
|
});
|
|
3317
3523
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
3318
|
-
format:
|
|
3319
|
-
scale:
|
|
3524
|
+
format: z91.literal(FigmaRenderFormat.enum.Png),
|
|
3525
|
+
scale: z91.number()
|
|
3320
3526
|
});
|
|
3321
3527
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
3322
|
-
format:
|
|
3528
|
+
format: z91.literal(FigmaRenderFormat.enum.Svg)
|
|
3323
3529
|
});
|
|
3324
|
-
var FigmaRenderImportModel =
|
|
3530
|
+
var FigmaRenderImportModel = z91.discriminatedUnion("format", [
|
|
3325
3531
|
FigmaPngRenderImportModel,
|
|
3326
3532
|
FigmaSvgRenderImportModel
|
|
3327
3533
|
]);
|
|
3328
|
-
var ImageImportModel =
|
|
3534
|
+
var ImageImportModel = z91.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
3329
3535
|
function getFigmaRenderFormatFileExtension(format) {
|
|
3330
3536
|
switch (format) {
|
|
3331
3537
|
case "Pdf":
|
|
@@ -3338,13 +3544,13 @@ function getFigmaRenderFormatFileExtension(format) {
|
|
|
3338
3544
|
}
|
|
3339
3545
|
|
|
3340
3546
|
// src/dsm/import/component.ts
|
|
3341
|
-
var FigmaComponentImportModelPart =
|
|
3547
|
+
var FigmaComponentImportModelPart = z92.object({
|
|
3342
3548
|
thumbnail: ImageImportModel,
|
|
3343
|
-
parentComponentId:
|
|
3549
|
+
parentComponentId: z92.string().optional(),
|
|
3344
3550
|
componentPropertyDefinitions: FigmaComponentPropertyMap.optional()
|
|
3345
3551
|
});
|
|
3346
3552
|
var FigmaComponentImportModel = ImportModelBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3347
|
-
isAsset:
|
|
3553
|
+
isAsset: z92.boolean(),
|
|
3348
3554
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
3349
3555
|
origin: FigmaComponentOrigin
|
|
3350
3556
|
});
|
|
@@ -3357,24 +3563,24 @@ var AssetImportModelInput = ImportModelInputBase.extend(FigmaComponentImportMode
|
|
|
3357
3563
|
});
|
|
3358
3564
|
|
|
3359
3565
|
// src/dsm/import/data-source.ts
|
|
3360
|
-
import { z as
|
|
3361
|
-
var DataSourceImportModel =
|
|
3362
|
-
id:
|
|
3363
|
-
fileName:
|
|
3364
|
-
thumbnailUrl:
|
|
3566
|
+
import { z as z93 } from "zod";
|
|
3567
|
+
var DataSourceImportModel = z93.object({
|
|
3568
|
+
id: z93.string(),
|
|
3569
|
+
fileName: z93.string().optional(),
|
|
3570
|
+
thumbnailUrl: z93.string().optional()
|
|
3365
3571
|
});
|
|
3366
3572
|
|
|
3367
3573
|
// src/dsm/import/figma-frames.ts
|
|
3368
|
-
import { z as
|
|
3574
|
+
import { z as z94 } from "zod";
|
|
3369
3575
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
3370
3576
|
png: FigmaPngRenderImportModel,
|
|
3371
3577
|
svg: FigmaSvgRenderImportModel
|
|
3372
3578
|
});
|
|
3373
3579
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
3374
|
-
children:
|
|
3580
|
+
children: z94.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
3375
3581
|
});
|
|
3376
|
-
var FigmaFileStructureImportModelPart =
|
|
3377
|
-
data:
|
|
3582
|
+
var FigmaFileStructureImportModelPart = z94.object({
|
|
3583
|
+
data: z94.object({
|
|
3378
3584
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
3379
3585
|
assetsInFile: FigmaFileStructureStatistics
|
|
3380
3586
|
})
|
|
@@ -3385,7 +3591,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
3385
3591
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
3386
3592
|
FigmaFileStructureImportModelPart.shape
|
|
3387
3593
|
).extend({
|
|
3388
|
-
fileVersionId:
|
|
3594
|
+
fileVersionId: z94.string()
|
|
3389
3595
|
});
|
|
3390
3596
|
function figmaFileStructureImportModelToMap(root) {
|
|
3391
3597
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -3399,50 +3605,50 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
3399
3605
|
}
|
|
3400
3606
|
|
|
3401
3607
|
// src/dsm/import/theme.ts
|
|
3402
|
-
import { z as
|
|
3608
|
+
import { z as z95 } from "zod";
|
|
3403
3609
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
3404
|
-
|
|
3405
|
-
id:
|
|
3610
|
+
z95.object({
|
|
3611
|
+
id: z95.string(),
|
|
3406
3612
|
meta: ObjectMeta
|
|
3407
3613
|
})
|
|
3408
3614
|
);
|
|
3409
3615
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
3410
|
-
|
|
3616
|
+
z95.object({
|
|
3411
3617
|
origin: ThemeOverrideOrigin
|
|
3412
3618
|
})
|
|
3413
3619
|
);
|
|
3414
3620
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
3415
|
-
|
|
3416
|
-
originId:
|
|
3621
|
+
z95.object({
|
|
3622
|
+
originId: z95.string(),
|
|
3417
3623
|
originMetadata: ThemeOverrideOriginPart
|
|
3418
3624
|
})
|
|
3419
3625
|
);
|
|
3420
|
-
var ThemeImportModel =
|
|
3626
|
+
var ThemeImportModel = z95.object({
|
|
3421
3627
|
meta: ObjectMeta,
|
|
3422
|
-
brandPersistentId:
|
|
3628
|
+
brandPersistentId: z95.string(),
|
|
3423
3629
|
originSource: ThemeOriginSource,
|
|
3424
|
-
overrides:
|
|
3425
|
-
sortOrder:
|
|
3630
|
+
overrides: z95.array(ThemeOverrideImportModel),
|
|
3631
|
+
sortOrder: z95.number()
|
|
3426
3632
|
});
|
|
3427
|
-
var ThemeImportModelInput =
|
|
3633
|
+
var ThemeImportModelInput = z95.object({
|
|
3428
3634
|
meta: ObjectMeta,
|
|
3429
|
-
originObjects:
|
|
3430
|
-
overrides:
|
|
3635
|
+
originObjects: z95.array(ThemeOriginObject),
|
|
3636
|
+
overrides: z95.array(ThemeOverrideImportModelInput)
|
|
3431
3637
|
});
|
|
3432
|
-
var ThemeUpdateImportModel =
|
|
3433
|
-
themePersistentId:
|
|
3434
|
-
overrides:
|
|
3638
|
+
var ThemeUpdateImportModel = z95.object({
|
|
3639
|
+
themePersistentId: z95.string(),
|
|
3640
|
+
overrides: z95.array(ThemeOverrideImportModel)
|
|
3435
3641
|
});
|
|
3436
|
-
var ThemeUpdateImportModelInput =
|
|
3437
|
-
themePersistentId:
|
|
3438
|
-
overrides:
|
|
3642
|
+
var ThemeUpdateImportModelInput = z95.object({
|
|
3643
|
+
themePersistentId: z95.string(),
|
|
3644
|
+
overrides: z95.array(ThemeOverrideImportModelInput)
|
|
3439
3645
|
});
|
|
3440
3646
|
|
|
3441
3647
|
// src/dsm/import/tokens.ts
|
|
3442
|
-
import { z as
|
|
3443
|
-
var DesignTokenImportModelPart =
|
|
3444
|
-
collection:
|
|
3445
|
-
codeSyntax:
|
|
3648
|
+
import { z as z96 } from "zod";
|
|
3649
|
+
var DesignTokenImportModelPart = z96.object({
|
|
3650
|
+
collection: z96.string().optional(),
|
|
3651
|
+
codeSyntax: z96.record(z96.coerce.string()).optional()
|
|
3446
3652
|
});
|
|
3447
3653
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
3448
3654
|
origin: DesignTokenOrigin
|
|
@@ -3460,22 +3666,22 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
3460
3666
|
}
|
|
3461
3667
|
|
|
3462
3668
|
// src/dsm/import/support/import-model-collections.ts
|
|
3463
|
-
var ImportModelInputCollection =
|
|
3669
|
+
var ImportModelInputCollection = z97.object({
|
|
3464
3670
|
source: DataSourceImportModel,
|
|
3465
|
-
tokens:
|
|
3466
|
-
components:
|
|
3467
|
-
assets:
|
|
3468
|
-
themeUpdates:
|
|
3469
|
-
themes:
|
|
3671
|
+
tokens: z97.array(DesignTokenImportModelInput).default([]),
|
|
3672
|
+
components: z97.array(FigmaComponentImportModelInput).default([]),
|
|
3673
|
+
assets: z97.array(AssetImportModelInput).default([]),
|
|
3674
|
+
themeUpdates: z97.array(ThemeUpdateImportModelInput).default([]),
|
|
3675
|
+
themes: z97.array(ThemeImportModelInput).default([]),
|
|
3470
3676
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
3471
3677
|
});
|
|
3472
|
-
var ImportModelCollection =
|
|
3473
|
-
sources:
|
|
3474
|
-
tokens:
|
|
3475
|
-
components:
|
|
3476
|
-
themeUpdates:
|
|
3477
|
-
themes:
|
|
3478
|
-
figmaFileStructures:
|
|
3678
|
+
var ImportModelCollection = z97.object({
|
|
3679
|
+
sources: z97.array(DataSourceImportModel),
|
|
3680
|
+
tokens: z97.array(DesignTokenImportModel).default([]),
|
|
3681
|
+
components: z97.array(FigmaComponentImportModel).default([]),
|
|
3682
|
+
themeUpdates: z97.array(ThemeUpdateImportModel).default([]),
|
|
3683
|
+
themes: z97.array(ThemeImportModel).default([]),
|
|
3684
|
+
figmaFileStructures: z97.array(FigmaFileStructureImportModel)
|
|
3479
3685
|
});
|
|
3480
3686
|
function addImportModelCollections(lhs, rhs) {
|
|
3481
3687
|
return {
|
|
@@ -3489,238 +3695,40 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
3489
3695
|
}
|
|
3490
3696
|
|
|
3491
3697
|
// src/dsm/components/asset-rendering.ts
|
|
3492
|
-
var AssetRenderConfiguration =
|
|
3493
|
-
prefix:
|
|
3494
|
-
suffix:
|
|
3495
|
-
scale:
|
|
3698
|
+
var AssetRenderConfiguration = z98.object({
|
|
3699
|
+
prefix: z98.string().optional(),
|
|
3700
|
+
suffix: z98.string().optional(),
|
|
3701
|
+
scale: z98.number(),
|
|
3496
3702
|
format: FigmaRenderFormat
|
|
3497
3703
|
});
|
|
3498
|
-
var RenderedAssetFile =
|
|
3499
|
-
assetPersistentId:
|
|
3500
|
-
assetName:
|
|
3501
|
-
renderedImageFileName:
|
|
3502
|
-
renderedImageUrl:
|
|
3704
|
+
var RenderedAssetFile = z98.object({
|
|
3705
|
+
assetPersistentId: z98.string(),
|
|
3706
|
+
assetName: z98.string(),
|
|
3707
|
+
renderedImageFileName: z98.string(),
|
|
3708
|
+
renderedImageUrl: z98.string(),
|
|
3503
3709
|
settings: AssetRenderConfiguration
|
|
3504
3710
|
});
|
|
3505
3711
|
|
|
3506
3712
|
// src/dsm/documentation/approvals/approval-state.ts
|
|
3507
|
-
import { z as
|
|
3508
|
-
var DocumentationPageApprovalState =
|
|
3713
|
+
import { z as z99 } from "zod";
|
|
3714
|
+
var DocumentationPageApprovalState = z99.enum(["ReadyForReview", "ChangesRequested", "Approved"]);
|
|
3509
3715
|
|
|
3510
3716
|
// src/dsm/documentation/approvals/approval.ts
|
|
3511
|
-
import { z as z97 } from "zod";
|
|
3512
|
-
var DocumentationPageApproval = z97.object({
|
|
3513
|
-
id: z97.string(),
|
|
3514
|
-
approvalState: DocumentationPageApprovalState,
|
|
3515
|
-
persistentId: z97.string(),
|
|
3516
|
-
pageId: z97.string(),
|
|
3517
|
-
pagePersistentId: z97.string(),
|
|
3518
|
-
updatedByUserId: z97.string(),
|
|
3519
|
-
designSystemVersionId: z97.string(),
|
|
3520
|
-
updatedAt: z97.coerce.date(),
|
|
3521
|
-
createdAt: z97.coerce.date()
|
|
3522
|
-
});
|
|
3523
|
-
|
|
3524
|
-
// src/dsm/documentation/block-definitions/aux.ts
|
|
3525
|
-
import { z as z98 } from "zod";
|
|
3526
|
-
var PageBlockDefinitionAppearance = z98.object({
|
|
3527
|
-
isBordered: z98.boolean().optional(),
|
|
3528
|
-
hasBackground: z98.boolean().optional(),
|
|
3529
|
-
isEditorPresentationDifferent: z98.boolean().optional(),
|
|
3530
|
-
showBlockHeaderInEditor: z98.boolean().optional()
|
|
3531
|
-
});
|
|
3532
|
-
|
|
3533
|
-
// src/dsm/documentation/block-definitions/definition.ts
|
|
3534
|
-
import { z as z101 } from "zod";
|
|
3535
|
-
|
|
3536
|
-
// src/dsm/documentation/block-definitions/item.ts
|
|
3537
3717
|
import { z as z100 } from "zod";
|
|
3538
|
-
|
|
3539
|
-
// src/dsm/documentation/block-definitions/variant.ts
|
|
3540
|
-
import { z as z99 } from "zod";
|
|
3541
|
-
var PageBlockDefinitionLayoutType = z99.enum(["Column", "Row"]);
|
|
3542
|
-
var PageBlockDefinitionLayoutGap = z99.enum(["Small", "Medium", "Large", "None"]);
|
|
3543
|
-
var PageBlockDefinitionLayoutAlign = z99.enum(["Start", "Center", "End"]);
|
|
3544
|
-
var PageBlockDefinitionLayoutResizing = z99.enum(["Fill", "Hug"]);
|
|
3545
|
-
var PageBlockDefinitionLayoutBase = z99.object({
|
|
3546
|
-
type: PageBlockDefinitionLayoutType,
|
|
3547
|
-
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
3548
|
-
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
3549
|
-
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
3550
|
-
});
|
|
3551
|
-
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
3552
|
-
children: z99.lazy(() => z99.array(PageBlockDefinitionLayout.or(z99.string())))
|
|
3553
|
-
});
|
|
3554
|
-
var PageBlockDefinitionVariant = z99.object({
|
|
3555
|
-
id: z99.string(),
|
|
3556
|
-
name: z99.string(),
|
|
3557
|
-
image: z99.string().optional(),
|
|
3558
|
-
description: z99.string().optional(),
|
|
3559
|
-
documentationLink: z99.string().optional(),
|
|
3560
|
-
layout: PageBlockDefinitionLayout,
|
|
3561
|
-
maxColumns: z99.number().optional(),
|
|
3562
|
-
defaultColumns: z99.number().optional(),
|
|
3563
|
-
appearance: PageBlockDefinitionAppearance.optional()
|
|
3564
|
-
});
|
|
3565
|
-
|
|
3566
|
-
// src/dsm/documentation/block-definitions/item.ts
|
|
3567
|
-
var PageBlockDefinitionPropertyType = z100.enum([
|
|
3568
|
-
"RichText",
|
|
3569
|
-
"MultiRichText",
|
|
3570
|
-
"RichTextEditor",
|
|
3571
|
-
"Text",
|
|
3572
|
-
"Boolean",
|
|
3573
|
-
"Number",
|
|
3574
|
-
"SingleSelect",
|
|
3575
|
-
"MultiSelect",
|
|
3576
|
-
"Image",
|
|
3577
|
-
"Token",
|
|
3578
|
-
"TokenType",
|
|
3579
|
-
"TokenProperty",
|
|
3580
|
-
"Component",
|
|
3581
|
-
"ComponentProperty",
|
|
3582
|
-
"Asset",
|
|
3583
|
-
"AssetProperty",
|
|
3584
|
-
"FigmaNode",
|
|
3585
|
-
"EmbedURL",
|
|
3586
|
-
"URL",
|
|
3587
|
-
"Markdown",
|
|
3588
|
-
"Code",
|
|
3589
|
-
"CodeSandbox",
|
|
3590
|
-
"Table",
|
|
3591
|
-
"Divider",
|
|
3592
|
-
"Storybook",
|
|
3593
|
-
"Color",
|
|
3594
|
-
"FigmaComponent"
|
|
3595
|
-
]);
|
|
3596
|
-
var PageBlockDefinitionRichTextPropertyStyle = z100.enum([
|
|
3597
|
-
"Title1",
|
|
3598
|
-
"Title2",
|
|
3599
|
-
"Title3",
|
|
3600
|
-
"Title4",
|
|
3601
|
-
"Title5",
|
|
3602
|
-
"Quote",
|
|
3603
|
-
"Callout",
|
|
3604
|
-
"Default"
|
|
3605
|
-
]);
|
|
3606
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle = z100.enum(["OL", "UL", "Default"]);
|
|
3607
|
-
var PageBlockDefinitionRichTextEditorPropertyStyle = z100.enum([
|
|
3608
|
-
"OL",
|
|
3609
|
-
"UL",
|
|
3610
|
-
"Bold",
|
|
3611
|
-
"Italic",
|
|
3612
|
-
"Link",
|
|
3613
|
-
"Strikethrough",
|
|
3614
|
-
"InlineCode"
|
|
3615
|
-
]);
|
|
3616
|
-
var PageBlockDefinitionTextPropertyStyle = z100.enum([
|
|
3617
|
-
"Title1",
|
|
3618
|
-
"Title2",
|
|
3619
|
-
"Title3",
|
|
3620
|
-
"Title4",
|
|
3621
|
-
"Title5",
|
|
3622
|
-
"Default",
|
|
3623
|
-
"DefaultBold",
|
|
3624
|
-
"DefaultSemibold",
|
|
3625
|
-
"Small",
|
|
3626
|
-
"SmallBold",
|
|
3627
|
-
"SmallSemibold",
|
|
3628
|
-
"Custom"
|
|
3629
|
-
]);
|
|
3630
|
-
var PageBlockDefinitionTextPropertyColor = z100.enum(["Neutral", "NeutralFaded"]);
|
|
3631
|
-
var PageBlockDefinitionBooleanPropertyStyle = z100.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
3632
|
-
var PageBlockDefinitionSingleSelectPropertyStyle = z100.enum([
|
|
3633
|
-
"SegmentedControl",
|
|
3634
|
-
"ToggleButton",
|
|
3635
|
-
"Select",
|
|
3636
|
-
"Checkbox"
|
|
3637
|
-
]);
|
|
3638
|
-
var PageBlockDefinitionSingleSelectPropertyColor = z100.enum([
|
|
3639
|
-
"Green",
|
|
3640
|
-
"Red",
|
|
3641
|
-
"Yellow",
|
|
3642
|
-
"Blue",
|
|
3643
|
-
"Purple",
|
|
3644
|
-
"Orange",
|
|
3645
|
-
"Pink",
|
|
3646
|
-
"Teal",
|
|
3647
|
-
"Brown",
|
|
3648
|
-
"Grey",
|
|
3649
|
-
"LightGrey",
|
|
3650
|
-
"Cyan",
|
|
3651
|
-
"Fuchsia"
|
|
3652
|
-
]);
|
|
3653
|
-
var IconSet = z100.enum(["CheckCircle", "CrossCircle", "Alert"]);
|
|
3654
|
-
var PageBlockDefinitionMultiSelectPropertyStyle = z100.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
3655
|
-
var PageBlockDefinitionImageAspectRatio = z100.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
3656
|
-
var PageBlockDefinitionImageWidth = z100.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
3657
|
-
var PageBlockDefinitionSelectChoice = z100.object({
|
|
3658
|
-
value: z100.string(),
|
|
3659
|
-
name: z100.string(),
|
|
3660
|
-
icon: IconSet.optional(),
|
|
3661
|
-
customIconUrl: z100.string().optional(),
|
|
3662
|
-
color: PageBlockDefinitionSingleSelectPropertyColor.optional()
|
|
3663
|
-
});
|
|
3664
|
-
var PageBlockDefinitionUntypedPropertyOptions = z100.record(z100.any());
|
|
3665
|
-
var PageBlockDefinitionRichTextOptions = z100.object({
|
|
3666
|
-
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
3667
|
-
});
|
|
3668
|
-
var PageBlockDefinitionMutiRichTextOptions = z100.object({
|
|
3669
|
-
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
3670
|
-
});
|
|
3671
|
-
var PageBlockDefinitionRichTextEditorOptions = z100.object({
|
|
3672
|
-
placeholder: z100.string().optional(),
|
|
3673
|
-
allowedInlineStyles: z100.array(PageBlockDefinitionRichTextEditorPropertyStyle).optional()
|
|
3674
|
-
});
|
|
3675
|
-
var PageBlockDefinitionTextOptions = z100.object({
|
|
3676
|
-
placeholder: z100.string().optional(),
|
|
3677
|
-
defaultValue: z100.string().optional(),
|
|
3678
|
-
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
3679
|
-
color: PageBlockDefinitionTextPropertyColor.optional(),
|
|
3680
|
-
allowLineBreaks: z100.boolean().optional()
|
|
3681
|
-
});
|
|
3682
|
-
var PageBlockDefinitionSelectOptions = z100.object({
|
|
3683
|
-
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
3684
|
-
defaultChoice: z100.string(),
|
|
3685
|
-
choices: z100.array(PageBlockDefinitionSelectChoice)
|
|
3686
|
-
});
|
|
3687
|
-
var PageBlockDefinitionImageOptions = z100.object({
|
|
3688
|
-
width: PageBlockDefinitionImageWidth.optional(),
|
|
3689
|
-
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
3690
|
-
allowCaption: z100.boolean().optional(),
|
|
3691
|
-
recommendation: z100.string().optional()
|
|
3692
|
-
});
|
|
3693
|
-
var PageBlockDefinitionBooleanOptions = z100.object({
|
|
3694
|
-
defaultvalue: z100.boolean().optional(),
|
|
3695
|
-
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
3696
|
-
});
|
|
3697
|
-
var PageBlockDefinitionNumberOptions = z100.object({
|
|
3698
|
-
defaultValue: z100.number(),
|
|
3699
|
-
min: z100.number().optional(),
|
|
3700
|
-
max: z100.number().optional(),
|
|
3701
|
-
step: z100.number().optional(),
|
|
3702
|
-
placeholder: z100.string().optional()
|
|
3703
|
-
});
|
|
3704
|
-
var PageBlockDefinitionComponentOptions = z100.object({
|
|
3705
|
-
renderLayoutAs: z100.enum(["List", "Table"]).optional(),
|
|
3706
|
-
allowPropertySelection: z100.boolean().optional()
|
|
3707
|
-
});
|
|
3708
|
-
var PageBlockDefinitionProperty = z100.object({
|
|
3718
|
+
var DocumentationPageApproval = z100.object({
|
|
3709
3719
|
id: z100.string(),
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
appearance: PageBlockDefinitionAppearance.optional(),
|
|
3719
|
-
variants: z100.array(PageBlockDefinitionVariant),
|
|
3720
|
-
defaultVariantKey: z100.string()
|
|
3720
|
+
approvalState: DocumentationPageApprovalState,
|
|
3721
|
+
persistentId: z100.string(),
|
|
3722
|
+
pageId: z100.string(),
|
|
3723
|
+
pagePersistentId: z100.string(),
|
|
3724
|
+
updatedByUserId: z100.string(),
|
|
3725
|
+
designSystemVersionId: z100.string(),
|
|
3726
|
+
updatedAt: z100.coerce.date(),
|
|
3727
|
+
createdAt: z100.coerce.date()
|
|
3721
3728
|
});
|
|
3722
3729
|
|
|
3723
3730
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
3731
|
+
import { z as z101 } from "zod";
|
|
3724
3732
|
var PageBlockCategory = z101.enum([
|
|
3725
3733
|
"Text",
|
|
3726
3734
|
"Layout",
|
|
@@ -5554,6 +5562,9 @@ export {
|
|
|
5554
5562
|
PageBlockItemMultiRichTextValue,
|
|
5555
5563
|
PageBlockItemMultiSelectValue,
|
|
5556
5564
|
PageBlockItemNumberValue,
|
|
5565
|
+
PageBlockItemRichTextEditorListNode,
|
|
5566
|
+
PageBlockItemRichTextEditorNode,
|
|
5567
|
+
PageBlockItemRichTextEditorParagraphNode,
|
|
5557
5568
|
PageBlockItemRichTextEditorValue,
|
|
5558
5569
|
PageBlockItemRichTextValue,
|
|
5559
5570
|
PageBlockItemSandboxValue,
|
|
@@ -5561,7 +5572,6 @@ export {
|
|
|
5561
5572
|
PageBlockItemStorybookValue,
|
|
5562
5573
|
PageBlockItemTableCell,
|
|
5563
5574
|
PageBlockItemTableImageNode,
|
|
5564
|
-
PageBlockItemTableMultiRichTextNode,
|
|
5565
5575
|
PageBlockItemTableNode,
|
|
5566
5576
|
PageBlockItemTableRichTextNode,
|
|
5567
5577
|
PageBlockItemTableRow,
|