@supernova-studio/model 0.46.8 → 0.46.10
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 +882 -877
- package/dist/index.d.ts +882 -877
- package/dist/index.js +105 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +222 -158
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/theme.ts +4 -3
- package/src/utils/index.ts +1 -0
- package/src/utils/naming.ts +73 -0
package/dist/index.mjs
CHANGED
|
@@ -1981,7 +1981,8 @@ var ThemeOrigin = z85.object({
|
|
|
1981
1981
|
});
|
|
1982
1982
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1983
1983
|
origin: ThemeOrigin.optional(),
|
|
1984
|
-
overrides: z85.array(ThemeOverride)
|
|
1984
|
+
overrides: z85.array(ThemeOverride),
|
|
1985
|
+
codeName: z85.string()
|
|
1985
1986
|
});
|
|
1986
1987
|
|
|
1987
1988
|
// src/dsm/elements/utils.ts
|
|
@@ -3075,80 +3076,54 @@ var VersionCreationJob = z126.object({
|
|
|
3075
3076
|
errorMessage: nullishToOptional(z126.string())
|
|
3076
3077
|
});
|
|
3077
3078
|
|
|
3078
|
-
// src/export/export-runner/export-context.ts
|
|
3079
|
-
import { z as z127 } from "zod";
|
|
3080
|
-
var ExportJobDocumentationContext = z127.object({
|
|
3081
|
-
isSingleVersionDocs: z127.boolean(),
|
|
3082
|
-
versionSlug: z127.string(),
|
|
3083
|
-
environment: PublishedDocEnvironment
|
|
3084
|
-
});
|
|
3085
|
-
var ExportJobContext = z127.object({
|
|
3086
|
-
apiUrl: z127.string(),
|
|
3087
|
-
accessToken: z127.string(),
|
|
3088
|
-
designSystemId: z127.string(),
|
|
3089
|
-
designSystemVersionId: z127.string(),
|
|
3090
|
-
brandId: z127.string().optional(),
|
|
3091
|
-
exporterPackageUrl: z127.string(),
|
|
3092
|
-
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3093
|
-
documentation: ExportJobDocumentationContext.optional()
|
|
3094
|
-
});
|
|
3095
|
-
|
|
3096
|
-
// src/export/export-runner/exporter-payload.ts
|
|
3097
|
-
import { z as z128 } from "zod";
|
|
3098
|
-
var ExporterFunctionPayload = z128.object({
|
|
3099
|
-
exportJobId: z128.string(),
|
|
3100
|
-
exportContextId: z128.string(),
|
|
3101
|
-
designSystemId: z128.string()
|
|
3102
|
-
});
|
|
3103
|
-
|
|
3104
3079
|
// src/export/export-destinations.ts
|
|
3105
|
-
import { z as
|
|
3080
|
+
import { z as z127 } from "zod";
|
|
3106
3081
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
3107
3082
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
3108
|
-
var ExporterDestinationDocs =
|
|
3083
|
+
var ExporterDestinationDocs = z127.object({
|
|
3109
3084
|
environment: PublishedDocEnvironment
|
|
3110
3085
|
});
|
|
3111
|
-
var ExporterDestinationS3 =
|
|
3112
|
-
var ExporterDestinationGithub =
|
|
3113
|
-
connectionId:
|
|
3114
|
-
branch:
|
|
3115
|
-
relativePath:
|
|
3086
|
+
var ExporterDestinationS3 = z127.object({});
|
|
3087
|
+
var ExporterDestinationGithub = z127.object({
|
|
3088
|
+
connectionId: z127.string(),
|
|
3089
|
+
branch: z127.string(),
|
|
3090
|
+
relativePath: z127.string()
|
|
3116
3091
|
// // +
|
|
3117
3092
|
// userId: z.coerce.string(),
|
|
3118
3093
|
});
|
|
3119
|
-
var ExporterDestinationAzure =
|
|
3120
|
-
connectionId:
|
|
3121
|
-
organizationId:
|
|
3122
|
-
projectId:
|
|
3123
|
-
repositoryId:
|
|
3124
|
-
branch:
|
|
3125
|
-
relativePath:
|
|
3094
|
+
var ExporterDestinationAzure = z127.object({
|
|
3095
|
+
connectionId: z127.string(),
|
|
3096
|
+
organizationId: z127.string(),
|
|
3097
|
+
projectId: z127.string(),
|
|
3098
|
+
repositoryId: z127.string(),
|
|
3099
|
+
branch: z127.string(),
|
|
3100
|
+
relativePath: z127.string()
|
|
3126
3101
|
// // +
|
|
3127
3102
|
// userId: z.coerce.string(),
|
|
3128
3103
|
// url: z.string(),
|
|
3129
3104
|
});
|
|
3130
|
-
var ExporterDestinationGitlab =
|
|
3131
|
-
connectionId:
|
|
3132
|
-
projectId:
|
|
3133
|
-
branch:
|
|
3134
|
-
relativePath:
|
|
3105
|
+
var ExporterDestinationGitlab = z127.object({
|
|
3106
|
+
connectionId: z127.string(),
|
|
3107
|
+
projectId: z127.string(),
|
|
3108
|
+
branch: z127.string(),
|
|
3109
|
+
relativePath: z127.string()
|
|
3135
3110
|
// // +
|
|
3136
3111
|
// userId: z.coerce.string(),
|
|
3137
3112
|
// url: z.string(),
|
|
3138
3113
|
});
|
|
3139
|
-
var ExporterDestinationBitbucket =
|
|
3140
|
-
connectionId:
|
|
3141
|
-
workspaceSlug:
|
|
3142
|
-
projectKey:
|
|
3143
|
-
repoSlug:
|
|
3144
|
-
branch:
|
|
3145
|
-
relativePath:
|
|
3114
|
+
var ExporterDestinationBitbucket = z127.object({
|
|
3115
|
+
connectionId: z127.string(),
|
|
3116
|
+
workspaceSlug: z127.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3117
|
+
projectKey: z127.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3118
|
+
repoSlug: z127.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3119
|
+
branch: z127.string(),
|
|
3120
|
+
relativePath: z127.string()
|
|
3146
3121
|
// // +
|
|
3147
3122
|
// userId: z.string(),
|
|
3148
3123
|
// url: z.string(),
|
|
3149
3124
|
});
|
|
3150
|
-
var ExportDestinationsMap =
|
|
3151
|
-
webhookUrl:
|
|
3125
|
+
var ExportDestinationsMap = z127.object({
|
|
3126
|
+
webhookUrl: z127.string().optional(),
|
|
3152
3127
|
destinationSnDocs: ExporterDestinationDocs.optional(),
|
|
3153
3128
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3154
3129
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3158,30 +3133,30 @@ var ExportDestinationsMap = z129.object({
|
|
|
3158
3133
|
});
|
|
3159
3134
|
|
|
3160
3135
|
// src/export/export-jobs.ts
|
|
3161
|
-
import { z as
|
|
3162
|
-
var ExportJobDestinationType =
|
|
3163
|
-
var ExportJobStatus =
|
|
3164
|
-
var ExportJobLogEntryType =
|
|
3165
|
-
var ExportJobLogEntry =
|
|
3166
|
-
id:
|
|
3167
|
-
time:
|
|
3136
|
+
import { z as z128 } from "zod";
|
|
3137
|
+
var ExportJobDestinationType = z128.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
3138
|
+
var ExportJobStatus = z128.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3139
|
+
var ExportJobLogEntryType = z128.enum(["success", "info", "warning", "error", "user"]);
|
|
3140
|
+
var ExportJobLogEntry = z128.object({
|
|
3141
|
+
id: z128.string().optional(),
|
|
3142
|
+
time: z128.coerce.date(),
|
|
3168
3143
|
type: ExportJobLogEntryType,
|
|
3169
|
-
message:
|
|
3144
|
+
message: z128.string()
|
|
3170
3145
|
});
|
|
3171
|
-
var ExportJobPullRequestDestinationResult =
|
|
3172
|
-
pullRequestUrl:
|
|
3146
|
+
var ExportJobPullRequestDestinationResult = z128.object({
|
|
3147
|
+
pullRequestUrl: z128.string()
|
|
3173
3148
|
});
|
|
3174
|
-
var ExportJobS3DestinationResult =
|
|
3175
|
-
bucket:
|
|
3176
|
-
urlPrefix:
|
|
3177
|
-
path:
|
|
3178
|
-
files:
|
|
3149
|
+
var ExportJobS3DestinationResult = z128.object({
|
|
3150
|
+
bucket: z128.string(),
|
|
3151
|
+
urlPrefix: z128.string().optional(),
|
|
3152
|
+
path: z128.string(),
|
|
3153
|
+
files: z128.array(z128.string())
|
|
3179
3154
|
});
|
|
3180
|
-
var ExportJobDocsDestinationResult =
|
|
3181
|
-
url:
|
|
3155
|
+
var ExportJobDocsDestinationResult = z128.object({
|
|
3156
|
+
url: z128.string()
|
|
3182
3157
|
});
|
|
3183
|
-
var ExportJobResult =
|
|
3184
|
-
error:
|
|
3158
|
+
var ExportJobResult = z128.object({
|
|
3159
|
+
error: z128.string().optional(),
|
|
3185
3160
|
s3: ExportJobS3DestinationResult.optional(),
|
|
3186
3161
|
github: ExportJobPullRequestDestinationResult.optional(),
|
|
3187
3162
|
azure: ExportJobPullRequestDestinationResult.optional(),
|
|
@@ -3189,21 +3164,21 @@ var ExportJobResult = z130.object({
|
|
|
3189
3164
|
bitbucket: ExportJobPullRequestDestinationResult.optional(),
|
|
3190
3165
|
sndocs: ExportJobDocsDestinationResult.optional()
|
|
3191
3166
|
});
|
|
3192
|
-
var ExportJob =
|
|
3193
|
-
id:
|
|
3194
|
-
createdAt:
|
|
3195
|
-
finishedAt:
|
|
3196
|
-
designSystemId:
|
|
3197
|
-
designSystemVersionId:
|
|
3198
|
-
workspaceId:
|
|
3199
|
-
scheduleId:
|
|
3200
|
-
exporterId:
|
|
3201
|
-
brandId:
|
|
3202
|
-
themeId:
|
|
3203
|
-
estimatedExecutionTime:
|
|
3167
|
+
var ExportJob = z128.object({
|
|
3168
|
+
id: z128.string(),
|
|
3169
|
+
createdAt: z128.date(),
|
|
3170
|
+
finishedAt: z128.date().optional(),
|
|
3171
|
+
designSystemId: z128.string(),
|
|
3172
|
+
designSystemVersionId: z128.string(),
|
|
3173
|
+
workspaceId: z128.string(),
|
|
3174
|
+
scheduleId: z128.string().nullish(),
|
|
3175
|
+
exporterId: z128.string(),
|
|
3176
|
+
brandId: z128.string().optional(),
|
|
3177
|
+
themeId: z128.string().optional(),
|
|
3178
|
+
estimatedExecutionTime: z128.number().optional(),
|
|
3204
3179
|
status: ExportJobStatus,
|
|
3205
3180
|
result: ExportJobResult.optional(),
|
|
3206
|
-
createdByUserId:
|
|
3181
|
+
createdByUserId: z128.string().optional(),
|
|
3207
3182
|
// Destinations
|
|
3208
3183
|
...ExportDestinationsMap.shape
|
|
3209
3184
|
});
|
|
@@ -3218,10 +3193,36 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
3218
3193
|
themeId: true,
|
|
3219
3194
|
brandId: true
|
|
3220
3195
|
}).extend({
|
|
3221
|
-
destinations:
|
|
3196
|
+
destinations: z128.array(ExportJobDestinationType),
|
|
3222
3197
|
docsEnvironment: PublishedDocEnvironment
|
|
3223
3198
|
}).partial();
|
|
3224
3199
|
|
|
3200
|
+
// src/export/export-runner/export-context.ts
|
|
3201
|
+
import { z as z129 } from "zod";
|
|
3202
|
+
var ExportJobDocumentationContext = z129.object({
|
|
3203
|
+
isSingleVersionDocs: z129.boolean(),
|
|
3204
|
+
versionSlug: z129.string(),
|
|
3205
|
+
environment: PublishedDocEnvironment
|
|
3206
|
+
});
|
|
3207
|
+
var ExportJobContext = z129.object({
|
|
3208
|
+
apiUrl: z129.string(),
|
|
3209
|
+
accessToken: z129.string(),
|
|
3210
|
+
designSystemId: z129.string(),
|
|
3211
|
+
designSystemVersionId: z129.string(),
|
|
3212
|
+
brandId: z129.string().optional(),
|
|
3213
|
+
exporterPackageUrl: z129.string(),
|
|
3214
|
+
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3215
|
+
documentation: ExportJobDocumentationContext.optional()
|
|
3216
|
+
});
|
|
3217
|
+
|
|
3218
|
+
// src/export/export-runner/exporter-payload.ts
|
|
3219
|
+
import { z as z130 } from "zod";
|
|
3220
|
+
var ExporterFunctionPayload = z130.object({
|
|
3221
|
+
exportJobId: z130.string(),
|
|
3222
|
+
exportContextId: z130.string(),
|
|
3223
|
+
designSystemId: z130.string()
|
|
3224
|
+
});
|
|
3225
|
+
|
|
3225
3226
|
// src/export/export-schedule.ts
|
|
3226
3227
|
import { z as z131 } from "zod";
|
|
3227
3228
|
var ExporterScheduleEventType = z131.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
@@ -3239,24 +3240,11 @@ var ExporterSchedule = z131.object({
|
|
|
3239
3240
|
...ExportDestinationsMap.shape
|
|
3240
3241
|
});
|
|
3241
3242
|
|
|
3242
|
-
// src/export/exporter-workspace-membership-role.ts
|
|
3243
|
-
import { z as z132 } from "zod";
|
|
3244
|
-
var ExporterWorkspaceMembershipRole = z132.enum(["Owner", "OwnerArchived", "User"]);
|
|
3245
|
-
|
|
3246
|
-
// src/export/exporter-workspace-membership.ts
|
|
3247
|
-
import { z as z133 } from "zod";
|
|
3248
|
-
var ExporterWorkspaceMembership = z133.object({
|
|
3249
|
-
id: z133.string(),
|
|
3250
|
-
workspaceId: z133.string(),
|
|
3251
|
-
exporterId: z133.string(),
|
|
3252
|
-
role: ExporterWorkspaceMembershipRole
|
|
3253
|
-
});
|
|
3254
|
-
|
|
3255
3243
|
// src/export/exporter.ts
|
|
3256
|
-
import { z as
|
|
3244
|
+
import { z as z134 } from "zod";
|
|
3257
3245
|
|
|
3258
3246
|
// src/export/git-providers.ts
|
|
3259
|
-
import { z as
|
|
3247
|
+
import { z as z132 } from "zod";
|
|
3260
3248
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
3261
3249
|
GitProviderNames2["Azure"] = "azure";
|
|
3262
3250
|
GitProviderNames2["Github"] = "github";
|
|
@@ -3264,11 +3252,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
3264
3252
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
3265
3253
|
return GitProviderNames2;
|
|
3266
3254
|
})(GitProviderNames || {});
|
|
3267
|
-
var GitProvider =
|
|
3255
|
+
var GitProvider = z132.nativeEnum(GitProviderNames);
|
|
3268
3256
|
|
|
3269
3257
|
// src/export/pulsar.ts
|
|
3270
|
-
import { z as
|
|
3271
|
-
var PulsarPropertyType =
|
|
3258
|
+
import { z as z133 } from "zod";
|
|
3259
|
+
var PulsarPropertyType = z133.enum([
|
|
3272
3260
|
"string",
|
|
3273
3261
|
"number",
|
|
3274
3262
|
"boolean",
|
|
@@ -3281,72 +3269,87 @@ var PulsarPropertyType = z135.enum([
|
|
|
3281
3269
|
"tokenProperties",
|
|
3282
3270
|
"tokenType"
|
|
3283
3271
|
]);
|
|
3284
|
-
var PulsarBaseProperty =
|
|
3285
|
-
label:
|
|
3286
|
-
key:
|
|
3287
|
-
description:
|
|
3272
|
+
var PulsarBaseProperty = z133.object({
|
|
3273
|
+
label: z133.string(),
|
|
3274
|
+
key: z133.string(),
|
|
3275
|
+
description: z133.string().nullish(),
|
|
3288
3276
|
type: PulsarPropertyType,
|
|
3289
|
-
values:
|
|
3290
|
-
default:
|
|
3277
|
+
values: z133.array(z133.string()).nullish(),
|
|
3278
|
+
default: z133.union([z133.string(), z133.boolean(), z133.number()]).nullish(),
|
|
3291
3279
|
// PulsarPropertyValueType //is optional?
|
|
3292
|
-
inputType:
|
|
3280
|
+
inputType: z133.enum(["code", "plain"]).optional(),
|
|
3293
3281
|
//is optional?
|
|
3294
|
-
isMultiline:
|
|
3282
|
+
isMultiline: z133.boolean().nullish()
|
|
3295
3283
|
});
|
|
3296
3284
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
3297
|
-
category:
|
|
3285
|
+
category: z133.string()
|
|
3298
3286
|
});
|
|
3299
|
-
var PulsarContributionVariant =
|
|
3300
|
-
key:
|
|
3301
|
-
name:
|
|
3302
|
-
isDefault: nullishToOptional(
|
|
3303
|
-
description: nullishToOptional(
|
|
3304
|
-
thumbnailURL: nullishToOptional(
|
|
3287
|
+
var PulsarContributionVariant = z133.object({
|
|
3288
|
+
key: z133.string(),
|
|
3289
|
+
name: z133.string(),
|
|
3290
|
+
isDefault: nullishToOptional(z133.boolean()),
|
|
3291
|
+
description: nullishToOptional(z133.string()),
|
|
3292
|
+
thumbnailURL: nullishToOptional(z133.string())
|
|
3305
3293
|
});
|
|
3306
|
-
var PulsarCustomBlock =
|
|
3307
|
-
title: nullishToOptional(
|
|
3308
|
-
key:
|
|
3309
|
-
category: nullishToOptional(
|
|
3310
|
-
description: nullishToOptional(
|
|
3311
|
-
iconURL: nullishToOptional(
|
|
3312
|
-
mode: nullishToOptional(
|
|
3313
|
-
properties: nullishToOptional(
|
|
3294
|
+
var PulsarCustomBlock = z133.object({
|
|
3295
|
+
title: nullishToOptional(z133.string()),
|
|
3296
|
+
key: z133.string(),
|
|
3297
|
+
category: nullishToOptional(z133.string()),
|
|
3298
|
+
description: nullishToOptional(z133.string()),
|
|
3299
|
+
iconURL: nullishToOptional(z133.string()),
|
|
3300
|
+
mode: nullishToOptional(z133.enum(["array", "block"])),
|
|
3301
|
+
properties: nullishToOptional(z133.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
3314
3302
|
});
|
|
3315
3303
|
|
|
3316
3304
|
// src/export/exporter.ts
|
|
3317
|
-
var ExporterType =
|
|
3318
|
-
var ExporterSource =
|
|
3319
|
-
var ExporterTag =
|
|
3320
|
-
var ExporterDetails =
|
|
3321
|
-
description:
|
|
3322
|
-
version:
|
|
3323
|
-
routingVersion: nullishToOptional(
|
|
3324
|
-
author: nullishToOptional(
|
|
3325
|
-
organization: nullishToOptional(
|
|
3326
|
-
homepage: nullishToOptional(
|
|
3327
|
-
readme: nullishToOptional(
|
|
3328
|
-
tags: nullishToOptional(
|
|
3329
|
-
packageId: nullishToOptional(
|
|
3330
|
-
iconURL: nullishToOptional(
|
|
3331
|
-
configurationProperties: nullishToOptional(
|
|
3332
|
-
customBlocks: nullishToOptional(
|
|
3333
|
-
blockVariants: nullishToOptional(
|
|
3334
|
-
usesBrands: nullishToOptional(
|
|
3335
|
-
usesThemes: nullishToOptional(
|
|
3305
|
+
var ExporterType = z134.enum(["code", "documentation"]);
|
|
3306
|
+
var ExporterSource = z134.enum(["git", "upload"]);
|
|
3307
|
+
var ExporterTag = z134.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
3308
|
+
var ExporterDetails = z134.object({
|
|
3309
|
+
description: z134.string(),
|
|
3310
|
+
version: z134.string(),
|
|
3311
|
+
routingVersion: nullishToOptional(z134.string()),
|
|
3312
|
+
author: nullishToOptional(z134.string()),
|
|
3313
|
+
organization: nullishToOptional(z134.string()),
|
|
3314
|
+
homepage: nullishToOptional(z134.string()),
|
|
3315
|
+
readme: nullishToOptional(z134.string()),
|
|
3316
|
+
tags: nullishToOptional(z134.array(ExporterTag)).default([]),
|
|
3317
|
+
packageId: nullishToOptional(z134.string().max(255)),
|
|
3318
|
+
iconURL: nullishToOptional(z134.string()),
|
|
3319
|
+
configurationProperties: nullishToOptional(z134.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3320
|
+
customBlocks: nullishToOptional(z134.array(PulsarCustomBlock)).default([]),
|
|
3321
|
+
blockVariants: nullishToOptional(z134.record(z134.string(), z134.array(PulsarContributionVariant))).default({}),
|
|
3322
|
+
usesBrands: nullishToOptional(z134.boolean()).default(false),
|
|
3323
|
+
usesThemes: nullishToOptional(z134.boolean()).default(false),
|
|
3336
3324
|
source: ExporterSource,
|
|
3337
3325
|
gitProvider: nullishToOptional(GitProvider),
|
|
3338
|
-
gitUrl: nullishToOptional(
|
|
3339
|
-
gitBranch: nullishToOptional(
|
|
3340
|
-
gitDirectory: nullishToOptional(
|
|
3341
|
-
});
|
|
3342
|
-
var Exporter =
|
|
3343
|
-
id:
|
|
3344
|
-
createdAt:
|
|
3345
|
-
name:
|
|
3346
|
-
isPrivate:
|
|
3326
|
+
gitUrl: nullishToOptional(z134.string()),
|
|
3327
|
+
gitBranch: nullishToOptional(z134.string()),
|
|
3328
|
+
gitDirectory: nullishToOptional(z134.string())
|
|
3329
|
+
});
|
|
3330
|
+
var Exporter = z134.object({
|
|
3331
|
+
id: z134.string(),
|
|
3332
|
+
createdAt: z134.coerce.date(),
|
|
3333
|
+
name: z134.string(),
|
|
3334
|
+
isPrivate: z134.boolean(),
|
|
3347
3335
|
details: ExporterDetails,
|
|
3348
3336
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3349
|
-
storagePath: nullishToOptional(
|
|
3337
|
+
storagePath: nullishToOptional(z134.string()).default("")
|
|
3338
|
+
});
|
|
3339
|
+
|
|
3340
|
+
// src/export/exporter-workspace-membership.ts
|
|
3341
|
+
import { z as z136 } from "zod";
|
|
3342
|
+
|
|
3343
|
+
// src/export/exporter-workspace-membership-role.ts
|
|
3344
|
+
import { z as z135 } from "zod";
|
|
3345
|
+
var ExporterWorkspaceMembershipRole = z135.enum(["Owner", "OwnerArchived", "User"]);
|
|
3346
|
+
|
|
3347
|
+
// src/export/exporter-workspace-membership.ts
|
|
3348
|
+
var ExporterWorkspaceMembership = z136.object({
|
|
3349
|
+
id: z136.string(),
|
|
3350
|
+
workspaceId: z136.string(),
|
|
3351
|
+
exporterId: z136.string(),
|
|
3352
|
+
role: ExporterWorkspaceMembershipRole
|
|
3350
3353
|
});
|
|
3351
3354
|
|
|
3352
3355
|
// src/feature-flags/feature-flags.ts
|
|
@@ -3752,6 +3755,66 @@ var ContentLoaderPayload = z150.object({
|
|
|
3752
3755
|
})
|
|
3753
3756
|
);
|
|
3754
3757
|
|
|
3758
|
+
// src/utils/naming.ts
|
|
3759
|
+
function getCodenameFromText(name) {
|
|
3760
|
+
let codeName = removeDiacritics(name);
|
|
3761
|
+
codeName = codeName.replace(/[^a-zA-Z0-9$_ ]+/g, "");
|
|
3762
|
+
codeName = codeName.replace(/^[0-9 ]+/g, "");
|
|
3763
|
+
codeName = toCamelCase(codeName.toLowerCase());
|
|
3764
|
+
codeName = codeName.replace(/ /g, "");
|
|
3765
|
+
if (codeName) {
|
|
3766
|
+
codeName = codeName.charAt(0).toLowerCase() + codeName.slice(1);
|
|
3767
|
+
}
|
|
3768
|
+
return codeName;
|
|
3769
|
+
}
|
|
3770
|
+
function toCamelCase(str) {
|
|
3771
|
+
return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function(match, index) {
|
|
3772
|
+
if (+match === 0)
|
|
3773
|
+
return "";
|
|
3774
|
+
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
3775
|
+
});
|
|
3776
|
+
}
|
|
3777
|
+
function removeDiacritics(str) {
|
|
3778
|
+
const diacriticsMap = [
|
|
3779
|
+
{
|
|
3780
|
+
base: "A",
|
|
3781
|
+
letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g
|
|
3782
|
+
},
|
|
3783
|
+
{ base: "AA", letters: /[\uA732]/g },
|
|
3784
|
+
{ base: "AE", letters: /[\u00C6\u01FC\u01E2]/g },
|
|
3785
|
+
{ base: "AO", letters: /[\uA734]/g },
|
|
3786
|
+
{ base: "AU", letters: /[\uA736]/g },
|
|
3787
|
+
{ base: "AV", letters: /[\uA738\uA73A]/g },
|
|
3788
|
+
{ base: "AY", letters: /[\uA73C]/g },
|
|
3789
|
+
{
|
|
3790
|
+
base: "B",
|
|
3791
|
+
letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g
|
|
3792
|
+
},
|
|
3793
|
+
{
|
|
3794
|
+
base: "C",
|
|
3795
|
+
letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g
|
|
3796
|
+
},
|
|
3797
|
+
/* ... */
|
|
3798
|
+
{
|
|
3799
|
+
base: "Z",
|
|
3800
|
+
letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g
|
|
3801
|
+
},
|
|
3802
|
+
{
|
|
3803
|
+
base: "a",
|
|
3804
|
+
letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g
|
|
3805
|
+
},
|
|
3806
|
+
/* ... */
|
|
3807
|
+
{
|
|
3808
|
+
base: "z",
|
|
3809
|
+
letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g
|
|
3810
|
+
}
|
|
3811
|
+
];
|
|
3812
|
+
diacriticsMap.forEach((diacritic) => {
|
|
3813
|
+
str = str.replace(diacritic.letters, diacritic.base);
|
|
3814
|
+
});
|
|
3815
|
+
return str;
|
|
3816
|
+
}
|
|
3817
|
+
|
|
3755
3818
|
// src/utils/slugify.ts
|
|
3756
3819
|
import slugifyImplementation from "@sindresorhus/slugify";
|
|
3757
3820
|
function slugify(str, options) {
|
|
@@ -4922,6 +4985,7 @@ export {
|
|
|
4922
4985
|
figmaFileStructureToMap,
|
|
4923
4986
|
filterNonNullish,
|
|
4924
4987
|
forceUnwrapNullish,
|
|
4988
|
+
getCodenameFromText,
|
|
4925
4989
|
groupBy,
|
|
4926
4990
|
isDesignTokenImportModelOfType,
|
|
4927
4991
|
isDesignTokenOfType,
|