@supernova-studio/model 0.58.21 → 0.58.23
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/import/support/import-context.ts +1 -1
- package/src/feature-flags/feature-flags.ts +1 -1
- package/src/utils/common.ts +6 -0
package/package.json
CHANGED
|
@@ -66,7 +66,7 @@ export type FeatureFlagsKeepAliases = z.infer<typeof FeatureFlagsKeepAliases>;
|
|
|
66
66
|
export const FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
67
67
|
sourcesWithMissingAccess: z.array(z.string()).default([]),
|
|
68
68
|
shadowOpacityOptional: z.boolean().default(false),
|
|
69
|
-
featureFlagsKeepAliases: FeatureFlagsKeepAliases.default({})
|
|
69
|
+
featureFlagsKeepAliases: FeatureFlagsKeepAliases.default({}),
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
export type FigmaImportContextWithSourcesState = z.infer<typeof FigmaImportContextWithSourcesState>;
|
|
@@ -7,7 +7,7 @@ export const FlaggedFeature = z.enum([
|
|
|
7
7
|
"VariablesOrder",
|
|
8
8
|
"TypographyPropsKeepAliases",
|
|
9
9
|
"GradientPropsKeepAliases",
|
|
10
|
-
"ShadowPropsKeepAliases"
|
|
10
|
+
"ShadowPropsKeepAliases",
|
|
11
11
|
]);
|
|
12
12
|
export const FeatureFlagMap = z.record(FlaggedFeature, z.boolean());
|
|
13
13
|
export const FeatureFlag = z.object({
|
package/src/utils/common.ts
CHANGED
|
@@ -166,6 +166,12 @@ export function chunkedArray<V>(array: V[], chunkSize: number): V[][] {
|
|
|
166
166
|
return result;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
export function recordToMap<V>(record: Record<string, V>): Map<string, V> {
|
|
170
|
+
const map = new Map<string, V>();
|
|
171
|
+
for (const [k, v] of Object.entries(record)) map.set(k, v);
|
|
172
|
+
return map;
|
|
173
|
+
}
|
|
174
|
+
|
|
169
175
|
export type Pagination = {
|
|
170
176
|
skip?: number;
|
|
171
177
|
take?: number;
|