Enabled project to run in islation
This commit is contained in:
4317
package-lock.json
generated
Normal file
4317
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@armco/utils",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.6",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "rm -rf build && tsc && vite build",
|
||||
@@ -9,11 +9,23 @@
|
||||
"publish:sh": "./publish.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/node": "^22.5.5",
|
||||
"@types/react": "^18.3.7",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"glob": "^11.0.0",
|
||||
"react": "^18.3.1",
|
||||
"typescript": "^5.0.2"
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^5.4.6",
|
||||
"vite-plugin-dts": "^4.2.1",
|
||||
"vitest": "^2.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@armco/configs": "0.0.2"
|
||||
"@armco/configs": "^0.0.3",
|
||||
"@armco/types": "^0.0.9",
|
||||
"d3": "^7.9.0",
|
||||
"uuid": "^10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">16.8.1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ComponentType } from "react"
|
||||
import { useTheme } from "." // Adjust the import path as needed
|
||||
import { useTheme } from "./hooks" // Adjust the import path as needed
|
||||
|
||||
export const withTheme = <P extends object>(
|
||||
Component: ComponentType<P>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createContext } from "react"
|
||||
import { ArContextType, ArThemes, FunctionType } from "@armco/types"
|
||||
import { Helper } from "."
|
||||
import Helper from "./helper"
|
||||
|
||||
export const SlotterContext = createContext<{
|
||||
slotted: Array<string>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { CalendarDate, Event, ArDateFormats } from "@armco/types"
|
||||
import { MONTH_INDEX } from "@armco/configs"
|
||||
import { Helper } from "."
|
||||
import Helper from "./helper"
|
||||
|
||||
export interface CalendarOptions {
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ObjectType,
|
||||
Position,
|
||||
} from "@armco/types"
|
||||
import { Helper } from "."
|
||||
import Helper from "./helper"
|
||||
|
||||
class DomHelper {
|
||||
static style = window.getComputedStyle(document.documentElement)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { v4 as uuid } from "uuid"
|
||||
import { FunctionType, GridToolbarSpecs, SlotDescriptor } from "@armco/types"
|
||||
import { DomHelper } from "."
|
||||
import DomHelper from "./domHelper"
|
||||
|
||||
class GridHelper {
|
||||
// For x and y toolbars only
|
||||
|
||||
@@ -7,7 +7,9 @@ import {
|
||||
PanelContent,
|
||||
User,
|
||||
} from "@armco/types"
|
||||
import { ArContext, Helper } from "./index"
|
||||
import { ArContext } from "./contexts"
|
||||
import Helper from "./helper"
|
||||
|
||||
export const ArProvider = ({ children }: { children: ReactNode }) => {
|
||||
const [theme, setTheme] = useState<ArThemes>(ArThemes.DARK1)
|
||||
const [isLoggedIn, setLoggedIn] = useState<boolean>()
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"include": ["src"],
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"outDir": "build",
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { resolve } from "node:path"
|
||||
import glob from "glob"
|
||||
import {glob} from "glob"
|
||||
import { defineConfig } from "vitest/config"
|
||||
import react from "@vitejs/plugin-react"
|
||||
import dts from "vite-plugin-dts"
|
||||
@@ -10,23 +10,23 @@ export default defineConfig({
|
||||
build: {
|
||||
outDir: "build",
|
||||
lib: {
|
||||
entry: glob.sync(resolve(__dirname, "src/**/*.ts")),
|
||||
name: "@armco/utils",
|
||||
formats: ["es", "cjs"],
|
||||
entry: glob.sync(resolve(__dirname, "src/**/*.{ts,tsx}")),
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
external: ["react", "react/jsx-runtime", "react-dom", "moment"],
|
||||
external: ["react", "react/jsx-runtime", "react-dom"],
|
||||
output: [
|
||||
{
|
||||
format: "es",
|
||||
dir: "build/es",
|
||||
entryFileNames: "[name].js",
|
||||
chunkFileNames: "[name].js",
|
||||
},
|
||||
{
|
||||
format: "cjs",
|
||||
dir: "build/cjs",
|
||||
entryFileNames: "[name].js",
|
||||
chunkFileNames: "[name].js",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user