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