@westpac/ui 1.11.0 → 1.13.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/CHANGELOG.md +14 -0
- package/assets/icons/filled/panel-left-filled.svg +3 -0
- package/assets/icons/filled/panel-right-filled.svg +3 -0
- package/assets/icons/filled/phone-filled.svg +2 -1
- package/assets/icons/filled/tablet-filled.svg +2 -1
- package/assets/icons/outlined/panel-left-outlined.svg +3 -0
- package/assets/icons/outlined/panel-right-outlined.svg +3 -0
- package/assets/icons/outlined/phone-outlined.svg +2 -1
- package/assets/icons/outlined/tablet-outlined.svg +2 -1
- package/assets/pictograms/BOM/DUO/MapPinPictogram.svg +1 -0
- package/assets/pictograms/BOM/DUO/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/BOM/DUO/NotificationPictogram.svg +1 -0
- package/assets/pictograms/BOM/DUO/TabletPictogram.svg +1 -0
- package/assets/pictograms/BOM/Dark/MapPinPictogram.svg +1 -0
- package/assets/pictograms/BOM/Dark/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/BOM/Dark/NotificationPictogram.svg +1 -0
- package/assets/pictograms/BOM/Dark/TabletPictogram.svg +1 -0
- package/assets/pictograms/BSA/DUO/MapPinPictogram.svg +1 -0
- package/assets/pictograms/BSA/DUO/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/BSA/DUO/NotificationPictogram.svg +1 -0
- package/assets/pictograms/BSA/DUO/TabletPictogram.svg +1 -0
- package/assets/pictograms/BSA/Dark/MapPinPictogram.svg +1 -0
- package/assets/pictograms/BSA/Dark/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/BSA/Dark/NotificationPictogram.svg +1 -0
- package/assets/pictograms/BSA/Dark/TabletPictogram.svg +1 -0
- package/assets/pictograms/Light/MapPinPictogram.svg +1 -0
- package/assets/pictograms/Light/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/Light/NotificationPictogram.svg +1 -0
- package/assets/pictograms/Light/TabletPictogram.svg +1 -0
- package/assets/pictograms/STG/DUO/MapPinPictogram.svg +1 -0
- package/assets/pictograms/STG/DUO/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/STG/DUO/NotificationPictogram.svg +1 -0
- package/assets/pictograms/STG/DUO/TabletPictogram.svg +1 -0
- package/assets/pictograms/STG/Dark/MapPinPictogram.svg +1 -0
- package/assets/pictograms/STG/Dark/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/STG/Dark/NotificationPictogram.svg +1 -0
- package/assets/pictograms/STG/Dark/TabletPictogram.svg +1 -0
- package/assets/pictograms/WBC/DUO/MapPinPictogram.svg +1 -0
- package/assets/pictograms/WBC/DUO/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/WBC/DUO/NotificationPictogram.svg +1 -0
- package/assets/pictograms/WBC/DUO/TabletPictogram.svg +1 -0
- package/assets/pictograms/WBC/Dark/MapPinPictogram.svg +1 -0
- package/assets/pictograms/WBC/Dark/MobileDevicePictogram.svg +1 -5
- package/assets/pictograms/WBC/Dark/NotificationPictogram.svg +1 -0
- package/assets/pictograms/WBC/Dark/TabletPictogram.svg +1 -0
- package/dist/component-type.json +1 -1
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/button-group/button-group.types.d.ts +0 -1
- package/dist/components/icon/components/panel-left-icon.d.ts +2 -0
- package/dist/components/icon/components/panel-left-icon.js +17 -0
- package/dist/components/icon/components/panel-right-icon.d.ts +2 -0
- package/dist/components/icon/components/panel-right-icon.js +17 -0
- package/dist/components/icon/components/phone-icon.js +4 -1
- package/dist/components/icon/components/tablet-icon.js +4 -1
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.js +2 -0
- package/dist/components/pictogram/components/map-pin-pictogram.d.ts +2 -0
- package/dist/components/pictogram/components/map-pin-pictogram.js +32 -0
- package/dist/components/pictogram/components/mobile-device-pictogram.js +10 -6
- package/dist/components/pictogram/components/notification-pictogram.d.ts +2 -0
- package/dist/components/pictogram/components/notification-pictogram.js +54 -0
- package/dist/components/pictogram/components/tablet-pictogram.d.ts +2 -0
- package/dist/components/pictogram/components/tablet-pictogram.js +40 -0
- package/dist/components/pictogram/components/target-pictogram.js +1 -1
- package/dist/components/pictogram/index.d.ts +3 -0
- package/dist/components/pictogram/index.js +3 -0
- package/package.json +7 -3
- package/src/components/button/button.styles.ts +1 -1
- package/src/components/button-group/button-group.types.ts +0 -1
- package/src/components/icon/components/panel-left-icon.tsx +29 -0
- package/src/components/icon/components/panel-right-icon.tsx +29 -0
- package/src/components/icon/components/phone-icon.tsx +5 -1
- package/src/components/icon/components/tablet-icon.tsx +5 -1
- package/src/components/icon/index.ts +2 -0
- package/src/components/pictogram/components/map-pin-pictogram.tsx +37 -0
- package/src/components/pictogram/components/mobile-device-pictogram.tsx +3 -6
- package/src/components/pictogram/components/notification-pictogram.tsx +47 -0
- package/src/components/pictogram/components/tablet-pictogram.tsx +41 -0
- package/src/components/pictogram/components/target-pictogram.tsx +1 -1
- package/src/components/pictogram/index.ts +3 -0
- package/utils/build-pictogram-assets/index.ts +85 -0
- package/utils/build-pictogram-assets/pictogram-colors.ts +57 -0
- package/utils/build-svg-zip/index.ts +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { Pictogram } from '../pictogram.component.js';
|
|
7
|
+
import { fill } from '../pictogram.styles.js';
|
|
8
|
+
import { type PictogramProps } from '../pictogram.types.js';
|
|
9
|
+
|
|
10
|
+
export function NotificationPictogram({
|
|
11
|
+
mode = 'duo',
|
|
12
|
+
viewBoxWidth = 78,
|
|
13
|
+
viewBoxHeight = 78,
|
|
14
|
+
'aria-label': ariaLabel = 'Notification',
|
|
15
|
+
copyrightYear = '2026',
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: PictogramProps) {
|
|
19
|
+
return (
|
|
20
|
+
<Pictogram
|
|
21
|
+
className={clsx('size-13', className)}
|
|
22
|
+
viewBoxWidth={viewBoxWidth}
|
|
23
|
+
viewBoxHeight={viewBoxHeight}
|
|
24
|
+
aria-label={ariaLabel}
|
|
25
|
+
copyrightYear={copyrightYear}
|
|
26
|
+
{...props}
|
|
27
|
+
>
|
|
28
|
+
<g fill="none" fillRule="evenodd">
|
|
29
|
+
<path className={fill({ mode, highlight: true })} d="M15.1504 33.873H6V31.373H15.1504V33.873Z" />
|
|
30
|
+
<path className={fill({ mode, highlight: true })} d="M71.126 33.873H61.9766V31.373H71.126V33.873Z" />
|
|
31
|
+
<path
|
|
32
|
+
className={fill({ mode, highlight: true })}
|
|
33
|
+
d="M22.8906 17.125L21.124 18.8916L14.6543 12.4209L16.4219 10.6533L22.8906 17.125Z"
|
|
34
|
+
/>
|
|
35
|
+
<path
|
|
36
|
+
className={fill({ mode, highlight: true })}
|
|
37
|
+
d="M62.4727 12.4219L56.0029 18.8916L54.2354 17.124L60.7051 10.6543L62.4727 12.4219Z"
|
|
38
|
+
/>
|
|
39
|
+
<path className={fill({ mode, highlight: true })} d="M39.8135 11.1504H37.3135V2.00098H39.8135V11.1504Z" />
|
|
40
|
+
<path
|
|
41
|
+
className={fill({ mode, outline: true })}
|
|
42
|
+
d="M46.0968 60.9717L46.0079 60.9697C45.5887 64.6654 42.9012 67.5292 39.6534 67.5293C36.7305 67.5291 32.1257 65.5263 30.6056 61.6367C30.3517 61.1251 30.1489 60.5763 30.0001 60H16.0763C16.0763 60 15.9052 55.6887 16.0763 54.875C16.5598 52.5757 20.5344 50.6378 20.5607 50.625V40.875C20.5607 32.9538 26.2776 26.2974 34.0148 24.4102V21.75C34.0148 19.4028 36.0232 17.5 38.5001 17.5C40.9769 17.5001 42.9845 19.4028 42.9845 21.75V24.4102C50.7217 26.2974 55.4396 32.9537 55.4396 40.875V51.625C55.4845 51.6469 59.4416 53.5812 59.9239 55.875C60.0949 56.6883 59.9241 59.9964 59.9239 60H46.0968V60.9717ZM32.6066 60C33.267 61.7775 34.6746 63.0194 36.3126 63.0195C37.9517 63.0195 39.3592 61.7784 40.0187 60H32.6066ZM37.5011 27C35.6358 27 34.1219 27.3104 34.1114 27.3125C28.2648 28.8338 23.9445 34.1989 23.9445 40.584V52.3613C23.9253 52.3633 22.5523 52.5091 21.5861 53.7871C20.615 55.0716 20.556 55.9963 20.5558 56H54.4454C54.4454 56 54.4455 54.9999 53.4728 54C52.5059 53.0062 51.0743 52.3691 51.0568 52.3613V40.584C51.0568 34.1989 46.7364 28.8338 40.8898 27.3125C38.913 27.0003 39.3722 27 37.5011 27Z"
|
|
43
|
+
/>
|
|
44
|
+
</g>
|
|
45
|
+
</Pictogram>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { Pictogram } from '../pictogram.component.js';
|
|
7
|
+
import { fill } from '../pictogram.styles.js';
|
|
8
|
+
import { type PictogramProps } from '../pictogram.types.js';
|
|
9
|
+
|
|
10
|
+
export function TabletPictogram({
|
|
11
|
+
mode = 'duo',
|
|
12
|
+
viewBoxWidth = 78,
|
|
13
|
+
viewBoxHeight = 78,
|
|
14
|
+
'aria-label': ariaLabel = 'Tablet',
|
|
15
|
+
copyrightYear = '2026',
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: PictogramProps) {
|
|
19
|
+
return (
|
|
20
|
+
<Pictogram
|
|
21
|
+
className={clsx('size-13', className)}
|
|
22
|
+
viewBoxWidth={viewBoxWidth}
|
|
23
|
+
viewBoxHeight={viewBoxHeight}
|
|
24
|
+
aria-label={ariaLabel}
|
|
25
|
+
copyrightYear={copyrightYear}
|
|
26
|
+
{...props}
|
|
27
|
+
>
|
|
28
|
+
<g fill="none" fillRule="evenodd">
|
|
29
|
+
<path
|
|
30
|
+
className={fill({ mode, outline: true })}
|
|
31
|
+
d="M56.4102 5.98633C57.7769 5.98644 58.8896 7.03957 58.8896 8.33203V65.6396C58.8896 66.9321 57.7769 67.9862 56.4102 67.9863H17.3691C16.0023 67.9863 14.8896 66.9322 14.8896 65.6396V8.33203C14.8896 7.0395 16.0023 5.98633 17.3691 5.98633H56.4102ZM18.4316 65.2354H55.5625V8.73633H18.4316V65.2354Z"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
className={fill({ mode, outline: true })}
|
|
35
|
+
d="M58.0312 2C58.9684 2.00005 59.8424 2.19118 60.6328 2.50195C60.8104 2.55358 61.0289 2.6471 61.2891 2.78906C61.326 2.80891 61.3644 2.82584 61.4014 2.84668C61.4149 2.85461 61.4257 2.85926 61.4404 2.86816C64.5433 4.67301 66.3253 7.47727 66.3379 7.49707C66.3379 7.49707 66.3143 7.50483 66.3057 7.50684C66.7336 8.16917 67 8.91062 67 9.70801V70.1992C66.9997 72.8464 64.3247 75 61.0371 75H18.9678C17.4326 75 16.0514 74.5166 15.002 73.7441C12.2531 71.9617 10.6807 69.5254 10.6807 69.5254C10.6807 69.5254 10.6991 69.5196 10.7041 69.5176C10.2639 68.8533 10 68.1003 10 67.293V6.80176C10.0003 4.1536 12.6753 2 15.9629 2H58.0312ZM15.8662 4.48242C14.2793 4.48249 12.9876 5.523 12.9873 6.80176V67.293C12.9873 68.5719 14.2791 69.6122 15.8662 69.6123H57.9346C59.5217 69.6123 60.8145 68.572 60.8145 67.293V6.80176C60.8142 5.52296 59.5215 4.48242 57.9346 4.48242H15.8662Z"
|
|
36
|
+
/>
|
|
37
|
+
<rect className={fill({ mode, highlight: true })} x="33" y="12" width="8" height="3" rx="1.5" />
|
|
38
|
+
</g>
|
|
39
|
+
</Pictogram>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -54,12 +54,14 @@ export { HeartPictogram } from './components/heart-pictogram.js';
|
|
|
54
54
|
export { HousePictogram } from './components/house-pictogram.js';
|
|
55
55
|
export { LightBulbPictogram } from './components/light-bulb-pictogram.js';
|
|
56
56
|
export { LoopPictogram } from './components/loop-pictogram.js';
|
|
57
|
+
export { MapPinPictogram } from './components/map-pin-pictogram.js';
|
|
57
58
|
export { MedicareCardPictogram } from './components/medicare-card-pictogram.js';
|
|
58
59
|
export { MobileDevicePictogram } from './components/mobile-device-pictogram.js';
|
|
59
60
|
export { MoneyInPictogram } from './components/money-in-pictogram.js';
|
|
60
61
|
export { MoneyOutPictogram } from './components/money-out-pictogram.js';
|
|
61
62
|
export { MovieTicketsPictogram } from './components/movie-tickets-pictogram.js';
|
|
62
63
|
export { NestEggPictogram } from './components/nest-egg-pictogram.js';
|
|
64
|
+
export { NotificationPictogram } from './components/notification-pictogram.js';
|
|
63
65
|
export { NoodlesPictogram } from './components/noodles-pictogram.js';
|
|
64
66
|
export { Number1Pictogram } from './components/number-1-pictogram.js';
|
|
65
67
|
export { Number2Pictogram } from './components/number-2-pictogram.js';
|
|
@@ -81,6 +83,7 @@ export { ShoppingPictogram } from './components/shopping-pictogram.js';
|
|
|
81
83
|
export { SparklePictogram } from './components/sparkle-pictogram.js';
|
|
82
84
|
export { StarPictogram } from './components/star-pictogram.js';
|
|
83
85
|
export { StopwatchPictogram } from './components/stopwatch-pictogram.js';
|
|
86
|
+
export { TabletPictogram } from './components/tablet-pictogram.js';
|
|
84
87
|
export { TargetPictogram } from './components/target-pictogram.js';
|
|
85
88
|
export { TaxDocumentPictogram } from './components/tax-document-pictogram.js';
|
|
86
89
|
export { TelephoneCallPictogram } from './components/telephone-call-pictogram.js';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Generates static SVG assets for each brand from an existing pictogram component.
|
|
2
|
+
|
|
3
|
+
import { writeFile } from 'fs/promises';
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, createElement } from 'react';
|
|
6
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
7
|
+
|
|
8
|
+
import { type PictogramProps } from '../../src/components/pictogram/pictogram.types.js';
|
|
9
|
+
|
|
10
|
+
import { getPictogramColors, pictogramBrands, type PictogramColors } from './pictogram-colors.js';
|
|
11
|
+
|
|
12
|
+
type PictogramComponent = ComponentType<PictogramProps>;
|
|
13
|
+
|
|
14
|
+
// Render the component as SVG markup.
|
|
15
|
+
const renderPictogram = (component: PictogramComponent, mode: 'base' | 'duo' | 'mono', colours: PictogramColors) => {
|
|
16
|
+
let svg = renderToStaticMarkup(
|
|
17
|
+
createElement(component, {
|
|
18
|
+
mode,
|
|
19
|
+
width: 78,
|
|
20
|
+
height: 78,
|
|
21
|
+
copyrightYear: '',
|
|
22
|
+
fill: 'none',
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
// Replace theme-dependent colour fill classes with static brand colouring.
|
|
27
|
+
svg = svg
|
|
28
|
+
.replace(/ class="fill-surface-pictogram-base"/g, ` fill="${colours.base}"`)
|
|
29
|
+
.replace(/ class="fill-surface-pictogram-accent"/g, ` fill="${colours.accent}"`)
|
|
30
|
+
.replace(/ class="fill-surface-mono"/g, ` fill="${colours.mono}"`);
|
|
31
|
+
|
|
32
|
+
if (svg.includes('fill-surface-')) {
|
|
33
|
+
throw new Error('Generated SVG contains an unresolved fill class.');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Remove unnecessary props svg will not need
|
|
37
|
+
svg = svg.replace(/\s(?:class|role|focusable|aria-label)="[^"]*"/g, '');
|
|
38
|
+
|
|
39
|
+
return `${svg}\n`;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Write the SVG to its brand and colouring folder.
|
|
43
|
+
const writePictogram = async (folder: string, name: string, svg: string) => {
|
|
44
|
+
const file = `assets/pictograms/${folder}/${name}.svg`;
|
|
45
|
+
await writeFile(file, svg);
|
|
46
|
+
/* eslint-disable no-console */
|
|
47
|
+
console.log(`Written: ${file}`);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const main = async () => {
|
|
51
|
+
const fileNames = process.argv.slice(2);
|
|
52
|
+
|
|
53
|
+
if (!fileNames.length) {
|
|
54
|
+
throw new Error('Provide a pictogram component file name, for example: mobile-device-pictogram');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
for (const fileName of fileNames) {
|
|
58
|
+
const pictogramModule = (await import(`../../src/components/pictogram/components/${fileName}.js`)) as Record<
|
|
59
|
+
string,
|
|
60
|
+
unknown
|
|
61
|
+
>;
|
|
62
|
+
|
|
63
|
+
const pictogramExport = Object.entries(pictogramModule).find(
|
|
64
|
+
([name, component]) => name.endsWith('Pictogram') && typeof component === 'function',
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (!pictogramExport) {
|
|
68
|
+
throw new Error(`${fileName}.tsx does not export a pictogram component.`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const [name, component] = pictogramExport as [string, PictogramComponent];
|
|
72
|
+
|
|
73
|
+
for (const brand of pictogramBrands) {
|
|
74
|
+
const colours = getPictogramColors(brand);
|
|
75
|
+
|
|
76
|
+
await writePictogram(`${brand}/Dark`, name, renderPictogram(component, 'base', colours));
|
|
77
|
+
|
|
78
|
+
await writePictogram(`${brand}/DUO`, name, renderPictogram(component, 'duo', colours));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
await writePictogram('Light', name, renderPictogram(component, 'mono', getPictogramColors('WBC')));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
void main();
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
|
|
3
|
+
// Load the latest GEL brand colours when the script runs.
|
|
4
|
+
const allBrands: unknown = JSON.parse(readFileSync('../style-config/src/tokens/w3c/all-brands.json', 'utf8'));
|
|
5
|
+
|
|
6
|
+
export const pictogramBrands = ['WBC', 'BOM', 'BSA', 'STG'] as const;
|
|
7
|
+
export type PictogramBrand = (typeof pictogramBrands)[number];
|
|
8
|
+
|
|
9
|
+
export type PictogramColors = {
|
|
10
|
+
base: string;
|
|
11
|
+
accent: string;
|
|
12
|
+
mono: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type TokenObject = {
|
|
16
|
+
$value?: unknown;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Match each asset folder name to the brand name used in the GEL colour file.
|
|
21
|
+
const brandTokenNames: Record<PictogramBrand, string> = {
|
|
22
|
+
WBC: 'Westpac',
|
|
23
|
+
BOM: 'Bank of Melbourne',
|
|
24
|
+
BSA: 'Bank SA',
|
|
25
|
+
STG: 'StGeorge',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Some colours point to other GEL colours instead of a hex value.
|
|
29
|
+
// Follow the references until final colour is found.
|
|
30
|
+
const resolveToken = (tokenPath: string): string => {
|
|
31
|
+
const token = tokenPath.split('.').reduce<unknown>((currentValue, key) => {
|
|
32
|
+
if (!currentValue || typeof currentValue !== 'object' || !(key in currentValue)) {
|
|
33
|
+
throw new Error(`Could not find GEL token: ${tokenPath}`);
|
|
34
|
+
}
|
|
35
|
+
return (currentValue as TokenObject)[key];
|
|
36
|
+
}, allBrands);
|
|
37
|
+
|
|
38
|
+
const value = (token as TokenObject).$value;
|
|
39
|
+
|
|
40
|
+
if (typeof value !== 'string') {
|
|
41
|
+
throw new Error(`GEL token does not contain a string value: ${tokenPath}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const reference = /^\{(.+)\}$/.exec(value);
|
|
45
|
+
return reference ? resolveToken(reference[1]) : value;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// Get the base, accent and mono colours used to build a brands SVG files.
|
|
49
|
+
export const getPictogramColors = (brand: PictogramBrand): PictogramColors => {
|
|
50
|
+
const tokenPath = `Tokens.${brandTokenNames[brand]}.light-mode.color`;
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
base: resolveToken(`${tokenPath}.pictogram.surface-pictogram-base`),
|
|
54
|
+
accent: resolveToken(`${tokenPath}.pictogram.surface-pictogram-accent`),
|
|
55
|
+
mono: resolveToken(`${tokenPath}.surface.surface-mono`),
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -19,7 +19,7 @@ const exportZip = (zipRoot: string, zipFiles: string[], zipStoragePath: string,
|
|
|
19
19
|
const filePath = path.resolve(file);
|
|
20
20
|
const fileData = fs.readFileSync(filePath);
|
|
21
21
|
const relativePath = path.relative('assets', file);
|
|
22
|
-
const zipPathInArchive = path.join(zipRoot, type, relativePath.replace(`${type}
|
|
22
|
+
const zipPathInArchive = path.join(zipRoot, type, relativePath.replace(`${type}${path.sep}`, ''));
|
|
23
23
|
zip.addFile(zipPathInArchive, fileData);
|
|
24
24
|
});
|
|
25
25
|
|