@central-icons-react/all 0.0.5

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,4 @@
1
+ export {
2
+ default,
3
+ default as icons,
4
+ } from "@central-icons-react/round-filled-radius-0-stroke-1/icons";
@@ -0,0 +1,2 @@
1
+ export { default, default as icons, } from "@central-icons-react/round-filled-radius-0-stroke-1/icons";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,OAAO,IAAI,KAAK,GACjB,MAAM,2DAA2D,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { AddKeyframe } from "@central-icons-react/round-filled-radius-0-stroke-1/AddKeyframe";
2
+ export type {
3
+ IconName,
4
+ IconCategory,
5
+ } from "@central-icons-react/round-filled-radius-0-stroke-1";
6
+ export type CentralIconJoin = "round" | "square";
7
+ export type CentralIconFill = "filled" | "outlined";
8
+ export type CentralIconRadius = "0" | "1" | "2" | "3";
9
+ export type CentralIconStroke = "1" | "1.5" | "2";
10
+ export type CentralIconProps = {
11
+ join: CentralIconJoin;
12
+ fill: CentralIconFill;
13
+ radius: CentralIconRadius;
14
+ stroke: CentralIconStroke;
15
+ } & typeof AddKeyframe;
16
+ export declare const CentralIcon: React.FC<CentralIconProps>;
17
+ export default CentralIcon;
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var u=(r,e)=>{for(var o in e)a(r,o,{get:e[o],enumerable:!0})},C=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!s.call(r,t)&&t!==o&&a(r,t,{get:()=>e[t],enumerable:!(n=i(e,t))||n.enumerable});return r};var I=r=>C(a({},"__esModule",{value:!0}),r);var y={};u(y,{CentralIcon:()=>l,default:()=>f});module.exports=I(y);var l=({name:r,join:e,fill:o,radius:n,stroke:t,...c})=>{let d=`@central-icons-react/${e}-${o}-radius-${n}-stroke-${t}/${r}`;return require(d).default(c)},f=l;0&&(module.exports={CentralIcon});
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { AddKeyframe } from \"@central-icons-react/round-filled-radius-0-stroke-1/AddKeyframe\";\nexport type {\n IconName,\n IconCategory,\n} from \"@central-icons-react/round-filled-radius-0-stroke-1\";\n\nexport type CentralIconJoin = \"round\" | \"square\";\nexport type CentralIconFill = \"filled\" | \"outlined\";\nexport type CentralIconRadius = \"0\" | \"1\" | \"2\" | \"3\";\nexport type CentralIconStroke = \"1\" | \"1.5\" | \"2\";\n\nexport type CentralIconProps = {\n join: CentralIconJoin;\n fill: CentralIconFill;\n radius: CentralIconRadius;\n stroke: CentralIconStroke;\n} & typeof AddKeyframe;\n\nexport const CentralIcon: React.FC<CentralIconProps> = ({\n name,\n join,\n fill,\n radius,\n stroke,\n ...props\n}) => {\n const packageName = `@central-icons-react/${join}-${fill}-radius-${radius}-stroke-${stroke}/${name}`;\n return require(packageName).default(props);\n};\n\nexport default CentralIcon;\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAkBO,IAAME,EAA0C,CAAC,CACtD,KAAAG,EACA,KAAAC,EACA,KAAAC,EACA,OAAAC,EACA,OAAAC,EACA,GAAGC,CACL,IAAM,CACJ,IAAMC,EAAc,wBAAwBL,CAAI,IAAIC,CAAI,WAAWC,CAAM,WAAWC,CAAM,IAAIJ,CAAI,GAClG,OAAO,QAAQM,CAAW,EAAE,QAAQD,CAAK,CAC3C,EAEOP,EAAQD","names":["index_exports","__export","CentralIcon","index_default","__toCommonJS","name","join","fill","radius","stroke","props","packageName"]}
@@ -0,0 +1,37 @@
1
+ const licenseKey = process.env.CENTRAL_LICENSE_KEY;
2
+
3
+ if (!licenseKey) {
4
+ throw new Error(
5
+ "Central Icons license key is not set. Please set CENTRAL_LICENSE_KEY in your environment",
6
+ );
7
+ }
8
+
9
+ const licenseCheck = async () => {
10
+ const controller = new AbortController();
11
+ const timeoutId = setTimeout(() => controller.abort(), 5000);
12
+
13
+ const response = await fetch("https://centralicons.com/license/check", {
14
+ method: "POST",
15
+ body: JSON.stringify({ licenseKey }),
16
+ signal: controller.signal,
17
+ });
18
+
19
+ clearTimeout(timeoutId);
20
+
21
+ if (controller.signal.aborted) {
22
+ // throw new Error("License check timed out");
23
+ return;
24
+ }
25
+
26
+ if (!response.ok) {
27
+ throw new Error("Failed to check license");
28
+ }
29
+
30
+ const data = await response.json();
31
+
32
+ if (data.status === "error") {
33
+ throw new Error("Invalid license key");
34
+ }
35
+ };
36
+
37
+ licenseCheck();
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@central-icons-react/all",
3
+ "version": "0.0.5",
4
+ "license": "SEE LICENSE IN LICENSE.md",
5
+ "sideEffects": false,
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "require": "./dist/index.js"
14
+ },
15
+ "./*": {
16
+ "types": "./dist/*/index.d.ts",
17
+ "import": "./dist/*/index.mjs",
18
+ "require": "./dist/*/index.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "license-check.js",
24
+ "README.md",
25
+ "LICENSE.md"
26
+ ],
27
+ "scripts": {
28
+ "preinstall": "node ./license-check.js",
29
+ "prebuild": "tsc",
30
+ "build": "tsup",
31
+ "prepublishOnly": "npm run build",
32
+ "postbuild": "prettier --write dist/**/*.d.ts dist/*.d.ts",
33
+ "dev": "tsup --watch",
34
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
35
+ "lint": "prettier --write ."
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^16.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@central-icons-react/round-filled-radius-0-stroke-1.5": "0.0.5",
42
+ "@central-icons-react/round-filled-radius-0-stroke-1": "0.0.5",
43
+ "@central-icons-react/round-filled-radius-0-stroke-2": "0.0.5",
44
+ "@central-icons-react/round-filled-radius-1-stroke-1.5": "0.0.5",
45
+ "@central-icons-react/round-filled-radius-1-stroke-1": "0.0.5",
46
+ "@central-icons-react/round-filled-radius-1-stroke-2": "0.0.5",
47
+ "@central-icons-react/round-filled-radius-2-stroke-1.5": "0.0.5",
48
+ "@central-icons-react/round-filled-radius-2-stroke-1": "0.0.5",
49
+ "@central-icons-react/round-filled-radius-2-stroke-2": "0.0.5",
50
+ "@central-icons-react/round-filled-radius-3-stroke-1.5": "0.0.5",
51
+ "@central-icons-react/round-filled-radius-3-stroke-1": "0.0.5",
52
+ "@central-icons-react/round-filled-radius-3-stroke-2": "0.0.5",
53
+ "@central-icons-react/round-outline-radius-0-stroke-1.5": "0.0.5",
54
+ "@central-icons-react/round-outline-radius-0-stroke-1": "0.0.5",
55
+ "@central-icons-react/round-outline-radius-0-stroke-2": "0.0.5",
56
+ "@central-icons-react/round-outline-radius-1-stroke-1.5": "0.0.5",
57
+ "@central-icons-react/round-outline-radius-1-stroke-1": "0.0.5",
58
+ "@central-icons-react/round-outline-radius-1-stroke-2": "0.0.5",
59
+ "@central-icons-react/round-outline-radius-2-stroke-1.5": "0.0.5",
60
+ "@central-icons-react/round-outline-radius-2-stroke-1": "0.0.5",
61
+ "@central-icons-react/round-outline-radius-2-stroke-2": "0.0.5",
62
+ "@central-icons-react/round-outline-radius-3-stroke-1.5": "0.0.5",
63
+ "@central-icons-react/round-outline-radius-3-stroke-1": "0.0.5",
64
+ "@central-icons-react/round-outline-radius-3-stroke-2": "0.0.5",
65
+ "@central-icons-react/square-filled-radius-0-stroke-1.5": "0.0.5",
66
+ "@central-icons-react/square-filled-radius-0-stroke-1": "0.0.5",
67
+ "@central-icons-react/square-filled-radius-0-stroke-2": "0.0.5",
68
+ "@central-icons-react/square-outline-radius-0-stroke-1.5": "0.0.5",
69
+ "@central-icons-react/square-outline-radius-0-stroke-1": "0.0.5",
70
+ "@central-icons-react/square-outline-radius-0-stroke-2": "0.0.5"
71
+ },
72
+ "devDependencies": {
73
+ "@types/node": "^20.0.0",
74
+ "@types/react": "^16.0.0",
75
+ "tsup": "^8.0.0",
76
+ "typescript": "^5.0.0",
77
+ "prettier": "^3.0.0"
78
+ }
79
+ }