@orsetra/shared-config 1.0.0

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/README.md ADDED
@@ -0,0 +1,103 @@
1
+ # @orsetra/shared-config
2
+
3
+ Shared configuration files for Orsetra platform projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @orsetra/shared-config
9
+ # or
10
+ pnpm add @orsetra/shared-config
11
+ # or
12
+ yarn add @orsetra/shared-config
13
+ ```
14
+
15
+ ## Peer Dependencies
16
+
17
+ ```bash
18
+ npm install tailwindcss
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ### Tailwind CSS Configuration
24
+
25
+ Extend the shared Tailwind configuration in your `tailwind.config.ts`:
26
+
27
+ ```ts
28
+ import type { Config } from 'tailwindcss'
29
+ import sharedConfig from '@orsetra/shared-config/tailwind'
30
+
31
+ const config: Config = {
32
+ ...sharedConfig,
33
+ content: [
34
+ './app/**/*.{js,ts,jsx,tsx,mdx}',
35
+ './components/**/*.{js,ts,jsx,tsx,mdx}',
36
+ './node_modules/@orsetra/shared-ui/**/*.{js,ts,jsx,tsx}',
37
+ ],
38
+ }
39
+
40
+ export default config
41
+ ```
42
+
43
+ ### TypeScript Configuration
44
+
45
+ Extend the shared TypeScript configuration in your `tsconfig.json`:
46
+
47
+ ```json
48
+ {
49
+ "extends": "@orsetra/shared-config/typescript",
50
+ "compilerOptions": {
51
+ "baseUrl": ".",
52
+ "paths": {
53
+ "@/*": ["./app/*"]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## What's Included
60
+
61
+ ### Tailwind Configuration
62
+
63
+ - **Design tokens** - Colors, spacing, typography
64
+ - **Custom utilities** - Additional Tailwind utilities
65
+ - **Plugin configuration** - Pre-configured Tailwind plugins
66
+ - **Theme** - Consistent design system
67
+
68
+ ### TypeScript Configuration
69
+
70
+ - **Strict mode** - Enabled for type safety
71
+ - **Module resolution** - Configured for modern bundlers
72
+ - **JSX support** - React JSX configuration
73
+ - **Path aliases** - Common path alias patterns
74
+
75
+ ## Customization
76
+
77
+ You can override any configuration by spreading the shared config and adding your own settings:
78
+
79
+ ```ts
80
+ import sharedConfig from '@orsetra/shared-config/tailwind'
81
+
82
+ export default {
83
+ ...sharedConfig,
84
+ theme: {
85
+ ...sharedConfig.theme,
86
+ extend: {
87
+ ...sharedConfig.theme.extend,
88
+ colors: {
89
+ ...sharedConfig.theme.extend.colors,
90
+ brand: '#your-color',
91
+ },
92
+ },
93
+ },
94
+ }
95
+ ```
96
+
97
+ ## License
98
+
99
+ MIT
100
+
101
+ ## Repository
102
+
103
+ [GitHub](https://github.com/orsetra/console-ui/tree/main/packages/shared-config)
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@orsetra/shared-config",
3
+ "version": "1.0.0",
4
+ "description": "Shared configuration files for Orsetra platform",
5
+ "main": "./index.ts",
6
+ "types": "./index.ts",
7
+ "exports": {
8
+ ".": "./index.ts",
9
+ "./tailwind": "./tailwind.config.ts",
10
+ "./typescript": "./tsconfig.json"
11
+ },
12
+ "files": [
13
+ "index.ts",
14
+ "tailwind.config.ts",
15
+ "tsconfig.json",
16
+ "README.md"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/orsetra/console-ui.git",
24
+ "directory": "packages/shared-config"
25
+ },
26
+ "keywords": [
27
+ "config",
28
+ "tailwind",
29
+ "typescript",
30
+ "orsetra"
31
+ ],
32
+ "peerDependencies": {
33
+ "tailwindcss": "^3.0.0"
34
+ },
35
+ "devDependencies": {
36
+ "tailwindcss": "^3.4.17",
37
+ "typescript": "^5"
38
+ }
39
+ }
@@ -0,0 +1,53 @@
1
+ import type { Config } from "tailwindcss"
2
+
3
+ const config: Config = {
4
+ darkMode: ["class"],
5
+ content: [],
6
+ theme: {
7
+ extend: {
8
+ colors: {
9
+ border: "hsl(var(--border))",
10
+ input: "hsl(var(--input))",
11
+ ring: "hsl(var(--ring))",
12
+ background: "hsl(var(--background))",
13
+ foreground: "hsl(var(--foreground))",
14
+ primary: {
15
+ DEFAULT: "hsl(var(--primary))",
16
+ foreground: "hsl(var(--primary-foreground))",
17
+ },
18
+ secondary: {
19
+ DEFAULT: "hsl(var(--secondary))",
20
+ foreground: "hsl(var(--secondary-foreground))",
21
+ },
22
+ destructive: {
23
+ DEFAULT: "hsl(var(--destructive))",
24
+ foreground: "hsl(var(--destructive-foreground))",
25
+ },
26
+ muted: {
27
+ DEFAULT: "hsl(var(--muted))",
28
+ foreground: "hsl(var(--muted-foreground))",
29
+ },
30
+ accent: {
31
+ DEFAULT: "hsl(var(--accent))",
32
+ foreground: "hsl(var(--accent-foreground))",
33
+ },
34
+ popover: {
35
+ DEFAULT: "hsl(var(--popover))",
36
+ foreground: "hsl(var(--popover-foreground))",
37
+ },
38
+ card: {
39
+ DEFAULT: "hsl(var(--card))",
40
+ foreground: "hsl(var(--card-foreground))",
41
+ },
42
+ },
43
+ borderRadius: {
44
+ lg: "var(--radius)",
45
+ md: "calc(var(--radius) - 2px)",
46
+ sm: "calc(var(--radius) - 4px)",
47
+ },
48
+ },
49
+ },
50
+ plugins: [require("tailwindcss-animate")],
51
+ }
52
+
53
+ export default config