Skip to content

Commit

Permalink
fix(lib): include more missing React imports for classic JSX runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
rektdeckard committed Apr 18, 2024
1 parent 18588f8 commit 939dd15
Show file tree
Hide file tree
Showing 4,542 changed files with 65,027 additions and 10,597 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions scripts/assemble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ${Object.entries(icon)

let csrString = `
/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/${name}";
Expand All @@ -93,7 +93,7 @@ export { I as ${name}${

let ssrString = `
/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import SSRBase from "../lib/SSRBase";
import weights from "../defs/${name}";
Expand Down
10 changes: 6 additions & 4 deletions scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import chalk from "chalk";
import { IconStyle, icons } from "../core/src";
import * as Core from "../core/src";

const { IconStyle, icons } = (Core as any).default as typeof Core;

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -21,7 +23,7 @@ export const ALIASES = icons.reduce<Record<string, string>>((acc, curr) => {
return acc;
}, {});

export type AssetMap = Record<string, Record<IconStyle, string>>;
export type AssetMap = Record<string, Record<Core.IconStyle, string>>;

export function readAssetsFromDisk(): AssetMap {
const assetsFolder = fs.readdirSync(ASSETS_PATH, "utf-8");
Expand All @@ -31,7 +33,7 @@ export function readAssetsFromDisk(): AssetMap {
assetsFolder.forEach((weight) => {
if (!fs.lstatSync(path.join(ASSETS_PATH, weight)).isDirectory()) return;

if (!WEIGHTS.includes(weight as IconStyle)) {
if (!WEIGHTS.includes(weight as Core.IconStyle)) {
console.error(`${chalk.inverse.red(" ERR ")} Bad folder name ${weight}`);
process.exit(1);
}
Expand Down Expand Up @@ -88,7 +90,7 @@ export function verifyIcons(icons: AssetMap) {
!(
weightsPresent.length === 6 &&
weightsPresent.every(
(w) => WEIGHTS.includes(w as IconStyle) && !!icon[w]
(w) => WEIGHTS.includes(w as Core.IconStyle) && !!icon[w]
)
)
) {
Expand Down
5 changes: 2 additions & 3 deletions src/csr/Acorn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/Acorn";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "Acorn";
export { I as Acorn }
export { I as Acorn };
5 changes: 2 additions & 3 deletions src/csr/AddressBook.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AddressBook";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AddressBook";
export { I as AddressBook }
export { I as AddressBook };
5 changes: 2 additions & 3 deletions src/csr/AddressBookTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AddressBookTabs";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AddressBookTabs";
export { I as AddressBookTabs }
export { I as AddressBookTabs };
5 changes: 2 additions & 3 deletions src/csr/AirTrafficControl.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirTrafficControl";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirTrafficControl";
export { I as AirTrafficControl }
export { I as AirTrafficControl };
5 changes: 2 additions & 3 deletions src/csr/Airplane.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/Airplane";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "Airplane";
export { I as Airplane }
export { I as Airplane };
5 changes: 2 additions & 3 deletions src/csr/AirplaneInFlight.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirplaneInFlight";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirplaneInFlight";
export { I as AirplaneInFlight }
export { I as AirplaneInFlight };
5 changes: 2 additions & 3 deletions src/csr/AirplaneLanding.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirplaneLanding";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirplaneLanding";
export { I as AirplaneLanding }
export { I as AirplaneLanding };
5 changes: 2 additions & 3 deletions src/csr/AirplaneTakeoff.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirplaneTakeoff";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirplaneTakeoff";
export { I as AirplaneTakeoff }
export { I as AirplaneTakeoff };
5 changes: 2 additions & 3 deletions src/csr/AirplaneTaxiing.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirplaneTaxiing";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirplaneTaxiing";
export { I as AirplaneTaxiing }
export { I as AirplaneTaxiing };
5 changes: 2 additions & 3 deletions src/csr/AirplaneTilt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AirplaneTilt";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AirplaneTilt";
export { I as AirplaneTilt }
export { I as AirplaneTilt };
5 changes: 2 additions & 3 deletions src/csr/Airplay.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/Airplay";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "Airplay";
export { I as Airplay }
export { I as Airplay };
5 changes: 2 additions & 3 deletions src/csr/Alarm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/Alarm";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "Alarm";
export { I as Alarm }
export { I as Alarm };
5 changes: 2 additions & 3 deletions src/csr/Alien.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/Alien";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "Alien";
export { I as Alien }
export { I as Alien };
5 changes: 2 additions & 3 deletions src/csr/AlignBottom.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignBottom";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignBottom";
export { I as AlignBottom }
export { I as AlignBottom };
5 changes: 2 additions & 3 deletions src/csr/AlignBottomSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignBottomSimple";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignBottomSimple";
export { I as AlignBottomSimple }
export { I as AlignBottomSimple };
5 changes: 2 additions & 3 deletions src/csr/AlignCenterHorizontal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignCenterHorizontal";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignCenterHorizontal";
export { I as AlignCenterHorizontal }
export { I as AlignCenterHorizontal };
5 changes: 2 additions & 3 deletions src/csr/AlignCenterHorizontalSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignCenterHorizontalSimple";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignCenterHorizontalSimple";
export { I as AlignCenterHorizontalSimple }
export { I as AlignCenterHorizontalSimple };
5 changes: 2 additions & 3 deletions src/csr/AlignCenterVertical.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignCenterVertical";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignCenterVertical";
export { I as AlignCenterVertical }
export { I as AlignCenterVertical };
5 changes: 2 additions & 3 deletions src/csr/AlignCenterVerticalSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignCenterVerticalSimple";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignCenterVerticalSimple";
export { I as AlignCenterVerticalSimple }
export { I as AlignCenterVerticalSimple };
5 changes: 2 additions & 3 deletions src/csr/AlignLeft.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignLeft";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignLeft";
export { I as AlignLeft }
export { I as AlignLeft };
5 changes: 2 additions & 3 deletions src/csr/AlignLeftSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignLeftSimple";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignLeftSimple";
export { I as AlignLeftSimple }
export { I as AlignLeftSimple };
5 changes: 2 additions & 3 deletions src/csr/AlignRight.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignRight";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignRight";
export { I as AlignRight }
export { I as AlignRight };
5 changes: 2 additions & 3 deletions src/csr/AlignRightSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignRightSimple";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignRightSimple";
export { I as AlignRightSimple }
export { I as AlignRightSimple };
5 changes: 2 additions & 3 deletions src/csr/AlignTop.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

/* GENERATED FILE */
import { forwardRef } from "react";
import React, { forwardRef } from "react";
import type { Icon } from "../lib/types";
import IconBase from "../lib/IconBase";
import weights from "../defs/AlignTop";
Expand All @@ -10,4 +9,4 @@ const I: Icon = forwardRef((props, ref) => (
));

I.displayName = "AlignTop";
export { I as AlignTop }
export { I as AlignTop };
Loading

0 comments on commit 939dd15

Please sign in to comment.