From 3d46edca979d361ac8ec8e987776887d6e1f671e Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:55:28 +0100 Subject: [PATCH 01/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus --- package.json | 11 ++- postcss.config.js => postcss.config.mjs | 0 tsconfig-cjs.json | 22 +++++ vite.config.ts | 106 +++++++++++++++++------- 4 files changed, 103 insertions(+), 36 deletions(-) rename postcss.config.js => postcss.config.mjs (100%) create mode 100644 tsconfig-cjs.json diff --git a/package.json b/package.json index a6757c4..29b4b1c 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,7 @@ "name": "@dreampipcom/oneiros", "version": "0.0.1", "description": "DreamPip's Design System Component Library.", - "type": "module", - "main": "dist/index.cjs.js", + "main": "dist/index.cjs", "module": "dist/index.es.js", "types": "dist/index.d.ts", "repository": "https://github.com/dreampipcom/oneiros", @@ -15,8 +14,8 @@ "lint:icons": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix", "format": "prettier --write --parser typescript '**/*.{ts,tsx}' --ignore-path .ignoreicons", "lint": "eslint . --ext .ts,.tsx --ignore-path .ignoreicons --fix", - "build": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build", - "build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch", + "build": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && vite build --mode es", + "build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch --mode es", "test": "vitest run", "test-watch": "vitest", "test:ui": "vitest --ui", @@ -81,7 +80,6 @@ "jsdom": "24.0.0", "lodash": "4.17.21", "mapbox-gl": "^3.5.2", - "moment": "^2.30.1", "postcss": "8.4.38", "prettier": "3.2.5", "react-map-gl": "^7.1.7", @@ -98,7 +96,8 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "tailwindcss": "3.4.4", - "typescript": "5.4.5" + "typescript": "5.4.5", + "moment": "^2.30.1" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.9.5" diff --git a/postcss.config.js b/postcss.config.mjs similarity index 100% rename from postcss.config.js rename to postcss.config.mjs diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json new file mode 100644 index 0000000..b7ce152 --- /dev/null +++ b/tsconfig-cjs.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "ES5", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable"], + "module": "commonjs", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "noEmit": true, + "jsx": "react-jsx", + "noUnusedLocals": false, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "declaration": true, + }, + "include": ["src"], + "exclude": [ + "src/**/__docs__","src/**/__test__", + ] +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 9f7820e..774c4e0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,33 +5,79 @@ import react from '@vitejs/plugin-react'; import dts from 'vite-plugin-dts'; import { peerDependencies } from './package.json'; -export default defineConfig((env) => ({ - build: { - lib: { - entry: './src/index.ts', - name: 'vite-react-ts-button', - fileName: (format) => `index.${format}.js`, - formats: ['cjs', 'es'], - }, - rollupOptions: { - external: [...Object.keys(peerDependencies), 'react/jsx-runtime'], - }, - sourcemap: true, - emptyOutDir: true, - }, - plugins: [ - dts({ - insertTypesEntry: true, - }), - react({ fastRefresh: false }), - env.mode !== 'test' && - eslint({ - exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], - }), - ], - test: { - globals: true, - environment: 'jsdom', - setupFiles: './setupTests.ts', - }, -})); +export default defineConfig((env) => { + console.log({ env }); + return env.MODE == 'es' + ? { + // es-module + build: { + lib: { + entry: './src/index.ts', + name: 'vite-react-ts-button', + fileName: (format) => `index.es.js'}`, + formats: ['es'], + }, + rollupOptions: { + external: [ + ...Object.keys(peerDependencies), + 'react/jsx-runtime', + 'moment', + ], + }, + sourcemap: true, + emptyOutDir: true, + }, + plugins: [ + dts({ + insertTypesEntry: true, + tsconfigPath: './ts-config.json', + }), + react({ fastRefresh: false }), + env.mode !== 'test' && + eslint({ + exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], + }), + ], + test: { + globals: true, + environment: 'jsdom', + setupFiles: './setupTests.ts', + }, + } + : { + build: { + // cjs + lib: { + entry: './src/index.ts', + name: 'vite-react-ts-button', + fileName: (format) => `index.cjs'}`, + formats: ['cjs'], + }, + rollupOptions: { + external: [ + ...Object.keys(peerDependencies), + 'react/jsx-runtime', + 'moment', + ], + }, + sourcemap: true, + emptyOutDir: true, + }, + plugins: [ + dts({ + insertTypesEntry: true, + tsconfigPath: './tsconfig-cjs.json', + }), + react({ fastRefresh: false }), + env.mode !== 'test' && + eslint({ + exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], + }), + ], + test: { + globals: true, + environment: 'jsdom', + setupFiles: './setupTests.ts', + }, + }; +}); From f7bc8e9af4649d5f21a2c8f945f72aa077f79142 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:01:01 +0100 Subject: [PATCH 02/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 29b4b1c..98a4a24 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@dreampipcom/oneiros", "version": "0.0.1", "description": "DreamPip's Design System Component Library.", + "type": "module", "main": "dist/index.cjs", "module": "dist/index.es.js", "types": "dist/index.d.ts", From c825cbaff31784ba3bd5894ed5a39c52f2c3aaa8 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:30:16 +0100 Subject: [PATCH 03/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus --- package.json | 6 +++--- tsconfig-cjs.json | 3 ++- tsconfig.json | 1 + vite.config.ts | 14 ++++++++------ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 98a4a24..39de7b7 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.0.1", "description": "DreamPip's Design System Component Library.", "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.es.js", + "main": "dist/cjs/index.cjs", + "module": "dist/es/index.es.js", "types": "dist/index.d.ts", "repository": "https://github.com/dreampipcom/oneiros", "files": [ @@ -15,7 +15,7 @@ "lint:icons": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix", "format": "prettier --write --parser typescript '**/*.{ts,tsx}' --ignore-path .ignoreicons", "lint": "eslint . --ext .ts,.tsx --ignore-path .ignoreicons --fix", - "build": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && vite build --mode es", + "build": "tsc -p tsconfig-cjs.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && tsc -p tsconfig.json && vite build --mode es", "build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch --mode es", "test": "vitest run", "test-watch": "vitest", diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json index b7ce152..b4c0808 100644 --- a/tsconfig-cjs.json +++ b/tsconfig-cjs.json @@ -5,15 +5,16 @@ "lib": ["DOM", "DOM.Iterable"], "module": "commonjs", "skipLibCheck": true, - "moduleResolution": "bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "noEmit": true, + "esModuleInterop": true, "jsx": "react-jsx", "noUnusedLocals": false, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "declaration": true, + "outDir": "dist/cjs" }, "include": ["src"], "exclude": [ diff --git a/tsconfig.json b/tsconfig.json index 6241c35..1c34050 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,7 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, "declaration": true, + "outDir": "dist/esm" }, "include": ["src"], "exclude": [ diff --git a/vite.config.ts b/vite.config.ts index 774c4e0..df8dd96 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,10 +11,11 @@ export default defineConfig((env) => { ? { // es-module build: { + outDir: './dist/esm', lib: { entry: './src/index.ts', - name: 'vite-react-ts-button', - fileName: (format) => `index.es.js'}`, + name: 'oneiros-esm', + fileName: (format) => `index.es.js`, formats: ['es'], }, rollupOptions: { @@ -25,7 +26,7 @@ export default defineConfig((env) => { ], }, sourcemap: true, - emptyOutDir: true, + emptyOutDir: false, }, plugins: [ dts({ @@ -47,10 +48,11 @@ export default defineConfig((env) => { : { build: { // cjs + outDir: './dist/cjs', lib: { entry: './src/index.ts', - name: 'vite-react-ts-button', - fileName: (format) => `index.cjs'}`, + name: 'oneiros-cjs', + fileName: (format) => `index.cjs`, formats: ['cjs'], }, rollupOptions: { @@ -61,7 +63,7 @@ export default defineConfig((env) => { ], }, sourcemap: true, - emptyOutDir: true, + emptyOutDir: false, }, plugins: [ dts({ From 1045946829119ff97fc2d61440624ad5ee20e33c Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:11:24 +0100 Subject: [PATCH 04/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep --- package.json | 2 +- vite.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 39de7b7..dc6fed4 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "lint:icons": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix", "format": "prettier --write --parser typescript '**/*.{ts,tsx}' --ignore-path .ignoreicons", "lint": "eslint . --ext .ts,.tsx --ignore-path .ignoreicons --fix", - "build": "tsc -p tsconfig-cjs.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && tsc -p tsconfig.json && vite build --mode es", + "build": "tsc -p tsconfig-cjs.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && tsc -p tsconfig.json && vite build --emptyOutDir=false --mode es", "build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch --mode es", "test": "vitest run", "test-watch": "vitest", diff --git a/vite.config.ts b/vite.config.ts index df8dd96..9f74024 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,7 +7,7 @@ import { peerDependencies } from './package.json'; export default defineConfig((env) => { console.log({ env }); - return env.MODE == 'es' + return env.mode == 'es' ? { // es-module build: { @@ -31,7 +31,7 @@ export default defineConfig((env) => { plugins: [ dts({ insertTypesEntry: true, - tsconfigPath: './ts-config.json', + tsconfigPath: './tsconfig.json', }), react({ fastRefresh: false }), env.mode !== 'test' && From 3735592436866fc6a4304b1b792fe3a9cadfc62c Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:45:43 +0100 Subject: [PATCH 05/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep --- package-lock.json | 59 +++++++++++++++++++++++++++++++++++++++++++++-- package.json | 5 ++-- vite.config.ts | 4 +++- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9685907..3e0c256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,12 +51,12 @@ "jsdom": "24.0.0", "lodash": "4.17.21", "mapbox-gl": "^3.5.2", - "moment": "^2.30.1", "postcss": "8.4.38", "prettier": "3.2.5", "react-map-gl": "^7.1.7", "storybook": "^8.1.11", "vite": "5.2.9", + "vite-plugin-commonjs": "^0.10.1", "vite-plugin-dts": "3.8.3", "vite-plugin-eslint": "^1.8.1", "vite-tsconfig-paths": "4.3.2", @@ -68,6 +68,7 @@ "peerDependencies": { "clsx": "2.1.0", "lazysizes": "^5.3.2", + "moment": "^2.30.1", "react": "^18.2.0", "react-dom": "^18.2.0", "tailwindcss": "3.4.4", @@ -10843,7 +10844,7 @@ "version": "2.30.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "dev": true, + "peer": true, "engines": { "node": "*" } @@ -14563,6 +14564,30 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-commonjs": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/vite-plugin-commonjs/-/vite-plugin-commonjs-0.10.1.tgz", + "integrity": "sha512-taP8R9kYGlCW5OzkVR0UIWRCnG6rSxeWWuA7tnU5b9t5MniibOnDY219NhisTeDhJAeGT8cEnrhVWZ9A5yD+vg==", + "dev": true, + "dependencies": { + "acorn": "^8.8.2", + "fast-glob": "^3.2.12", + "magic-string": "^0.30.1", + "vite-plugin-dynamic-import": "^1.5.0" + } + }, + "node_modules/vite-plugin-commonjs/node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/vite-plugin-dts": { "version": "3.8.3", "dev": true, @@ -14589,6 +14614,36 @@ } } }, + "node_modules/vite-plugin-dynamic-import": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vite-plugin-dynamic-import/-/vite-plugin-dynamic-import-1.5.0.tgz", + "integrity": "sha512-Qp85c+AVJmLa8MLni74U4BDiWpUeFNx7NJqbGZyR2XJOU7mgW0cb7nwlAMucFyM4arEd92Nfxp4j44xPi6Fu7g==", + "dev": true, + "dependencies": { + "acorn": "^8.8.2", + "es-module-lexer": "^1.2.1", + "fast-glob": "^3.2.12", + "magic-string": "^0.30.1" + } + }, + "node_modules/vite-plugin-dynamic-import/node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/vite-plugin-dynamic-import/node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, "node_modules/vite-plugin-eslint": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz", diff --git a/package.json b/package.json index dc6fed4..7a7ecfb 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "react-map-gl": "^7.1.7", "storybook": "^8.1.11", "vite": "5.2.9", + "vite-plugin-commonjs": "^0.10.1", "vite-plugin-dts": "3.8.3", "vite-plugin-eslint": "^1.8.1", "vite-tsconfig-paths": "4.3.2", @@ -94,11 +95,11 @@ "peerDependencies": { "clsx": "2.1.0", "lazysizes": "^5.3.2", + "moment": "^2.30.1", "react": "^18.2.0", "react-dom": "^18.2.0", "tailwindcss": "3.4.4", - "typescript": "5.4.5", - "moment": "^2.30.1" + "typescript": "5.4.5" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.9.5" diff --git a/vite.config.ts b/vite.config.ts index 9f74024..11c57cd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,5 @@ /// +import commonjs from 'vite-plugin-commonjs'; import eslint from 'vite-plugin-eslint'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; @@ -70,7 +71,8 @@ export default defineConfig((env) => { insertTypesEntry: true, tsconfigPath: './tsconfig-cjs.json', }), - react({ fastRefresh: false }), + commonjs(), + // react({ fastRefresh: false }), env.mode !== 'test' && eslint({ exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'], From 0d66b95889238b25d9165d7628b9ac2601bb1556 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:33:32 +0100 Subject: [PATCH 06/10] ar(fix) [cherry-pick] date range colors --- src/atoms/05_SystemIcon/SystemIcon.tsx | 2 +- src/atoms/12_DateRange/DateRange.tsx | 12 ++++++------ vite.config.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/atoms/05_SystemIcon/SystemIcon.tsx b/src/atoms/05_SystemIcon/SystemIcon.tsx index ae74c39..c8ed17f 100644 --- a/src/atoms/05_SystemIcon/SystemIcon.tsx +++ b/src/atoms/05_SystemIcon/SystemIcon.tsx @@ -2,7 +2,7 @@ // @atoms/SystemIcon.tsx import { useMemo } from 'react'; import clsx from 'clsx'; -import { DreamPipColors } from '../../../tailwind.config.ts'; +import { DreamPipColors } from '../../../dist/esm/tailwind.config.ts'; import * as Icons from './assets'; type Theme = 'light' | 'dark'; diff --git a/src/atoms/12_DateRange/DateRange.tsx b/src/atoms/12_DateRange/DateRange.tsx index ee927a7..143bdab 100644 --- a/src/atoms/12_DateRange/DateRange.tsx +++ b/src/atoms/12_DateRange/DateRange.tsx @@ -70,18 +70,18 @@ export const HDateRange = function ({ md:[&_.base-Popper-root]:!top-a5 md:[&_.base-Popper-root]:!mt-0 - [&_.MuiPickersToolbarText-root.Mui-selected]:text-soft-light + [&_.MuiPickersToolbarText-root.Mui-selected]:text-primary-light dark:[&_.MuiPickersToolbarText-root.Mui-selected]:text-soft-light dark:!text-body-dark - [&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light - hover:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light - focus:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light + [&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light + hover:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light + focus:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light [&_.MuiButton-colorPrimary]:!text-secondary-light - [&_.MuiDateRangePickerDay-rangeIntervalDayHighlight]:!bg-soft-bg - hover:[&_.MuiDateRangePickerDay-day]:!bg-soft-light + [&_.MuiDateRangePickerDay-rangeIntervalDayHighlight]:!bg-secondary-light + hover:[&_.MuiDateRangePickerDay-day]:!bg-primary-light `]: true, }, ]; diff --git a/vite.config.ts b/vite.config.ts index 11c57cd..9c8d3ad 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,7 +8,7 @@ import { peerDependencies } from './package.json'; export default defineConfig((env) => { console.log({ env }); - return env.mode == 'es' + return env.mode != 'cjs' ? { // es-module build: { From f943b520e467b00dd958928cb67524c6c1aaa6d6 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:35:08 +0100 Subject: [PATCH 07/10] ar(fix) [cherry-pick] date range colors --- src/atoms/05_SystemIcon/SystemIcon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atoms/05_SystemIcon/SystemIcon.tsx b/src/atoms/05_SystemIcon/SystemIcon.tsx index c8ed17f..ae74c39 100644 --- a/src/atoms/05_SystemIcon/SystemIcon.tsx +++ b/src/atoms/05_SystemIcon/SystemIcon.tsx @@ -2,7 +2,7 @@ // @atoms/SystemIcon.tsx import { useMemo } from 'react'; import clsx from 'clsx'; -import { DreamPipColors } from '../../../dist/esm/tailwind.config.ts'; +import { DreamPipColors } from '../../../tailwind.config.ts'; import * as Icons from './assets'; type Theme = 'light' | 'dark'; From b00ef21006c7a19c02145ca9f98da68475321560 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:44:58 +0100 Subject: [PATCH 08/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep --- vite.config.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 9c8d3ad..5d6cd9f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -62,6 +62,12 @@ export default defineConfig((env) => { 'react/jsx-runtime', 'moment', ], + onwarn(warning, defaultHandler) { + if (warning.code === 'MODULE_LEVEL_DIRECTIVE') { + return; + } + defaultHandler(warning); + }, }, sourcemap: true, emptyOutDir: false, From 073761a419e2075018e7e2477db99e29f0bb4e5e Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:46:34 +0100 Subject: [PATCH 09/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a7ecfb..a906159 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "DreamPip's Design System Component Library.", "type": "module", "main": "dist/cjs/index.cjs", - "module": "dist/es/index.es.js", + "module": "dist/esm/index.es.js", "types": "dist/index.d.ts", "repository": "https://github.com/dreampipcom/oneiros", "files": [ From 8fdc3e09d88b33545ffa432ea6ae86ca671492b4 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:47:41 +0100 Subject: [PATCH 10/10] ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep --- vite.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 5d6cd9f..70b461f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,7 +7,6 @@ import dts from 'vite-plugin-dts'; import { peerDependencies } from './package.json'; export default defineConfig((env) => { - console.log({ env }); return env.mode != 'cjs' ? { // es-module