@atlaskit/primitives 7.0.0 → 7.0.2

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.
Files changed (76) hide show
  1. package/.eslintrc.js +1 -1
  2. package/CHANGELOG.md +19 -1
  3. package/LICENSE.md +6 -8
  4. package/constellation/anchor/code.mdx +3 -3
  5. package/constellation/anchor/examples.mdx +33 -39
  6. package/constellation/anchor/usage.mdx +60 -30
  7. package/constellation/bleed/code.mdx +3 -3
  8. package/constellation/bleed/examples.mdx +17 -13
  9. package/constellation/box/code.mdx +3 -3
  10. package/constellation/box/examples.mdx +25 -19
  11. package/constellation/box/usage.mdx +15 -5
  12. package/constellation/flex/code.mdx +3 -3
  13. package/constellation/flex/examples.mdx +12 -11
  14. package/constellation/grid/code.mdx +3 -3
  15. package/constellation/grid/examples.mdx +15 -10
  16. package/constellation/inline/code.mdx +3 -3
  17. package/constellation/inline/examples.mdx +32 -38
  18. package/constellation/inline/usage.mdx +15 -6
  19. package/constellation/overview/index.mdx +29 -27
  20. package/constellation/pressable/code.mdx +5 -4
  21. package/constellation/pressable/examples.mdx +41 -55
  22. package/constellation/pressable/usage.mdx +59 -36
  23. package/constellation/responsive/01-show/code.mdx +3 -3
  24. package/constellation/responsive/01-show/examples.mdx +9 -13
  25. package/constellation/responsive/02-hide/code.mdx +3 -3
  26. package/constellation/responsive/02-hide/examples.mdx +9 -13
  27. package/constellation/responsive/03-breakpoints/examples.mdx +3 -3
  28. package/constellation/responsive/examples.mdx +10 -10
  29. package/constellation/responsive/usage.mdx +23 -15
  30. package/constellation/stack/code.mdx +3 -3
  31. package/constellation/stack/examples.mdx +26 -20
  32. package/constellation/stack/usage.mdx +13 -5
  33. package/constellation/text/code.mdx +3 -3
  34. package/constellation/text/examples.mdx +29 -15
  35. package/constellation/text/usage.mdx +6 -3
  36. package/constellation/xcss/examples.mdx +7 -5
  37. package/constellation/xcss/migration.mdx +32 -25
  38. package/constellation/xcss/usage.mdx +72 -60
  39. package/dist/cjs/components/anchor.js +4 -4
  40. package/dist/cjs/components/pressable.js +1 -1
  41. package/dist/cjs/xcss/style-maps.partial.js +13 -13
  42. package/dist/es2019/components/anchor.js +4 -4
  43. package/dist/es2019/components/pressable.js +1 -1
  44. package/dist/es2019/xcss/style-maps.partial.js +13 -13
  45. package/dist/esm/components/anchor.js +4 -4
  46. package/dist/esm/components/pressable.js +1 -1
  47. package/dist/esm/xcss/style-maps.partial.js +13 -13
  48. package/dist/types/components/anchor.d.ts +4 -4
  49. package/dist/types/responsive/index.d.ts +2 -2
  50. package/dist/types/xcss/style-maps.partial.d.ts +13 -13
  51. package/dist/types-ts4.5/components/anchor.d.ts +4 -4
  52. package/dist/types-ts4.5/responsive/index.d.ts +2 -2
  53. package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +13 -13
  54. package/extract-react-types/anchor-props.tsx +108 -116
  55. package/extract-react-types/bleed-props.tsx +17 -22
  56. package/extract-react-types/box-props.tsx +67 -70
  57. package/extract-react-types/flex-props.tsx +61 -61
  58. package/extract-react-types/grid-props.tsx +92 -92
  59. package/extract-react-types/hide-props.tsx +35 -35
  60. package/extract-react-types/inline-props.tsx +68 -68
  61. package/extract-react-types/pressable-props.tsx +101 -107
  62. package/extract-react-types/show-props.tsx +35 -35
  63. package/extract-react-types/stack-props.tsx +55 -55
  64. package/package.json +2 -2
  65. package/report.api.md +940 -965
  66. package/scripts/border-codegen-template.tsx +40 -47
  67. package/scripts/codegen-file-templates/dimensions.tsx +8 -8
  68. package/scripts/codegen-file-templates/layer.tsx +9 -9
  69. package/scripts/codegen-styles.tsx +97 -103
  70. package/scripts/color-codegen-template.tsx +61 -73
  71. package/scripts/elevation-codegen-template.tsx +50 -62
  72. package/scripts/inverse-color-map-template.tsx +26 -31
  73. package/scripts/misc-codegen-template.tsx +4 -9
  74. package/scripts/spacing-codegen-template.tsx +25 -31
  75. package/scripts/typography-codegen-template.tsx +59 -65
  76. package/scripts/utils.tsx +36 -43
@@ -4,64 +4,57 @@ import { shape as tokens } from '@atlaskit/tokens/tokens-raw';
4
4
  import { capitalize, constructTokenFunctionCall } from './utils';
5
5
 
6
6
  type Token = {
7
- token: string;
8
- fallback: string;
9
- isDeprecated: boolean;
7
+ token: string;
8
+ fallback: string;
9
+ isDeprecated: boolean;
10
10
  };
11
11
 
12
12
  const tokenStyles = {
13
- width: {
14
- objectName: 'borderWidth',
15
- filterPrefix: 'border.width',
16
- cssProperty: 'borderWidth',
17
- filterFn: <T extends Token>(t: T) =>
18
- t.token.startsWith(tokenStyles.width.filterPrefix),
19
- },
20
- radius: {
21
- objectName: 'borderRadius',
22
- filterPrefix: 'border.radius',
23
- cssProperty: 'borderRadius',
24
- filterFn: <T extends Token>(t: T) =>
25
- t.token.startsWith(tokenStyles.radius.filterPrefix),
26
- },
13
+ width: {
14
+ objectName: 'borderWidth',
15
+ filterPrefix: 'border.width',
16
+ cssProperty: 'borderWidth',
17
+ filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.width.filterPrefix),
18
+ },
19
+ radius: {
20
+ objectName: 'borderRadius',
21
+ filterPrefix: 'border.radius',
22
+ cssProperty: 'borderRadius',
23
+ filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.radius.filterPrefix),
24
+ },
27
25
  } as const;
28
26
 
29
27
  const activeTokens = tokens
30
- .filter(t => t.attributes.state !== 'deleted')
31
- .map(
32
- (t): Token => ({
33
- token: t.cleanName,
34
- fallback: t.value === '4px' ? '3px' : (t.value as string),
35
- isDeprecated: t.attributes.state === 'deprecated',
36
- }),
37
- );
28
+ .filter((t) => t.attributes.state !== 'deleted')
29
+ .map(
30
+ (t): Token => ({
31
+ token: t.cleanName,
32
+ fallback: t.value === '4px' ? '3px' : (t.value as string),
33
+ isDeprecated: t.attributes.state === 'deprecated',
34
+ }),
35
+ );
38
36
 
39
- export const createBorderStylesFromTemplate = (
40
- property: keyof typeof tokenStyles,
41
- ) => {
42
- if (!tokenStyles[property]) {
43
- throw new Error(`[codegen] Unknown option found "${property}"`);
44
- }
37
+ export const createBorderStylesFromTemplate = (property: keyof typeof tokenStyles) => {
38
+ if (!tokenStyles[property]) {
39
+ throw new Error(`[codegen] Unknown option found "${property}"`);
40
+ }
45
41
 
46
- const { filterFn, objectName } = tokenStyles[property];
42
+ const { filterFn, objectName } = tokenStyles[property];
47
43
 
48
- return (format(
49
- `
44
+ return (
45
+ format(
46
+ `
50
47
  export const ${objectName}Map = {
51
48
  ${activeTokens
52
- .filter(filterFn)
53
- .map(t => {
54
- return `
49
+ .filter(filterFn)
50
+ .map((t) => {
51
+ return `
55
52
  ${t.isDeprecated ? '// @deprecated' : ''}
56
- '${t.token}': ${constructTokenFunctionCall(
57
- t.token,
58
- t.fallback,
59
- )}`.trim();
60
- })
61
- .join(',\n\t')}
53
+ '${t.token}': ${constructTokenFunctionCall(t.token, t.fallback)}`.trim();
54
+ })
55
+ .join(',\n\t')}
62
56
  } as const;`,
63
- 'typescript',
64
- ) +
65
- `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
66
- );
57
+ 'typescript',
58
+ ) + `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
59
+ );
67
60
  };
@@ -1,11 +1,11 @@
1
1
  export const dimensionMap = {
2
- '100%': '100%',
3
- 'size.100': '1rem',
4
- 'size.200': '1.5rem',
5
- 'size.300': '2rem',
6
- 'size.400': '2.5rem',
7
- 'size.500': '3rem',
8
- 'size.600': '6rem',
9
- 'size.1000': '12rem',
2
+ '100%': '100%',
3
+ 'size.100': '1rem',
4
+ 'size.200': '1.5rem',
5
+ 'size.300': '2rem',
6
+ 'size.400': '2.5rem',
7
+ 'size.500': '3rem',
8
+ 'size.600': '6rem',
9
+ 'size.1000': '12rem',
10
10
  } as const;
11
11
  export type Dimension = keyof typeof dimensionMap;
@@ -1,13 +1,13 @@
1
1
  export const layerMap = {
2
- card: 100,
3
- navigation: 200,
4
- dialog: 300,
5
- layer: 400,
6
- blanket: 500,
7
- modal: 510,
8
- flag: 600,
9
- spotlight: 700,
10
- tooltip: 800,
2
+ card: 100,
3
+ navigation: 200,
4
+ dialog: 300,
5
+ layer: 400,
6
+ blanket: 500,
7
+ modal: 510,
8
+ flag: 600,
9
+ spotlight: 700,
10
+ tooltip: 800,
11
11
  } as const;
12
12
 
13
13
  export type Layer = keyof typeof layerMap;
@@ -13,122 +13,116 @@ import { createSpacingStylesFromTemplate } from './spacing-codegen-template';
13
13
  import { createTypographyStylesFromTemplate } from './typography-codegen-template';
14
14
 
15
15
  const colorTokensDependencyPath = require.resolve(
16
- '../../tokens/src/artifacts/tokens-raw/atlassian-light',
16
+ '../../tokens/src/artifacts/tokens-raw/atlassian-light',
17
17
  );
18
18
  const spacingTokensDependencyPath = require.resolve(
19
- '../../tokens/src/artifacts/tokens-raw/atlassian-spacing',
19
+ '../../tokens/src/artifacts/tokens-raw/atlassian-spacing',
20
20
  );
21
21
  const shapeTokensDependencyPath = require.resolve(
22
- '../../tokens/src/artifacts/tokens-raw/atlassian-shape',
22
+ '../../tokens/src/artifacts/tokens-raw/atlassian-shape',
23
23
  );
24
24
 
25
25
  const templateFiles = readdirSync(join(__dirname, 'codegen-file-templates'), {
26
- withFileTypes: true,
26
+ withFileTypes: true,
27
27
  })
28
- .filter(item => !item.isDirectory())
29
- .map(item => join(__dirname, 'codegen-file-templates', item.name));
28
+ .filter((item) => !item.isDirectory())
29
+ .map((item) => join(__dirname, 'codegen-file-templates', item.name));
30
30
 
31
- const targetPath = join(
32
- __dirname,
33
- '../',
34
- 'src',
35
- 'xcss',
36
- 'style-maps.partial.tsx',
37
- );
31
+ const targetPath = join(__dirname, '../', 'src', 'xcss', 'style-maps.partial.tsx');
38
32
 
39
33
  const sourceFns = [
40
- // width, height, minWidth, maxWidth, minHeight, maxHeight
41
- () =>
42
- createPartialSignedArtifact(
43
- options => options.map(createStylesFromFileTemplate).join('\n'),
44
- 'yarn workspace @atlaskit/primitives codegen-styles',
45
- {
46
- id: 'dimensions',
47
- absoluteFilePath: targetPath,
48
- dependencies: templateFiles.filter(v => v.includes('dimensions')),
49
- },
50
- ),
51
- // padding*, gap*, inset*
52
- () =>
53
- createPartialSignedArtifact(
54
- createSpacingStylesFromTemplate,
55
- 'yarn workspace @atlaskit/primitives codegen-styles',
56
- {
57
- id: 'spacing',
58
- absoluteFilePath: targetPath,
59
- dependencies: [spacingTokensDependencyPath],
60
- },
61
- ),
62
- // text color, background-color, border-color
63
- () =>
64
- createPartialSignedArtifact(
65
- options => options.map(createColorStylesFromTemplate).join('\n'),
66
- 'yarn workspace @atlaskit/primitives codegen-styles',
67
- {
68
- id: 'colors',
69
- absoluteFilePath: targetPath,
70
- dependencies: [colorTokensDependencyPath],
71
- },
72
- ),
73
- // inverse color map
74
- () =>
75
- createPartialSignedArtifact(
76
- createInverseColorMapTemplate,
77
- 'yarn workspace @atlaskit/primitives codegen-styles',
78
- {
79
- id: 'inverse-colors',
80
- absoluteFilePath: targetPath,
81
- dependencies: [colorTokensDependencyPath],
82
- },
83
- ),
84
- // elevation (opacity, shadow, surface)
85
- () =>
86
- createPartialSignedArtifact(
87
- options => options.map(createElevationStylesFromTemplate).join('\n'),
88
- 'yarn workspace @atlaskit/primitives codegen-styles',
89
- {
90
- id: 'elevation',
91
- absoluteFilePath: targetPath,
92
- dependencies: [colorTokensDependencyPath],
93
- },
94
- ),
95
- // border-width, border-radius
96
- () =>
97
- createPartialSignedArtifact(
98
- options => options.map(createBorderStylesFromTemplate).join('\n'),
99
- 'yarn workspace @atlaskit/primitives codegen-styles',
100
- {
101
- id: 'border',
102
- absoluteFilePath: targetPath,
103
- dependencies: [shapeTokensDependencyPath],
104
- },
105
- ),
106
- // border-color, border-radius, border-width, layer',
107
- () =>
108
- createPartialSignedArtifact(
109
- options => options.map(createStylesFromFileTemplate).join('\n'),
110
- 'yarn workspace @atlaskit/primitives codegen-styles',
111
- {
112
- id: 'misc',
113
- absoluteFilePath: targetPath,
114
- dependencies: templateFiles,
115
- },
116
- ),
117
- // font*, lineheight
118
- () =>
119
- createPartialSignedArtifact(
120
- createTypographyStylesFromTemplate,
121
- 'yarn workspace @atlaskit/primitives codegen-styles',
122
- {
123
- id: 'typography',
124
- absoluteFilePath: targetPath,
125
- dependencies: templateFiles,
126
- },
127
- ),
34
+ // width, height, minWidth, maxWidth, minHeight, maxHeight
35
+ () =>
36
+ createPartialSignedArtifact(
37
+ (options) => options.map(createStylesFromFileTemplate).join('\n'),
38
+ 'yarn workspace @atlaskit/primitives codegen-styles',
39
+ {
40
+ id: 'dimensions',
41
+ absoluteFilePath: targetPath,
42
+ dependencies: templateFiles.filter((v) => v.includes('dimensions')),
43
+ },
44
+ ),
45
+ // padding*, gap*, inset*
46
+ () =>
47
+ createPartialSignedArtifact(
48
+ createSpacingStylesFromTemplate,
49
+ 'yarn workspace @atlaskit/primitives codegen-styles',
50
+ {
51
+ id: 'spacing',
52
+ absoluteFilePath: targetPath,
53
+ dependencies: [spacingTokensDependencyPath],
54
+ },
55
+ ),
56
+ // text color, background-color, border-color
57
+ () =>
58
+ createPartialSignedArtifact(
59
+ (options) => options.map(createColorStylesFromTemplate).join('\n'),
60
+ 'yarn workspace @atlaskit/primitives codegen-styles',
61
+ {
62
+ id: 'colors',
63
+ absoluteFilePath: targetPath,
64
+ dependencies: [colorTokensDependencyPath],
65
+ },
66
+ ),
67
+ // inverse color map
68
+ () =>
69
+ createPartialSignedArtifact(
70
+ createInverseColorMapTemplate,
71
+ 'yarn workspace @atlaskit/primitives codegen-styles',
72
+ {
73
+ id: 'inverse-colors',
74
+ absoluteFilePath: targetPath,
75
+ dependencies: [colorTokensDependencyPath],
76
+ },
77
+ ),
78
+ // elevation (opacity, shadow, surface)
79
+ () =>
80
+ createPartialSignedArtifact(
81
+ (options) => options.map(createElevationStylesFromTemplate).join('\n'),
82
+ 'yarn workspace @atlaskit/primitives codegen-styles',
83
+ {
84
+ id: 'elevation',
85
+ absoluteFilePath: targetPath,
86
+ dependencies: [colorTokensDependencyPath],
87
+ },
88
+ ),
89
+ // border-width, border-radius
90
+ () =>
91
+ createPartialSignedArtifact(
92
+ (options) => options.map(createBorderStylesFromTemplate).join('\n'),
93
+ 'yarn workspace @atlaskit/primitives codegen-styles',
94
+ {
95
+ id: 'border',
96
+ absoluteFilePath: targetPath,
97
+ dependencies: [shapeTokensDependencyPath],
98
+ },
99
+ ),
100
+ // border-color, border-radius, border-width, layer',
101
+ () =>
102
+ createPartialSignedArtifact(
103
+ (options) => options.map(createStylesFromFileTemplate).join('\n'),
104
+ 'yarn workspace @atlaskit/primitives codegen-styles',
105
+ {
106
+ id: 'misc',
107
+ absoluteFilePath: targetPath,
108
+ dependencies: templateFiles,
109
+ },
110
+ ),
111
+ // font*, lineheight
112
+ () =>
113
+ createPartialSignedArtifact(
114
+ createTypographyStylesFromTemplate,
115
+ 'yarn workspace @atlaskit/primitives codegen-styles',
116
+ {
117
+ id: 'typography',
118
+ absoluteFilePath: targetPath,
119
+ dependencies: templateFiles,
120
+ },
121
+ ),
128
122
  ];
129
123
 
130
- sourceFns.forEach(sourceFn => {
131
- writeFileSync(targetPath, sourceFn());
124
+ sourceFns.forEach((sourceFn) => {
125
+ writeFileSync(targetPath, sourceFn());
132
126
  });
133
127
 
134
128
  console.log(`${targetPath} written!`);
@@ -1,96 +1,84 @@
1
1
  import format from '@af/formatting/sync';
2
- import {
3
- legacyLightTokens as legacyTokens,
4
- light as tokens,
5
- } from '@atlaskit/tokens/tokens-raw';
2
+ import { legacyLightTokens as legacyTokens, light as tokens } from '@atlaskit/tokens/tokens-raw';
6
3
 
7
- import {
8
- capitalize,
9
- constructTokenFunctionCall,
10
- type ShadowDefinition,
11
- } from './utils';
4
+ import { capitalize, constructTokenFunctionCall, type ShadowDefinition } from './utils';
12
5
 
13
6
  type Token = {
14
- token: string;
15
- fallback: string | ShadowDefinition;
16
- isDeprecated: boolean;
7
+ token: string;
8
+ fallback: string | ShadowDefinition;
9
+ isDeprecated: boolean;
17
10
  };
18
11
 
19
12
  // NB: Fallback CSS variables can be deleted when tokens are no longer behind a feature flag
20
13
  const tokenStyles = {
21
- text: {
22
- objectName: 'textColor',
23
- prefix: 'color.text.',
24
- cssProperty: 'color',
25
- filterFn: <T extends Token>(t: T) =>
26
- t.token.startsWith(tokenStyles.text.prefix) ||
27
- t.token.startsWith('color.link'),
28
- },
29
- background: {
30
- objectName: 'backgroundColor',
31
- prefix: 'color.background.',
32
- cssProperty: 'backgroundColor',
33
- filterFn: <T extends Token>(t: T) =>
34
- t.token.startsWith(tokenStyles.background.prefix) ||
35
- t.token.startsWith('elevation.surface') ||
36
- t.token.startsWith('utility.elevation.surface') ||
37
- t.token.startsWith('color.blanket'),
38
- },
39
- border: {
40
- objectName: 'borderColor',
41
- prefix: 'color.border.',
42
- cssProperty: 'borderColor',
43
- filterFn: <T extends Token>(t: T) =>
44
- t.token.startsWith(tokenStyles.border.prefix),
45
- },
46
- fill: {
47
- objectName: 'fill',
48
- prefix: 'color.icon.',
49
- cssProperty: 'fill',
50
- filterFn: <T extends Token>(t: T) =>
51
- t.token.startsWith(tokenStyles.fill.prefix),
52
- },
14
+ text: {
15
+ objectName: 'textColor',
16
+ prefix: 'color.text.',
17
+ cssProperty: 'color',
18
+ filterFn: <T extends Token>(t: T) =>
19
+ t.token.startsWith(tokenStyles.text.prefix) || t.token.startsWith('color.link'),
20
+ },
21
+ background: {
22
+ objectName: 'backgroundColor',
23
+ prefix: 'color.background.',
24
+ cssProperty: 'backgroundColor',
25
+ filterFn: <T extends Token>(t: T) =>
26
+ t.token.startsWith(tokenStyles.background.prefix) ||
27
+ t.token.startsWith('elevation.surface') ||
28
+ t.token.startsWith('utility.elevation.surface') ||
29
+ t.token.startsWith('color.blanket'),
30
+ },
31
+ border: {
32
+ objectName: 'borderColor',
33
+ prefix: 'color.border.',
34
+ cssProperty: 'borderColor',
35
+ filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.border.prefix),
36
+ },
37
+ fill: {
38
+ objectName: 'fill',
39
+ prefix: 'color.icon.',
40
+ cssProperty: 'fill',
41
+ filterFn: <T extends Token>(t: T) => t.token.startsWith(tokenStyles.fill.prefix),
42
+ },
53
43
  } as const;
54
44
 
55
45
  const bothTokens = tokens.map((t, i) => [t, legacyTokens[i]]);
56
46
 
57
47
  const activeTokens = bothTokens
58
- .filter(([t]) => t.attributes.state !== 'deleted')
59
- .map(t => t)
60
- .map(
61
- ([t, legacy]): Token => ({
62
- token: t.name,
63
- fallback: legacy.value as string | ShadowDefinition,
64
- isDeprecated: t.attributes.state === 'deprecated',
65
- }),
66
- );
48
+ .filter(([t]) => t.attributes.state !== 'deleted')
49
+ .map((t) => t)
50
+ .map(
51
+ ([t, legacy]): Token => ({
52
+ token: t.name,
53
+ fallback: legacy.value as string | ShadowDefinition,
54
+ isDeprecated: t.attributes.state === 'deprecated',
55
+ }),
56
+ );
67
57
 
68
- export const createColorStylesFromTemplate = (
69
- colorProperty: keyof typeof tokenStyles,
70
- ) => {
71
- if (!tokenStyles[colorProperty]) {
72
- throw new Error(`[codegen] Unknown option found "${colorProperty}"`);
73
- }
58
+ export const createColorStylesFromTemplate = (colorProperty: keyof typeof tokenStyles) => {
59
+ if (!tokenStyles[colorProperty]) {
60
+ throw new Error(`[codegen] Unknown option found "${colorProperty}"`);
61
+ }
74
62
 
75
- const { filterFn, objectName } = tokenStyles[colorProperty];
63
+ const { filterFn, objectName } = tokenStyles[colorProperty];
76
64
 
77
- return (format(
78
- `
65
+ return (
66
+ format(
67
+ `
79
68
  export const ${objectName}Map = {
80
69
  ${activeTokens
81
- .filter(filterFn)
82
- // @ts-ignore
83
- .map(t => ({ ...t, token: t.token.replaceAll('.[default]', '') }))
84
- .map(t => {
85
- return `
70
+ .filter(filterFn)
71
+ // @ts-ignore
72
+ .map((t) => ({ ...t, token: t.token.replaceAll('.[default]', '') }))
73
+ .map((t) => {
74
+ return `
86
75
  ${t.isDeprecated ? '// @deprecated' : ''}
87
76
  '${t.token}': ${constructTokenFunctionCall(t.token, t.fallback)}
88
77
  `.trim();
89
- })
90
- .join(',\n\t')}
78
+ })
79
+ .join(',\n\t')}
91
80
  } as const;`,
92
- 'typescript',
93
- ) +
94
- `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
95
- );
81
+ 'typescript',
82
+ ) + `\nexport type ${capitalize(objectName)} = keyof typeof ${objectName}Map;\n`
83
+ );
96
84
  };