@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.
@@ -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 './dateUtils';
7
+ export * from './tracking';
@@ -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("./dateUtils"), exports);
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,6CAA0B;AAC1B,4CAAyB;AACzB,wDAAqC;AACrC,mDAAgC;AAChC,kDAA+B;AAC/B,8CAA2B"}
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,6 @@
1
+ export var getFontFamilyFromNextFont = function (font) {
2
+ return Array.from(Array.isArray(font) ? font : [font], function (f) { return ({
3
+ family: f.style.fontFamily.split(',')[0].replace(/'/g, ''),
4
+ }); });
5
+ };
6
+ //# sourceMappingURL=getFontFamily.js.map
@@ -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 './dateUtils';
7
+ export * from './tracking';
@@ -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 './dateUtils';
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,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/shared-components",
3
- "version": "4.9.0",
3
+ "version": "4.9.1-alpha.0",
4
4
  "description": "Newskit Render Shared Components",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",