@eggspot/ui 0.0.0 → 0.0.2

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.
package/eslint.config.js CHANGED
@@ -1,4 +1,41 @@
1
- import { config } from "@workspace/eslint-config/react-internal"
1
+ import js from "@eslint/js"
2
+ import eslintConfigPrettier from "eslint-config-prettier"
3
+ import pluginReact from "eslint-plugin-react"
4
+ import pluginReactHooks from "eslint-plugin-react-hooks"
5
+ import globals from "globals"
6
+ import tseslint from "typescript-eslint"
2
7
 
3
- /** @type {import("eslint").Linter.Config} */
4
- export default config
8
+ import { config as baseConfig } from "./base.js"
9
+
10
+ /**
11
+ * A custom ESLint configuration for libraries that use React.
12
+ *
13
+ * @type {import("eslint").Linter.Config} */
14
+ export const config = [
15
+ ...baseConfig,
16
+ js.configs.recommended,
17
+ eslintConfigPrettier,
18
+ ...tseslint.configs.recommended,
19
+ pluginReact.configs.flat.recommended,
20
+ {
21
+ languageOptions: {
22
+ ...pluginReact.configs.flat.recommended.languageOptions,
23
+ globals: {
24
+ ...globals.serviceworker,
25
+ ...globals.browser,
26
+ },
27
+ },
28
+ },
29
+ {
30
+ plugins: {
31
+ "react-hooks": pluginReactHooks,
32
+ },
33
+ settings: { react: { version: "detect" } },
34
+ rules: {
35
+ ...pluginReactHooks.configs.recommended.rules,
36
+ // React scope no longer necessary with new JSX transform.
37
+ "react/react-in-jsx-scope": "off",
38
+ "react/prop-types": "off",
39
+ },
40
+ },
41
+ ]
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@eggspot/ui",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "scripts": {
7
- "lint": "eslint . --max-warnings 0"
7
+ "lint": "eslint . --max-warnings 0",
8
+ "resolve-catalog": "node resolve-catalog.js",
9
+ "prepublishOnly": "pnpm resolve-catalog"
8
10
  },
9
11
  "publishConfig": {
10
12
  "access": "public"
@@ -14,12 +16,12 @@
14
16
  "@dnd-kit/modifiers": "^9.0.0",
15
17
  "@dnd-kit/sortable": "^10.0.0",
16
18
  "@dnd-kit/utilities": "^3.2.2",
17
- "@hookform/resolvers": "catalog:",
19
+ "@hookform/resolvers": "5.2.2",
18
20
  "@internationalized/date": "^3.10.0",
19
21
  "@radix-ui/react-scroll-area": "^1.2.10",
20
22
  "@radix-ui/react-slot": "^1.2.4",
21
23
  "@radix-ui/react-use-controllable-state": "^1.2.2",
22
- "@tanstack/react-table": "catalog:",
24
+ "@tanstack/react-table": "^8.21.3",
23
25
  "@tanstack/react-virtual": "^3.13.13",
24
26
  "@xstate/react": "^6.0.0",
25
27
  "@xstate/store": "^3.11.2",
@@ -27,33 +29,31 @@
27
29
  "clsx": "^2.1.1",
28
30
  "dayjs": "^1.11.19",
29
31
  "input-otp": "^1.4.2",
30
- "lodash": "catalog:",
31
- "lucide-react": "catalog:",
32
- "next-themes": "catalog:",
32
+ "lodash": "4.17.21",
33
+ "lucide-react": "0.475.0",
34
+ "next-themes": "0.4.6",
33
35
  "radix-ui": "^1.4.3",
34
- "react": "catalog:",
36
+ "react": "^19.2.3",
35
37
  "react-aria-components": "^1.13.0",
36
- "react-dom": "catalog:",
37
- "react-hook-form": "catalog:",
38
+ "react-dom": "^19.2.3",
39
+ "react-hook-form": "7.66.0",
38
40
  "react-resizable-panels": "^3.0.6",
39
- "react-use": "catalog:",
41
+ "react-use": "^17.6.0",
40
42
  "sonner": "^2.0.7",
41
43
  "tailwind-merge": "^3.3.1",
42
44
  "tailwind-variants": "^3.1.1",
43
45
  "tw-animate-css": "^1.3.6",
44
46
  "xstate": "^5.24.0",
45
- "zod": "catalog:"
47
+ "zod": "4.3.5"
46
48
  },
47
49
  "devDependencies": {
48
- "@eggspot/theme": "workspace:*",
50
+ "@eggspot/theme": "^1.0.4",
49
51
  "@turbo/gen": "^2.5.5",
50
- "@types/lodash": "catalog:",
51
- "@types/node": "catalog:",
52
- "@types/react": "catalog:",
53
- "@types/react-dom": "catalog:",
54
- "@workspace/eslint-config": "workspace:*",
55
- "@workspace/typescript-config": "workspace:*",
56
- "typescript": "catalog:"
52
+ "@types/lodash": "4.17.20",
53
+ "@types/node": "20.19.9",
54
+ "@types/react": "^19.2.7",
55
+ "@types/react-dom": "^19.2.3",
56
+ "typescript": "5.9.2"
57
57
  },
58
58
  "exports": {
59
59
  "./globals.css": "./src/styles/globals.css",
@@ -63,4 +63,4 @@
63
63
  "./hooks/*": "./src/hooks/*.ts",
64
64
  "./consts/*": "./src/consts/*.ts"
65
65
  }
66
- }
66
+ }
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, writeFileSync } from "fs"
3
+ import { dirname, join } from "path"
4
+ import { fileURLToPath } from "url"
5
+
6
+ const __filename = fileURLToPath(import.meta.url)
7
+ const __dirname = dirname(__filename)
8
+ const rootDir = join(__dirname, "../..")
9
+
10
+ // Read catalog from pnpm-workspace.yaml
11
+ const workspaceYaml = readFileSync(
12
+ join(rootDir, "pnpm-workspace.yaml"),
13
+ "utf-8"
14
+ )
15
+ const catalog = {}
16
+
17
+ // Parse catalog section
18
+ const catalogMatch = workspaceYaml.match(/catalog:\s*([\s\S]*?)(?=\n\w|\n$)/)
19
+ if (catalogMatch) {
20
+ const catalogSection = catalogMatch[1]
21
+ const lines = catalogSection.split("\n")
22
+
23
+ for (const line of lines) {
24
+ const trimmed = line.trim()
25
+ if (trimmed && !trimmed.startsWith("#")) {
26
+ const match = trimmed.match(/^["']?([^"':\s]+)["']?:\s*(.+)$/)
27
+ if (match) {
28
+ const [, name, version] = match
29
+ catalog[name] = version.trim()
30
+ }
31
+ }
32
+ }
33
+ }
34
+
35
+ // Read package.json
36
+ const packageJsonPath = join(__dirname, "package.json")
37
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"))
38
+
39
+ // Resolve catalog: references in dependencies
40
+ function resolveCatalog(obj) {
41
+ for (const key in obj) {
42
+ if (obj[key] === "catalog:") {
43
+ if (catalog[key]) {
44
+ obj[key] = catalog[key]
45
+ } else {
46
+ console.warn(`Warning: No catalog entry found for ${key}`)
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ if (packageJson.dependencies) {
53
+ resolveCatalog(packageJson.dependencies)
54
+ }
55
+ if (packageJson.devDependencies) {
56
+ resolveCatalog(packageJson.devDependencies)
57
+ }
58
+
59
+ // Write back
60
+ writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n")
61
+ console.log("Catalog dependencies resolved successfully!")
package/tsconfig.json CHANGED
@@ -1,10 +1,26 @@
1
1
  {
2
- "extends": "@workspace/typescript-config/react-library.json",
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Default",
3
4
  "compilerOptions": {
4
5
  "baseUrl": ".",
5
6
  "paths": {
6
7
  "@eggspot/ui/*": ["./src/*"]
7
- }
8
+ },
9
+ "declaration": true,
10
+ "declarationMap": true,
11
+ "esModuleInterop": true,
12
+ "incremental": false,
13
+ "isolatedModules": true,
14
+ "lib": ["es2022", "DOM", "DOM.Iterable"],
15
+ "module": "ESNext",
16
+ "moduleDetection": "force",
17
+ "moduleResolution": "bundler",
18
+ "noUncheckedIndexedAccess": true,
19
+ "resolveJsonModule": true,
20
+ "skipLibCheck": true,
21
+ "strict": true,
22
+ "target": "ES2022",
23
+ "jsx": "react-jsx"
8
24
  },
9
25
  "include": ["."],
10
26
  "exclude": ["node_modules", "dist"]