@supernova-studio/model 0.57.4 → 0.57.6
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 +85 -47
- package/dist/index.d.ts +85 -47
- package/dist/index.js +22 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/component.ts +1 -0
- package/src/dsm/elements/figma-component.ts +1 -0
- package/src/dsm/elements/tokens.ts +16 -2
- package/src/dsm/import/component.ts +1 -0
- package/src/export/export-runner/export-context.ts +6 -2
package/dist/index.mjs
CHANGED
|
@@ -657,7 +657,8 @@ var ComponentElementData = z33.object({
|
|
|
657
657
|
}).optional(),
|
|
658
658
|
parentComponentPersistentId: nullishToOptional(z33.string()),
|
|
659
659
|
componentPropertyDefinitions: nullishToOptional(FigmaComponentPropertyMap),
|
|
660
|
-
variantPropertyValues: nullishToOptional(z33.record(z33.string()))
|
|
660
|
+
variantPropertyValues: nullishToOptional(z33.record(z33.string())),
|
|
661
|
+
renderNodeId: nullishToOptional(z33.string())
|
|
661
662
|
})
|
|
662
663
|
});
|
|
663
664
|
|
|
@@ -3075,7 +3076,8 @@ var FigmaComponent = DesignElementBase.extend(DesignElementGroupableRequiredPart
|
|
|
3075
3076
|
variantPropertyValues: z82.record(z82.string()).optional(),
|
|
3076
3077
|
svg: FigmaComponentAsset.optional(),
|
|
3077
3078
|
isAsset: z82.boolean(),
|
|
3078
|
-
parentComponentPersistentId: nullishToOptional(z82.string())
|
|
3079
|
+
parentComponentPersistentId: nullishToOptional(z82.string()),
|
|
3080
|
+
renderNodeId: z82.string().optional()
|
|
3079
3081
|
});
|
|
3080
3082
|
function isImportedFigmaComponent(component) {
|
|
3081
3083
|
return !!component.origin;
|
|
@@ -3277,6 +3279,15 @@ function extractTokenTypedData(source) {
|
|
|
3277
3279
|
data: source.data
|
|
3278
3280
|
};
|
|
3279
3281
|
}
|
|
3282
|
+
function convertTokenTypedData(source, type) {
|
|
3283
|
+
if (!areTokenTypesCompatible(source.type, type)) {
|
|
3284
|
+
throw SupernovaException.invalidOperation(`Cannot convert token from ${source.type} to ${type}`);
|
|
3285
|
+
}
|
|
3286
|
+
return {
|
|
3287
|
+
type,
|
|
3288
|
+
data: source.data
|
|
3289
|
+
};
|
|
3290
|
+
}
|
|
3280
3291
|
function isImportedDesignToken(designToken) {
|
|
3281
3292
|
return !!designToken.origin;
|
|
3282
3293
|
}
|
|
@@ -3664,7 +3675,8 @@ var FigmaComponentImportModelPart = z93.object({
|
|
|
3664
3675
|
thumbnail: ImageImportModel,
|
|
3665
3676
|
parentComponentId: z93.string().optional(),
|
|
3666
3677
|
componentPropertyDefinitions: FigmaComponentPropertyMap.optional(),
|
|
3667
|
-
variantPropertyValues: z93.record(z93.string()).optional()
|
|
3678
|
+
variantPropertyValues: z93.record(z93.string()).optional(),
|
|
3679
|
+
renderNodeId: z93.string()
|
|
3668
3680
|
});
|
|
3669
3681
|
var FigmaComponentImportModel = ImportModelBase.extend(FigmaComponentImportModelPart.shape).extend({
|
|
3670
3682
|
isAsset: z93.boolean(),
|
|
@@ -5090,10 +5102,12 @@ var ExportJobContext = z161.object({
|
|
|
5090
5102
|
themeId: z161.string().optional(),
|
|
5091
5103
|
themePersistentIds: z161.string().array().optional(),
|
|
5092
5104
|
exporterName: z161.string(),
|
|
5093
|
-
exporterPackageUrl: z161.string(),
|
|
5094
|
-
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
5095
5105
|
documentation: ExportJobDocumentationContext.optional()
|
|
5096
5106
|
});
|
|
5107
|
+
var ExportJobExporterConfiguration = z161.object({
|
|
5108
|
+
exporterPackageUrl: z161.string(),
|
|
5109
|
+
exporterPropertyValues: ExporterPropertyValue.array()
|
|
5110
|
+
});
|
|
5097
5111
|
|
|
5098
5112
|
// src/export/export-runner/exporter-payload.ts
|
|
5099
5113
|
import { z as z162 } from "zod";
|
|
@@ -5528,6 +5542,7 @@ export {
|
|
|
5528
5542
|
ExportJobDocumentationChanges,
|
|
5529
5543
|
ExportJobDocumentationContext,
|
|
5530
5544
|
ExportJobDump,
|
|
5545
|
+
ExportJobExporterConfiguration,
|
|
5531
5546
|
ExportJobFindByFilter,
|
|
5532
5547
|
ExportJobLogEntry,
|
|
5533
5548
|
ExportJobLogEntryType,
|
|
@@ -5963,6 +5978,7 @@ export {
|
|
|
5963
5978
|
areShallowObjectsEqual,
|
|
5964
5979
|
areTokenTypesCompatible,
|
|
5965
5980
|
buildConstantEnum,
|
|
5981
|
+
convertTokenTypedData,
|
|
5966
5982
|
defaultDocumentationItemConfigurationV1,
|
|
5967
5983
|
defaultDocumentationItemConfigurationV2,
|
|
5968
5984
|
defaultDocumentationItemHeaderV1,
|