@elliemae/ds-hooks-fontsize-detector 3.28.1-rc.2 → 3.29.0-next.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.
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/typescript-testing/typescript-fontsize-detector-valid.js +55 -0
- package/dist/cjs/typescript-testing/typescript-fontsize-detector-valid.js.map +7 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typescript-testing/typescript-fontsize-detector-valid.js +32 -0
- package/dist/esm/typescript-testing/typescript-fontsize-detector-valid.js.map +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/typescript-testing/typescript-fontsize-detector-valid.d.ts +1 -0
- package/package.json +4 -4
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { useFontSizeDetector } from './DSHooksFontsizeDetector.js';\nexport { FONT_DETECTOR_UID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { useFontSizeDetector } from './DSHooksFontsizeDetector.js';\nexport { FONT_DETECTOR_UID } from './constants/index.js';\nexport type { DSHooksFontsizeDetectorT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,qCAAoC;AACpC,uBAAkC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import__ = require("../index.js");
|
|
27
|
+
const testExplicitDefinition = {
|
|
28
|
+
ratio: 0,
|
|
29
|
+
fontHeight: 0,
|
|
30
|
+
documentWidthRatio: 0,
|
|
31
|
+
isSmall: false,
|
|
32
|
+
isMedium: false,
|
|
33
|
+
isLarge: false
|
|
34
|
+
};
|
|
35
|
+
const testInferedTypeCompatibility = {
|
|
36
|
+
ratio: 0,
|
|
37
|
+
fontHeight: 0,
|
|
38
|
+
documentWidthRatio: 0,
|
|
39
|
+
isSmall: false,
|
|
40
|
+
isMedium: false,
|
|
41
|
+
isLarge: false
|
|
42
|
+
};
|
|
43
|
+
const testDefinitionAsConst = {
|
|
44
|
+
ratio: 0,
|
|
45
|
+
fontHeight: 0,
|
|
46
|
+
documentWidthRatio: 0,
|
|
47
|
+
isSmall: false,
|
|
48
|
+
isMedium: false,
|
|
49
|
+
isLarge: false
|
|
50
|
+
};
|
|
51
|
+
const ExampleUsageComponent = () => {
|
|
52
|
+
const metaInfo = (0, import__.useFontSizeDetector)();
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=typescript-fontsize-detector-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fontsize-detector-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { useFontSizeDetector } from '../index.js';\nimport type { DSHooksFontsizeDetectorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSHooksFontsizeDetectorT.UseFontSizeDetectorT;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n} as const;\n\nconst ExampleUsageComponent = () => {\n const metaInfo = useFontSizeDetector();\n return <></>;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACsCd;AArCT,eAAoC;AAOpC,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB,MAAM;AAClC,QAAM,eAAW,8BAAoB;AACrC,SAAO,2EAAE;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { useFontSizeDetector } from './DSHooksFontsizeDetector.js';\nexport { FONT_DETECTOR_UID } from './constants/index.js';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { useFontSizeDetector } from './DSHooksFontsizeDetector.js';\nexport { FONT_DETECTOR_UID } from './constants/index.js';\nexport type { DSHooksFontsizeDetectorT } from './react-desc-prop-types.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACGvB,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useFontSizeDetector } from "../index.js";
|
|
4
|
+
const testExplicitDefinition = {
|
|
5
|
+
ratio: 0,
|
|
6
|
+
fontHeight: 0,
|
|
7
|
+
documentWidthRatio: 0,
|
|
8
|
+
isSmall: false,
|
|
9
|
+
isMedium: false,
|
|
10
|
+
isLarge: false
|
|
11
|
+
};
|
|
12
|
+
const testInferedTypeCompatibility = {
|
|
13
|
+
ratio: 0,
|
|
14
|
+
fontHeight: 0,
|
|
15
|
+
documentWidthRatio: 0,
|
|
16
|
+
isSmall: false,
|
|
17
|
+
isMedium: false,
|
|
18
|
+
isLarge: false
|
|
19
|
+
};
|
|
20
|
+
const testDefinitionAsConst = {
|
|
21
|
+
ratio: 0,
|
|
22
|
+
fontHeight: 0,
|
|
23
|
+
documentWidthRatio: 0,
|
|
24
|
+
isSmall: false,
|
|
25
|
+
isMedium: false,
|
|
26
|
+
isLarge: false
|
|
27
|
+
};
|
|
28
|
+
const ExampleUsageComponent = () => {
|
|
29
|
+
const metaInfo = useFontSizeDetector();
|
|
30
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=typescript-fontsize-detector-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-fontsize-detector-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { useFontSizeDetector } from '../index.js';\nimport type { DSHooksFontsizeDetectorT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSHooksFontsizeDetectorT.UseFontSizeDetectorT;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n ratio: 0,\n fontHeight: 0,\n documentWidthRatio: 0,\n isSmall: false,\n isMedium: false,\n isLarge: false,\n} as const;\n\nconst ExampleUsageComponent = () => {\n const metaInfo = useFontSizeDetector();\n return <></>;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsCd;AArCT,SAAS,2BAA2B;AAOpC,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AACX;AAEA,MAAM,wBAAwB,MAAM;AAClC,QAAM,WAAW,oBAAoB;AACrC,SAAO,gCAAE;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-hooks-fontsize-detector",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Hooks Fontsize Detector",
|
|
6
6
|
"files": [
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@xstyled/system": "3.7.0",
|
|
39
|
-
"@elliemae/ds-utilities": "3.
|
|
39
|
+
"@elliemae/ds-utilities": "3.29.0-next.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
43
43
|
"styled-components": "~5.3.9",
|
|
44
44
|
"styled-system": "~5.1.5",
|
|
45
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
45
|
+
"@elliemae/ds-monorepo-devops": "3.29.0-next.2"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"lodash": "^4.17.21",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public",
|
|
56
|
-
"typeSafety":
|
|
56
|
+
"typeSafety": true
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|