@teo-garcia/react-shared 0.1.1 → 0.1.8
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/LICENSE +3 -0
- package/README.md +7 -7
- package/dist/adapters/environment/index.d.ts +2 -2
- package/dist/adapters/environment/index.d.ts.map +1 -1
- package/dist/adapters/environment/index.js +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +2 -2
- package/dist/adapters/theme/index.d.ts +2 -2
- package/dist/adapters/theme/index.d.ts.map +1 -1
- package/dist/adapters/theme/index.js +2 -2
- package/dist/components/error-boundary/index.d.ts +1 -1
- package/dist/components/error-boundary/index.d.ts.map +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/theme-switch/index.d.ts +2 -2
- package/dist/components/theme-switch/index.d.ts.map +1 -1
- package/dist/components/theme-switch/index.js +1 -1
- package/dist/components/viewport-info/index.d.ts +2 -2
- package/dist/components/viewport-info/index.d.ts.map +1 -1
- package/dist/components/viewport-info/index.js +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +5 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -32,13 +32,13 @@ pnpm add -D msw
|
|
|
32
32
|
|
|
33
33
|
## Features
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
35
|
+
- **Components**: Ready-to-use UI components (ThemeSwitch, ViewportInfo, ErrorBoundary)
|
|
36
|
+
- **Hooks**: Reusable React hooks (useHealthcheck)
|
|
37
|
+
- **Utilities**: Pure helper functions (environment detection, MSW setup)
|
|
38
|
+
- **Adapters**: Framework bridges for theme providers and environment detection
|
|
39
|
+
- **Framework Agnostic**: Works with Next.js, React Router, and other React frameworks
|
|
40
|
+
- **TypeScript**: Full type safety with TypeScript definitions
|
|
41
|
+
- **Tree-shakeable**: Import only what you need
|
|
42
42
|
|
|
43
43
|
## Usage
|
|
44
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Environment adapters - abstract environment detection across different frameworks
|
|
3
3
|
*/
|
|
4
|
-
export { nextEnvironmentAdapter } from './next';
|
|
5
|
-
export { viteEnvironmentAdapter } from './vite';
|
|
4
|
+
export { nextEnvironmentAdapter } from './next.js';
|
|
5
|
+
export { viteEnvironmentAdapter } from './vite.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/environment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/environment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Environment adapters - abstract environment detection across different frameworks
|
|
3
3
|
*/
|
|
4
|
-
export { nextEnvironmentAdapter } from './next';
|
|
5
|
-
export { viteEnvironmentAdapter } from './vite';
|
|
4
|
+
export { nextEnvironmentAdapter } from './next.js';
|
|
5
|
+
export { viteEnvironmentAdapter } from './vite.js';
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Adapters allow our components to work with different theme libraries,
|
|
5
5
|
* environment detection systems, and other framework-specific APIs
|
|
6
6
|
*/
|
|
7
|
-
export * from './environment';
|
|
8
|
-
export * from './theme';
|
|
7
|
+
export * from './environment/index.js';
|
|
8
|
+
export * from './theme/index.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA"}
|
package/dist/adapters/index.js
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Adapters allow our components to work with different theme libraries,
|
|
5
5
|
* environment detection systems, and other framework-specific APIs
|
|
6
6
|
*/
|
|
7
|
-
export * from './environment';
|
|
8
|
-
export * from './theme';
|
|
7
|
+
export * from './environment/index.js';
|
|
8
|
+
export * from './theme/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Theme adapters - bridge between different theme libraries and our components
|
|
3
3
|
*/
|
|
4
|
-
export { createCustomThemeAdapter } from './custom';
|
|
5
|
-
export { useNextThemesAdapter } from './next-themes';
|
|
4
|
+
export { createCustomThemeAdapter } from './custom.js';
|
|
5
|
+
export { useNextThemesAdapter } from './next-themes.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/theme/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/theme/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Theme adapters - bridge between different theme libraries and our components
|
|
3
3
|
*/
|
|
4
|
-
export { createCustomThemeAdapter } from './custom';
|
|
5
|
-
export { useNextThemesAdapter } from './next-themes';
|
|
4
|
+
export { createCustomThemeAdapter } from './custom.js';
|
|
5
|
+
export { useNextThemesAdapter } from './next-themes.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ErrorBoundary } from './error-boundary';
|
|
1
|
+
export { ErrorBoundary } from './error-boundary.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/error-boundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/error-boundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ErrorBoundary } from './error-boundary';
|
|
1
|
+
export { ErrorBoundary } from './error-boundary.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Components - Reusable React UI components
|
|
3
3
|
*/
|
|
4
|
-
export * from './error-boundary';
|
|
5
|
-
export * from './theme-switch';
|
|
6
|
-
export * from './viewport-info';
|
|
4
|
+
export * from './error-boundary/index.js';
|
|
5
|
+
export * from './theme-switch/index.js';
|
|
6
|
+
export * from './viewport-info/index.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Components - Reusable React UI components
|
|
3
3
|
*/
|
|
4
|
-
export * from './error-boundary';
|
|
5
|
-
export * from './theme-switch';
|
|
6
|
-
export * from './viewport-info';
|
|
4
|
+
export * from './error-boundary/index.js';
|
|
5
|
+
export * from './theme-switch/index.js';
|
|
6
|
+
export * from './viewport-info/index.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ThemeSwitch } from './theme-switch';
|
|
2
|
-
export type { ThemeSwitchProps } from './theme-switch';
|
|
1
|
+
export { ThemeSwitch } from './theme-switch.js';
|
|
2
|
+
export type { ThemeSwitchProps } from './theme-switch.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme-switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/theme-switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ThemeSwitch } from './theme-switch';
|
|
1
|
+
export { ThemeSwitch } from './theme-switch.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ViewportInfo } from './viewport-info';
|
|
2
|
-
export type { ViewportInfoProps } from './viewport-info';
|
|
1
|
+
export { ViewportInfo } from './viewport-info.js';
|
|
2
|
+
export type { ViewportInfoProps } from './viewport-info.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/viewport-info/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/viewport-info/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ViewportInfo } from './viewport-info';
|
|
1
|
+
export { ViewportInfo } from './viewport-info.js';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hooks - Reusable React hooks for common functionality
|
|
3
3
|
*/
|
|
4
|
-
export { useHealthcheck } from './use-healthcheck';
|
|
5
|
-
export type { UseHealthcheckOptions } from './use-healthcheck';
|
|
4
|
+
export { useHealthcheck } from './use-healthcheck.js';
|
|
5
|
+
export type { UseHealthcheckOptions } from './use-healthcheck.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
|
-
export * from './components';
|
|
12
|
-
export * from './hooks';
|
|
13
|
-
export * from './utils';
|
|
14
|
-
export * from './adapters';
|
|
15
|
-
export * from './types';
|
|
11
|
+
export * from './components/index.js';
|
|
12
|
+
export * from './hooks/index.js';
|
|
13
|
+
export * from './utils/index.js';
|
|
14
|
+
export * from './adapters/index.js';
|
|
15
|
+
export * from './types.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,cAAc,uBAAuB,CAAA;AAGrC,cAAc,kBAAkB,CAAA;AAGhC,cAAc,kBAAkB,CAAA;AAGhC,cAAc,qBAAqB,CAAA;AAGnC,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
11
11
|
// Export all components
|
|
12
|
-
export * from './components';
|
|
12
|
+
export * from './components/index.js';
|
|
13
13
|
// Export all hooks
|
|
14
|
-
export * from './hooks';
|
|
14
|
+
export * from './hooks/index.js';
|
|
15
15
|
// Export all utilities
|
|
16
|
-
export * from './utils';
|
|
16
|
+
export * from './utils/index.js';
|
|
17
17
|
// Export all adapters
|
|
18
|
-
export * from './adapters';
|
|
18
|
+
export * from './adapters/index.js';
|
|
19
19
|
// Export all types
|
|
20
|
-
export * from './types';
|
|
20
|
+
export * from './types.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA"}
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teo-garcia/react-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Shared React components, hooks, utilities, and adapters for fullstack web templates",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
],
|
|
81
81
|
"author": "teo-garcia",
|
|
82
82
|
"license": "MIT",
|
|
83
|
+
"repository": {
|
|
84
|
+
"type": "git",
|
|
85
|
+
"url": "git+https://github.com/teo-garcia/react-shared.git"
|
|
86
|
+
},
|
|
83
87
|
"engines": {
|
|
84
88
|
"node": ">=20"
|
|
85
89
|
},
|