@mysetup/types 2.0.4 → 2.0.7

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 CHANGED
@@ -1,3 +1,37 @@
1
1
  # @mysetup/types
2
2
 
3
- A collection of shared TypeScript types for the project.
3
+ Shared TypeScript types, enums, and constants used across applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @mysetup/types
9
+ ```
10
+
11
+ ## Supported libraries and runtimes
12
+
13
+ | Supported | Notes |
14
+ | --------- | --------------------------------------------- |
15
+ | Vite | Full support |
16
+ | Next.js | Full support |
17
+ | Node.js | Full support |
18
+ | React | Works in React apps that consume shared types |
19
+
20
+ ## Usage
21
+
22
+ ```ts
23
+ import { Breakpoint, BreakpointSize } from "@mysetup/types";
24
+ import type { AlertType } from "@mysetup/types";
25
+
26
+ const alert: AlertType = "success";
27
+ const mobile = Breakpoint.Small;
28
+ const mediumWidth = BreakpointSize.md;
29
+ ```
30
+
31
+ ## Exports
32
+
33
+ - alert and brand types
34
+ - breakpoint enums and sizes
35
+ - client and service context types
36
+ - environment helpers
37
+ - database and size helpers
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export * from "./src";
2
- //# sourceMappingURL=index.d.ts.map
@@ -3,4 +3,3 @@ export interface AlertState {
3
3
  type: AlertType;
4
4
  message: string;
5
5
  }
6
- //# sourceMappingURL=alert.d.ts.map
@@ -9,4 +9,3 @@ export declare const BrandName: {
9
9
  readonly MJTECH: "MJTECH";
10
10
  };
11
11
  export type BrandName = ValueOf<typeof BrandName>;
12
- //# sourceMappingURL=brand.d.ts.map
@@ -13,4 +13,3 @@ export declare const BreakpointSize: {
13
13
  readonly xl: 1200;
14
14
  };
15
15
  export type BreakpointSize = ValueOf<typeof BreakpointSize>;
16
- //# sourceMappingURL=breakpoint.d.ts.map
@@ -10,4 +10,3 @@ export interface AppState {
10
10
  export interface ProviderProps {
11
11
  appState: AppState;
12
12
  }
13
- //# sourceMappingURL=client-context.d.ts.map
@@ -37,4 +37,3 @@ export declare const constants: {
37
37
  };
38
38
  };
39
39
  export {};
40
- //# sourceMappingURL=database.d.ts.map
package/dist/src/env.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export type EnvironmentType = "storybook" | "test" | "dev" | "prod";
2
- //# sourceMappingURL=env.d.ts.map
@@ -7,4 +7,3 @@ export interface ImageType {
7
7
  url: string;
8
8
  alt: string;
9
9
  }
10
- //# sourceMappingURL=helpers.d.ts.map
@@ -7,4 +7,3 @@ export * from "./helpers";
7
7
  export * from "./database";
8
8
  export * from "./service-context";
9
9
  export * from "./size";
10
- //# sourceMappingURL=index.d.ts.map
@@ -8,4 +8,3 @@ export interface ServiceContext {
8
8
  host?: string;
9
9
  apiKey?: string;
10
10
  }
11
- //# sourceMappingURL=service-context.d.ts.map
@@ -12,4 +12,3 @@ export declare const SizeClasses: {
12
12
  export type SizeClasses = ValueOf<typeof SizeClasses>;
13
13
  export type IconSize = keyof typeof SizeClasses;
14
14
  export declare const iconSizes: Record<Size, IconSize>;
15
- //# sourceMappingURL=size.d.ts.map
package/package.json CHANGED
@@ -1,37 +1,50 @@
1
1
  {
2
- "name": "@mysetup/types",
3
- "version": "2.0.4",
4
- "license": "MIT",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist"
8
- ],
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.js"
14
- },
15
- "./package.json": "./package.json"
2
+ "name": "@mysetup/types",
3
+ "version": "2.0.7",
4
+ "description": "Shared TypeScript types for client and server applications.",
5
+ "author": "krishnaraj <krishnaraj.webdev@gmail.com>",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "types",
9
+ "typescript",
10
+ "models",
11
+ "interfaces",
12
+ "shared"
13
+ ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "main": "dist/index.js",
18
+ "types": "dist/index.d.ts",
19
+ "sideEffects": false,
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "import": "./dist/index.js",
27
+ "require": "./dist/index.js"
16
28
  },
17
- "scripts": {
18
- "build": "rm -rf ./dist && tsc",
19
- "lint": "eslint .",
20
- "typecheck": "tsc --noEmit",
21
- "format": "prettier --write \"**/*.{ts,tsx,md,js}\"",
22
- "checks": "pnpm typecheck && pnpm lint",
23
- "clean": "rm -rf node_modules .swc dist pnpm-lock.yaml && echo \"✅ Successfully removed \""
24
- },
25
- "devDependencies": {
26
- "@mysetup/eslint-config": "latest",
27
- "@mysetup/prettier-config": "latest",
28
- "@mysetup/tsconfig": "latest",
29
- "@types/node": "^22.13.1",
30
- "typescript": "5.5.4"
31
- },
32
- "prettier": "@mysetup/prettier-config",
33
- "engines": {
34
- "node": ">=20.15.1"
35
- },
36
- "packageManager": "pnpm@9.9.0"
37
- }
29
+ "./package.json": "./package.json"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.13.1",
33
+ "typescript": "5.5.4",
34
+ "@mysetup/eslint-config": "^2.0.5",
35
+ "@mysetup/prettier-config": "^2.0.4",
36
+ "@mysetup/tsconfig": "^2.0.4"
37
+ },
38
+ "prettier": "@mysetup/prettier-config",
39
+ "engines": {
40
+ "node": ">=20.15.1"
41
+ },
42
+ "scripts": {
43
+ "build": "node ../scripts/package-fs.cjs remove dist && tsc",
44
+ "lint": "node ../scripts/run-eslint.cjs .",
45
+ "typecheck": "tsc --noEmit",
46
+ "format": "prettier --write \"**/*.{ts,tsx,md,js}\"",
47
+ "checks": "pnpm typecheck && pnpm lint && pnpm build",
48
+ "clean": "node ../scripts/package-fs.cjs remove node_modules .swc dist pnpm-lock.yaml && echo \"Cleaned\""
49
+ }
50
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/alert.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/brand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,KAAK;;;CAGR,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,SAAS,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../src/breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-context.d.ts","sourceRoot":"","sources":["../../src/client-context.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,QAAQ;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,QAAQ;;;CAGpB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,QAAA,MAAM,UAAU;;;;;CAKf,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,UAAU,CAAC,CAAC;AAOpD,QAAA,MAAM,aAAa;;;CAGlB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAKrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpC,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-context.d.ts","sourceRoot":"","sources":["../../src/service-context.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../src/size.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvE,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,WAAW,CAAC;AAEhD,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,CAQnC,CAAC"}