@atb-as/generate-assets 5.1.0-alpha.2 → 5.1.0-alpha.8
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/files/atb/colors/images/DashboardBackground.svg +3 -0
- package/files/common/colors/icons/ticketing/VippsLogo.svg +1 -0
- package/files/common/mono/ticketing/Receipt.svg +3 -0
- package/files/nfk/colors/images/DashboardBackground.svg +1 -0
- package/lib/bin.js +0 -0
- package/package.json +2 -2
- package/lib/list-files.d.ts +0 -9
- package/lib/list-files.js +0 -36
- package/lib/list-files.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="321" height="160" viewBox="0 0 321 160" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M33.0315 133.25C19.8242 141.635 8.20779 151.714 0.204774 160L0.1875 116.892C5.29768 112.844 10.4277 109.178 15.5604 105.914L16.3088 105.419C23.8734 100.269 31.9836 95.9744 41.0993 92.2922C68.3866 81.2659 99.8662 77.9148 133.191 74.3706L133.294 74.3596C140.125 73.6333 147.18 72.8828 154.324 72.0474C186.066 68.3401 231.952 60.6687 270.324 45.168L272.057 44.2688C295.035 33.4556 313.218 19.7549 320.187 0L320.188 54.1558C307.362 63.4724 296.541 69.573 282.447 75.2683C240.734 92.1199 191.794 100.349 158.079 104.287C150.908 105.126 143.902 105.871 137.118 106.593L136.966 106.609L136.895 106.616L136.619 106.646C105.603 109.945 76.3116 113.062 53.2217 122.394C46.2387 125.214 40.0954 128.461 34.4394 132.321L34.2302 132.463L33.0315 133.25Z" fill="white" fill-opacity="0.2"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="16" viewBox="0 0 64 16" width="64" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="m64 3.83839c-.7202-2.74771-2.4686-3.83839-4.8553-3.83839-1.9336 0-4.3605 1.09068-4.3605 3.71715 0 1.69686 1.1723 3.03045 3.0852 3.37402l1.8103.32301c1.2344.22211 1.5842.68692 1.5842 1.31323 0 .70706-.7612 1.11103-1.8926 1.11103-1.4809 0-2.4067-.5252-2.5508-2.00016l-2.6124.40419c.4112 2.84833 2.9619 4.02043 5.2658 4.02043 2.1808 0 4.5053-1.2528 4.5053-3.77796 0-1.71743-1.0494-2.96961-3.0036-3.33375l-1.9951-.36327c-1.1111-.20199-1.4812-.74754-1.4812-1.27275 0-.6668.7198-1.09068 1.7073-1.09068 1.255 0 2.1395.42388 2.1806 1.81787zm-58.075 4.32289 2.7149-7.858411h3.1884l-4.73144 11.656531h-2.3654l-4.73146-11.656312h3.18843zm16.6834-4.52488c0 .92918-.7406 1.57562-1.6047 1.57562-.864 0-1.6043-.64644-1.6043-1.57562 0-.92939.7403-1.57562 1.6043-1.57562.8641 0 1.6049.64623 1.6049 1.57562zm.4936 4.12135c-1.0699 1.37336-2.2013 2.32285-4.1967 2.32295-2.036 0-3.6204-1.21214-4.8546-2.98975-.4939-.72741-1.255-.88891-1.8105-.50507-.5142.36371-.6374 1.13138-.1645 1.79818 1.7073 2.56564 4.0729 4.06024 6.8294 4.06024 2.5305 0 4.5055-1.2119 6.0481-3.23217.5759-.74732.5553-1.515 0-1.93932-.5144-.40441-1.2755-.26239-1.8512.48494zm7.098-1.65681c0 2.384 1.3989 3.63662 2.9625 3.63662 1.4809 0 3.0034-1.17187 3.0034-3.63662 0-2.42449-1.5225-3.59592-2.9831-3.59592-1.5839 0-2.9828 1.11103-2.9828 3.59592zm0-4.18153v-1.596408h-2.9004v15.676998h2.9004v-5.576c.9669 1.2932 2.2217 1.8389 3.6409 1.8389 2.6541 0 5.2459-2.0608 5.2459-6.30311 0-4.06095-2.6948-5.95957116-4.9989-5.95957116-1.8309 0-3.0855.82807716-3.8879 1.91919116zm13.9275 4.18153c0 2.384 1.3987 3.63662 2.9623 3.63662 1.4809 0 3.0032-1.17187 3.0032-3.63662 0-2.42449-1.5223-3.59592-2.9828-3.59592-1.584 0-2.9829 1.11103-2.9829 3.59592zm0-4.18153v-1.596408h-.0002-2.9004v15.676998h2.9004v-5.576c.967 1.2932 2.2217 1.8389 3.641 1.8389 2.6539 0 5.2459-2.0608 5.2459-6.30311 0-4.06095-2.6948-5.95957116-4.999-5.95957116-1.8309 0-3.0854.82807716-3.8877 1.91919116z" fill="white" fill-rule="evenodd"/></svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4807 6.18946L30 5.89272V34.1073L29.4807 33.8105C27.9435 32.9322 26.0565 32.9322 24.5193 33.8105L23.5 34.393L22.4807 33.8105C20.9435 32.9322 19.0565 32.9322 17.5193 33.8105L16.5 34.393L15.4807 33.8105C13.9435 32.9322 12.0565 32.9322 10.5193 33.8105L10 34.1073V5.89272L10.5193 6.18946C12.0565 7.06784 13.9435 7.06784 15.4807 6.18946L16.5 5.607L17.5193 6.18946C19.0565 7.06784 20.9435 7.06784 22.4807 6.18946L23.5 5.607L24.5193 6.18946C26.0565 7.06784 27.9435 7.06784 29.4807 6.18946ZM6 2C6 1.44772 6.44772 1 7 1H9.23444C9.40846 1 9.57948 1.04542 9.73057 1.13176L12.5039 2.71649C12.8113 2.89217 13.1887 2.89217 13.4961 2.71649L16.0039 1.28351C16.3113 1.10783 16.6887 1.10783 16.9961 1.28351L19.5039 2.71649C19.8113 2.89217 20.1887 2.89217 20.4961 2.71649L23.0039 1.28351C23.3113 1.10783 23.6887 1.10783 23.9961 1.28351L26.5039 2.71649C26.8113 2.89217 27.1887 2.89217 27.4961 2.71649L30.2694 1.13176C30.4205 1.04542 30.5915 1 30.7656 1H33C33.5523 1 34 1.44772 34 2V38C34 38.5523 33.5523 39 33 39H30.7656C30.5915 39 30.4205 38.9546 30.2694 38.8682L27.4961 37.2835C27.1887 37.1078 26.8113 37.1078 26.5039 37.2835L23.9961 38.7165C23.6887 38.8922 23.3113 38.8922 23.0039 38.7165L20.4961 37.2835C20.1887 37.1078 19.8113 37.1078 19.5039 37.2835L16.9961 38.7165C16.6887 38.8922 16.3113 38.8922 16.0039 38.7165L13.4961 37.2835C13.1887 37.1078 12.8113 37.1078 12.5039 37.2835L9.73057 38.8682C9.57948 38.9546 9.40846 39 9.23444 39H7C6.44772 39 6 38.5523 6 38V2ZM16 11C14.8954 11 14 11.8954 14 13C14 14.1046 14.8954 15 16 15H24C25.1046 15 26 14.1046 26 13C26 11.8954 25.1046 11 24 11H16ZM14 19C14 17.8954 14.8954 17 16 17H24C25.1046 17 26 17.8954 26 19C26 20.1046 25.1046 21 24 21H16C14.8954 21 14 20.1046 14 19ZM16 23C14.8954 23 14 23.8954 14 25C14 26.1046 14.8954 27 16 27H20C21.1046 27 22 26.1046 22 25C22 23.8954 21.1046 23 20 23H16Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="500" height="500" viewBox="0 0 1025 564" fill="none" xmlns="http://www.w3.org/2000/svg" />
|
package/lib/bin.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atb-as/generate-assets",
|
|
3
|
-
"version": "5.1.0-alpha.
|
|
3
|
+
"version": "5.1.0-alpha.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OOS Design System generate-assets",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"normalize-path": "^3.0.0",
|
|
35
35
|
"stream-editor": "^1.11.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "e6e8d6cb288cb42ebf3b81e274e87e7dd7b66ca0"
|
|
38
38
|
}
|
package/lib/list-files.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ThemeVariant } from '@atb-as/theme/lib/';
|
|
2
|
-
import { AssetTypes } from './utils';
|
|
3
|
-
export declare const vaildOrgIds: ThemeVariant[];
|
|
4
|
-
export declare const searchGlob = "**/*.{svg,png,jpg,jpeg,ico}";
|
|
5
|
-
declare type Options = {
|
|
6
|
-
patterns?: string | readonly string[];
|
|
7
|
-
};
|
|
8
|
-
export declare function listAssets(orgId: ThemeVariant, assetType?: AssetTypes, opts?: Options): Promise<Promise<string>[]>;
|
|
9
|
-
export {};
|
package/lib/list-files.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.listAssets = exports.searchGlob = exports.vaildOrgIds = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const lib_1 = require("@atb-as/theme/lib/");
|
|
9
|
-
const micromatch_1 = __importDefault(require("micromatch"));
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
exports.vaildOrgIds = [lib_1.ThemeVariant.AtB, lib_1.ThemeVariant.Nfk];
|
|
12
|
-
exports.searchGlob = '**/*.{svg,png,jpg,jpeg,ico}';
|
|
13
|
-
const defaultOpts = {};
|
|
14
|
-
async function listAssets(orgId, assetType = 'all', opts = defaultOpts) {
|
|
15
|
-
const assetDir = assetType == 'all' ? '{colors,mono}' : assetType;
|
|
16
|
-
const fromBase = (...p) => {
|
|
17
|
-
const fullPath = path_1.default.join(__dirname, '..', 'files', ...p, assetDir, exports.searchGlob);
|
|
18
|
-
console.log(fullPath);
|
|
19
|
-
return (0, utils_1.fgNormalizedForUnix)(fullPath);
|
|
20
|
-
};
|
|
21
|
-
if (!exports.vaildOrgIds.includes(orgId))
|
|
22
|
-
throw new Error(`Invalid orgId provided, valid orgIds are ${exports.vaildOrgIds}`);
|
|
23
|
-
// File paths are returned as UNIX type separators.
|
|
24
|
-
const commonFiles = await fromBase('common');
|
|
25
|
-
const orgFiles = await fromBase((0, utils_1.themeVariantAsString)(orgId));
|
|
26
|
-
const allFilesToBeCopied = (0, utils_1.mergeFiles)(assetType, commonFiles, orgFiles);
|
|
27
|
-
const potentiallyFiltered = opts.patterns
|
|
28
|
-
? (0, micromatch_1.default)(allFilesToBeCopied, opts.patterns)
|
|
29
|
-
: allFilesToBeCopied;
|
|
30
|
-
let allFiles = potentiallyFiltered.map(async (absolutePath) => {
|
|
31
|
-
return path_1.default.normalize((0, utils_1.getGeneralNameWithoutFullPath)(assetType, absolutePath));
|
|
32
|
-
});
|
|
33
|
-
return allFiles;
|
|
34
|
-
}
|
|
35
|
-
exports.listAssets = listAssets;
|
|
36
|
-
//# sourceMappingURL=list-files.js.map
|
package/lib/list-files.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-files.js","sourceRoot":"","sources":["../src/list-files.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,4CAAgD;AAEhD,4DAAoC;AAEpC,mCAMiB;AAEJ,QAAA,WAAW,GAAG,CAAC,kBAAY,CAAC,GAAG,EAAE,kBAAY,CAAC,GAAG,CAAC,CAAC;AACnD,QAAA,UAAU,GAAG,6BAA6B,CAAC;AAKxD,MAAM,WAAW,GAAY,EAAE,CAAC;AAEzB,KAAK,UAAU,UAAU,CAC9B,KAAmB,EACnB,YAAwB,KAAK,EAC7B,OAAgB,WAAW;IAE3B,MAAM,QAAQ,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAW,EAAE,EAAE;QAClC,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CACxB,SAAS,EACT,IAAI,EACJ,OAAO,EACP,GAAG,CAAC,EACJ,QAAQ,EACR,kBAAU,CACX,CAAC;QAEF,OAA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