@supernova-studio/model 0.58.19 → 1.0.0
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 +19 -320
- package/dist/index.d.ts +19 -320
- package/dist/index.js +4 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/shadow.ts +0 -2
- package/src/dsm/import/support/import-context.ts +1 -8
- package/src/feature-flags/feature-flags.ts +0 -2
- package/src/liveblocks/rooms/room-type.ts +1 -60
package/package.json
CHANGED
|
@@ -16,10 +16,8 @@ export const ShadowLayerValue = z.object({
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
const ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
19
|
-
export const ShadowValue = z.array(ShadowTokenDataBase);
|
|
20
19
|
export const ShadowTokenData = tokenAliasOrValue(z.array(ShadowTokenDataBase));
|
|
21
20
|
|
|
22
21
|
export type ShadowType = z.infer<typeof ShadowType>;
|
|
23
22
|
export type ShadowLayerValue = z.infer<typeof ShadowLayerValue>;
|
|
24
|
-
export type ShadowValue = z.infer<typeof ShadowValue>;
|
|
25
23
|
export type ShadowTokenData = z.infer<typeof ShadowTokenData>;
|
|
@@ -56,17 +56,10 @@ export type FigmaImportBaseContext = z.infer<typeof FigmaImportBaseContext>;
|
|
|
56
56
|
// Context with source state updates
|
|
57
57
|
//
|
|
58
58
|
|
|
59
|
-
export const FeatureFlagsKeepAliases = z.object({
|
|
60
|
-
isTypographyPropsKeepAliasesEnabled: z.boolean().default(false),
|
|
61
|
-
isGradientPropsKeepAliasesEnabled: z.boolean().default(false),
|
|
62
|
-
isShadowPropsKeepAliasesEnabled: z.boolean().default(false),
|
|
63
|
-
});
|
|
64
|
-
export type FeatureFlagsKeepAliases = z.infer<typeof FeatureFlagsKeepAliases>;
|
|
65
|
-
|
|
66
59
|
export const FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
67
60
|
sourcesWithMissingAccess: z.array(z.string()).default([]),
|
|
68
61
|
shadowOpacityOptional: z.boolean().default(false),
|
|
69
|
-
|
|
62
|
+
typographyPropsKeepAliases: z.boolean().default(false),
|
|
70
63
|
});
|
|
71
64
|
|
|
72
65
|
export type FigmaImportContextWithSourcesState = z.infer<typeof FigmaImportContextWithSourcesState>;
|
|
@@ -6,8 +6,6 @@ export const FlaggedFeature = z.enum([
|
|
|
6
6
|
"DisableImporter",
|
|
7
7
|
"VariablesOrder",
|
|
8
8
|
"TypographyPropsKeepAliases",
|
|
9
|
-
"GradientPropsKeepAliases",
|
|
10
|
-
"ShadowPropsKeepAliases"
|
|
11
9
|
]);
|
|
12
10
|
export const FeatureFlagMap = z.record(FlaggedFeature, z.boolean());
|
|
13
11
|
export const FeatureFlag = z.object({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
export enum RoomTypeEnum {
|
|
4
|
-
|
|
5
|
-
DocumentationPage = "doc-page",
|
|
4
|
+
DocumentationPage = "documentation-page",
|
|
6
5
|
DesignSystemVersion = "design-system-version",
|
|
7
6
|
Workspace = "workspace",
|
|
8
7
|
}
|
|
@@ -11,61 +10,3 @@ export const RoomTypeSchema = z.nativeEnum(RoomTypeEnum);
|
|
|
11
10
|
|
|
12
11
|
export type RoomType = z.infer<typeof RoomTypeSchema>;
|
|
13
12
|
export const RoomType = RoomTypeSchema.enum;
|
|
14
|
-
|
|
15
|
-
//
|
|
16
|
-
// Room owners
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
export type WorkspaceRoomOwner = {
|
|
20
|
-
type: "Workspace";
|
|
21
|
-
workspaceId: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type VersionRoomOwner = {
|
|
25
|
-
type: "DesignSystemVersion";
|
|
26
|
-
workspaceId: string;
|
|
27
|
-
designSystemId: string;
|
|
28
|
-
designSystemVersionId: string;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type RoomOwner = WorkspaceRoomOwner | VersionRoomOwner;
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
// Room ids
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
export type WorkspaceParsedRoomId = {
|
|
38
|
-
type: RoomTypeEnum.Workspace;
|
|
39
|
-
raw: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export type DesignSystemVersionParsedRoomId = {
|
|
43
|
-
type: RoomTypeEnum.DesignSystemVersion;
|
|
44
|
-
raw: string;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export type DocumentationPageOldParsedRoomId = {
|
|
48
|
-
type: RoomTypeEnum.DocumentationPageOld;
|
|
49
|
-
raw: string;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export type DocumentationPageParsedRoomId = {
|
|
53
|
-
type: RoomTypeEnum.DocumentationPage;
|
|
54
|
-
raw: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Id of DS version, cannot be a wildcard (always a specific ID)
|
|
58
|
-
*/
|
|
59
|
-
designSystemVersionId: string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Documentation page persistent ID or wildcard `*`
|
|
63
|
-
*/
|
|
64
|
-
pagePersistentId: string;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export type ParsedRoomId =
|
|
68
|
-
| WorkspaceParsedRoomId
|
|
69
|
-
| DesignSystemVersionParsedRoomId
|
|
70
|
-
| DocumentationPageOldParsedRoomId
|
|
71
|
-
| DocumentationPageParsedRoomId;
|