@newskit-render/shared-components 4.9.0 → 4.9.1-alpha.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/cjs/utils/getFontFamily.d.ts +12 -0
- package/dist/cjs/utils/getFontFamily.js +10 -0
- package/dist/cjs/utils/getFontFamily.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +4 -3
- package/dist/cjs/utils/index.js +4 -3
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/esm/utils/getFontFamily.d.ts +12 -0
- package/dist/esm/utils/getFontFamily.js +6 -0
- package/dist/esm/utils/getFontFamily.js.map +1 -0
- package/dist/esm/utils/index.d.ts +4 -3
- package/dist/esm/utils/index.js +4 -3
- package/dist/esm/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface NextFont {
|
|
2
|
+
className: string;
|
|
3
|
+
style: {
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontWeight?: number;
|
|
6
|
+
fontStyle?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const getFontFamilyFromNextFont: (font: NextFont | Array<NextFont>) => Array<{
|
|
10
|
+
family: string;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFontFamilyFromNextFont = void 0;
|
|
4
|
+
var getFontFamilyFromNextFont = function (font) {
|
|
5
|
+
return Array.from(Array.isArray(font) ? font : [font], function (f) { return ({
|
|
6
|
+
family: f.style.fontFamily.split(',')[0].replace(/'/g, ''),
|
|
7
|
+
}); });
|
|
8
|
+
};
|
|
9
|
+
exports.getFontFamilyFromNextFont = getFontFamilyFromNextFont;
|
|
10
|
+
//# sourceMappingURL=getFontFamily.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFontFamily.js","sourceRoot":"","sources":["../../../src/utils/getFontFamily.ts"],"names":[],"mappings":";;;AASO,IAAM,yBAAyB,GAAG,UACvC,IAAgC;IAEhC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC;QAC7D,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KAC3D,CAAC,EAF4D,CAE5D,CAAC,CAAA;AACL,CAAC,CAAA;AANY,QAAA,yBAAyB,6BAMrC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from './tracking';
|
|
2
|
-
export * from './getHost';
|
|
3
1
|
export * from './checkRequestHeaders';
|
|
2
|
+
export * from './dateUtils';
|
|
4
3
|
export * from './getAspectRatio';
|
|
4
|
+
export * from './getFontFamily';
|
|
5
|
+
export * from './getHost';
|
|
5
6
|
export * from './safeJsonParse';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './tracking';
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -14,10 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./tracking"), exports);
|
|
18
|
-
__exportStar(require("./getHost"), exports);
|
|
19
17
|
__exportStar(require("./checkRequestHeaders"), exports);
|
|
18
|
+
__exportStar(require("./dateUtils"), exports);
|
|
20
19
|
__exportStar(require("./getAspectRatio"), exports);
|
|
20
|
+
__exportStar(require("./getFontFamily"), exports);
|
|
21
|
+
__exportStar(require("./getHost"), exports);
|
|
21
22
|
__exportStar(require("./safeJsonParse"), exports);
|
|
22
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./tracking"), exports);
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,8CAA2B;AAC3B,mDAAgC;AAChC,kDAA+B;AAC/B,4CAAyB;AACzB,kDAA+B;AAC/B,6CAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface NextFont {
|
|
2
|
+
className: string;
|
|
3
|
+
style: {
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontWeight?: number;
|
|
6
|
+
fontStyle?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const getFontFamilyFromNextFont: (font: NextFont | Array<NextFont>) => Array<{
|
|
10
|
+
family: string;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFontFamily.js","sourceRoot":"","sources":["../../../src/utils/getFontFamily.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,IAAM,yBAAyB,GAAG,UACvC,IAAgC;IAEhC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,UAAC,CAAC,IAAK,OAAA,CAAC;QAC7D,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KAC3D,CAAC,EAF4D,CAE5D,CAAC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from './tracking';
|
|
2
|
-
export * from './getHost';
|
|
3
1
|
export * from './checkRequestHeaders';
|
|
2
|
+
export * from './dateUtils';
|
|
4
3
|
export * from './getAspectRatio';
|
|
4
|
+
export * from './getFontFamily';
|
|
5
|
+
export * from './getHost';
|
|
5
6
|
export * from './safeJsonParse';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './tracking';
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from './tracking';
|
|
2
|
-
export * from './getHost';
|
|
3
1
|
export * from './checkRequestHeaders';
|
|
2
|
+
export * from './dateUtils';
|
|
4
3
|
export * from './getAspectRatio';
|
|
4
|
+
export * from './getFontFamily';
|
|
5
|
+
export * from './getHost';
|
|
5
6
|
export * from './safeJsonParse';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './tracking';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA"}
|