Skip to content

Commit

Permalink
Merge pull request #7 from phun-ky/fix/default-export
Browse files Browse the repository at this point in the history
Fix default export
  • Loading branch information
phun-ky authored Nov 24, 2023
2 parents fb6f35b + 493913f commit 6d245fc
Show file tree
Hide file tree
Showing 19 changed files with 405 additions and 28 deletions.
399 changes: 394 additions & 5 deletions README.md

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@phun-ky/moebius",
"version": "0.1.0",
"description": "asd",
"description": "Automatically generate color palettes!",
"main": "moebius.js",
"types": "moebius.d.ts",
"publishConfig": {
Expand Down Expand Up @@ -48,7 +48,6 @@
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"git-cz": "^4.9.0",
"network-information-types": "^0.1.1",
"prettier": "^2.4.1",
"prettier-eslint": "^13.0.0",
"release-it": "^17.0.0",
Expand Down
Binary file added public/images/accents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/analogous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/complement.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hexadic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/interpolate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logo/logo-ring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/luminance-shift-diverging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/luminance-shift.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/monochromatic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/pentadic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tetradic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/triadic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions src/classes/MoebiusColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
MoebiusLCHObjectType,
MoebiusColorInterface,
MoebiusRGBObjectType,
MoebiusXYZObjectType
MoebiusXYZObjectType,
MoebiusChromaColorInputType
} from '../types';

import * as CONVERTERS from '../utils/converters';
Expand All @@ -24,7 +25,7 @@ import * as CONVERTERS from '../utils/converters';
* ```
*/
export class MoebiusColor implements MoebiusColorInterface {
color: MoebiusColorValueHexType;
color: MoebiusChromaColorInputType;
name: string;
hex: MoebiusColorValueHexType;
rgb: MoebiusColorValueRgbType;
Expand All @@ -41,12 +42,12 @@ export class MoebiusColor implements MoebiusColorInterface {

/**
* Creates an instance of MoebiusColor.
* @param {MoebiusColorValueHexType} value - The hex value of the color.
* @param {MoebiusChromaColorInputType} value - The hex value of the color.
* @param {string} name - The name of the color
* @constructor
* @throws Will throw an error if init has not been run before creating an instance.
*/
constructor(color: MoebiusColorValueHexType, name: string) {
constructor(color: MoebiusChromaColorInputType, name: string) {
this.color = color;
this.name = name;

Expand Down
9 changes: 4 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import {
import { MoebiusSVGHelper } from './classes/MoebiusSVGHelper';
import { MoebiusPalettes } from './classes/MoebiusPalettes';
import { MoebiusColor } from './classes/MoebiusColor';
import { MoebiusAccentColors } from './classes/MoebiusAccentColors';

export type MoebiusReturnType = Promise<{
MoebiusColor: typeof MoebiusColor;
MoebiusPalettes: typeof MoebiusPalettes;
MoebiusSVGHelper: typeof MoebiusSVGHelper;
MoebiusAccentColors: typeof MoebiusAccentColors;
}>;

const initializeColorNames = async (): Promise<
Expand All @@ -40,7 +38,7 @@ const initializeColorNames = async (): Promise<
* @returns {MoebiusReturnType} An object with Moebius classes
*
*/
export async function Moebius(): MoebiusReturnType {
async function Moebius(): MoebiusReturnType {
const colorNames = await initializeColorNames();

class MoebiusColorAbstract extends MoebiusColor {
Expand All @@ -57,7 +55,8 @@ export async function Moebius(): MoebiusReturnType {
return {
MoebiusColor: MoebiusColorAbstract as typeof MoebiusColor,
MoebiusPalettes,
MoebiusSVGHelper,
MoebiusAccentColors
MoebiusSVGHelper
};
}

export default Moebius;
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"esModuleInterop": true,
"baseUrl": "src/",
"typeRoots": ["./node_modules/@types"],
"resolveJsonModule": true,
"types": ["node", "./node_modules/network-information-types"]
"resolveJsonModule": true
},
"exclude": [
"node_modules",
Expand Down

0 comments on commit 6d245fc

Please sign in to comment.