@basictech/nextjs 0.6.0 → 0.7.0-beta.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/.turbo/turbo-build.log +18 -17
- package/CHANGELOG.md +29 -2
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -0
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +4 -5
- package/src/client.ts +3 -0
- package/src/components.tsx +0 -85
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @basictech/nextjs@0.
|
|
3
|
+
> @basictech/nextjs@0.7.0-beta.1 build
|
|
4
4
|
> tsup
|
|
5
5
|
|
|
6
|
-
[34mCLI[39m Building entry: src/
|
|
6
|
+
[34mCLI[39m Building entry: src/client.ts, src/index.ts
|
|
7
7
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
8
|
-
[34mCLI[39m tsup
|
|
8
|
+
[34mCLI[39m tsup v8.5.1
|
|
9
9
|
[34mCLI[39m Using tsup config: /Users/raz/codebook/basic/libs/client-ts/packages/nextjs/tsup.config.ts
|
|
10
10
|
[34mCLI[39m Target: es2022
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[34mESM[39m Build start
|
|
14
|
-
[
|
|
15
|
-
[32mESM[39m [1mdist/client.mjs [22m[32m375.00 B[39m
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m6.68 KB[39m
|
|
17
|
-
[32mESM[39m [1mdist/client.mjs.map [22m[32m933.00 B[39m
|
|
18
|
-
[32mESM[39m ⚡️ Build success in 19ms
|
|
19
|
-
[32mCJS[39m [1mdist/client.js [22m[32m1.60 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/client.js [22m[32m1.67 KB[39m
|
|
20
15
|
[32mCJS[39m [1mdist/index.js [22m[32m3.43 KB[39m
|
|
21
|
-
[32mCJS[39m [1mdist/client.js.map [22m[
|
|
16
|
+
[32mCJS[39m [1mdist/client.js.map [22m[32m1000.00 B[39m
|
|
22
17
|
[32mCJS[39m [1mdist/index.js.map [22m[32m7.77 KB[39m
|
|
23
|
-
[32mCJS[39m ⚡️ Build success in
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 23ms
|
|
19
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m2.22 KB[39m
|
|
20
|
+
[32mESM[39m [1mdist/client.mjs [22m[32m413.00 B[39m
|
|
21
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m6.68 KB[39m
|
|
22
|
+
[32mESM[39m [1mdist/client.mjs.map [22m[32m1011.00 B[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 23ms
|
|
24
|
+
DTS Build start
|
|
25
|
+
DTS ⚡️ Build success in 1156ms
|
|
26
|
+
DTS dist/client.d.ts 362.00 B
|
|
27
|
+
DTS dist/index.d.ts 2.48 KB
|
|
28
|
+
DTS dist/client.d.mts 362.00 B
|
|
29
|
+
DTS dist/index.d.mts 2.48 KB
|
|
30
|
+
⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @basictech/nextjs
|
|
2
2
|
|
|
3
|
+
## 0.7.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- added debug bar
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @basictech/react@0.8.0-beta.2
|
|
13
|
+
|
|
14
|
+
## 0.7.0-beta.1
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- uth updates
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @basictech/react@0.8.0-beta.1
|
|
24
|
+
|
|
25
|
+
## 0.6.1-beta.0
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @basictech/react@0.8.0-beta.0
|
|
31
|
+
|
|
3
32
|
## 0.6.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -261,7 +290,6 @@
|
|
|
261
290
|
- 96e0156: update schema validation
|
|
262
291
|
- cda3d16: add schema validation
|
|
263
292
|
- 2c898ae: update useQuery hook
|
|
264
|
-
|
|
265
293
|
- no need to pass param as a function, can now enter query directly
|
|
266
294
|
- defaults to empty array when loading
|
|
267
295
|
|
|
@@ -342,7 +370,6 @@
|
|
|
342
370
|
### Minor Changes
|
|
343
371
|
|
|
344
372
|
- update useQuery hook
|
|
345
|
-
|
|
346
373
|
- no need to pass param as a function, can now enter query directly
|
|
347
374
|
- defaults to empty array when loading
|
|
348
375
|
|
package/dist/client.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AuthConfig, AuthError, AuthResult, BasicContextType, BasicDB, BasicProvider, BasicProviderProps, BasicStorage, Collection, DBMode, LocalStorageAdapter, NotAuthenticatedError, RemoteCollection, RemoteDB, RemoteDBConfig, RemoteDBError, STORAGE_KEYS, useBasic, useQuery } from '@basictech/react';
|
|
1
|
+
export { AuthConfig, AuthError, AuthResult, BasicContextType, BasicDB, BasicDevToolbar, BasicDevToolbarProps, BasicProvider, BasicProviderProps, BasicSchemaDevInfo, BasicStorage, Collection, DBMode, LocalStorageAdapter, NotAuthenticatedError, RemoteCollection, RemoteDB, RemoteDBConfig, RemoteDBError, STORAGE_KEYS, useBasic, useQuery } from '@basictech/react';
|
package/dist/client.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AuthConfig, AuthError, AuthResult, BasicContextType, BasicDB, BasicProvider, BasicProviderProps, BasicStorage, Collection, DBMode, LocalStorageAdapter, NotAuthenticatedError, RemoteCollection, RemoteDB, RemoteDBConfig, RemoteDBError, STORAGE_KEYS, useBasic, useQuery } from '@basictech/react';
|
|
1
|
+
export { AuthConfig, AuthError, AuthResult, BasicContextType, BasicDB, BasicDevToolbar, BasicDevToolbarProps, BasicProvider, BasicProviderProps, BasicSchemaDevInfo, BasicStorage, Collection, DBMode, LocalStorageAdapter, NotAuthenticatedError, RemoteCollection, RemoteDB, RemoteDBConfig, RemoteDBError, STORAGE_KEYS, useBasic, useQuery } from '@basictech/react';
|
package/dist/client.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/client.ts
|
|
22
22
|
var client_exports = {};
|
|
23
23
|
__export(client_exports, {
|
|
24
|
+
BasicDevToolbar: () => import_react.BasicDevToolbar,
|
|
24
25
|
BasicProvider: () => import_react.BasicProvider,
|
|
25
26
|
NotAuthenticatedError: () => import_react.NotAuthenticatedError,
|
|
26
27
|
RemoteCollection: () => import_react.RemoteCollection,
|
|
@@ -34,6 +35,7 @@ module.exports = __toCommonJS(client_exports);
|
|
|
34
35
|
var import_react = require("@basictech/react");
|
|
35
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
37
|
0 && (module.exports = {
|
|
38
|
+
BasicDevToolbar,
|
|
37
39
|
BasicProvider,
|
|
38
40
|
NotAuthenticatedError,
|
|
39
41
|
RemoteCollection,
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["'use client'\n\n// @basictech/nextjs/client - Client-side exports for Next.js\n// Use this in client components (files with 'use client' directive)\n\n// Re-export everything from @basictech/react for client-side use\nexport {\n useBasic,\n BasicProvider,\n useQuery,\n RemoteDB,\n RemoteCollection,\n RemoteDBError,\n NotAuthenticatedError,\n STORAGE_KEYS\n} from \"@basictech/react\"\n\n// Re-export types (DBMode is also a type)\nexport type {\n AuthConfig,\n BasicStorage,\n LocalStorageAdapter,\n BasicProviderProps,\n BasicContextType,\n AuthResult,\n BasicDB,\n Collection,\n RemoteDBConfig,\n AuthError\n} from \"@basictech/react\"\n\n// DBMode is a type-only export\nexport type { DBMode } from \"@basictech/react\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["'use client'\n\n// @basictech/nextjs/client - Client-side exports for Next.js\n// Use this in client components (files with 'use client' directive)\n\n// Re-export everything from @basictech/react for client-side use\nexport {\n useBasic,\n BasicProvider,\n BasicDevToolbar,\n useQuery,\n RemoteDB,\n RemoteCollection,\n RemoteDBError,\n NotAuthenticatedError,\n STORAGE_KEYS\n} from \"@basictech/react\"\n\n// Re-export types (DBMode is also a type)\nexport type {\n AuthConfig,\n BasicStorage,\n LocalStorageAdapter,\n BasicProviderProps,\n BasicContextType,\n BasicSchemaDevInfo,\n BasicDevToolbarProps,\n AuthResult,\n BasicDB,\n Collection,\n RemoteDBConfig,\n AuthError\n} from \"@basictech/react\"\n\n// DBMode is a type-only export\nexport type { DBMode } from \"@basictech/react\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,mBAUO;","names":[]}
|
package/dist/client.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import {
|
|
5
5
|
useBasic,
|
|
6
6
|
BasicProvider,
|
|
7
|
+
BasicDevToolbar,
|
|
7
8
|
useQuery,
|
|
8
9
|
RemoteDB,
|
|
9
10
|
RemoteCollection,
|
|
@@ -12,6 +13,7 @@ import {
|
|
|
12
13
|
STORAGE_KEYS
|
|
13
14
|
} from "@basictech/react";
|
|
14
15
|
export {
|
|
16
|
+
BasicDevToolbar,
|
|
15
17
|
BasicProvider,
|
|
16
18
|
NotAuthenticatedError,
|
|
17
19
|
RemoteCollection,
|
package/dist/client.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["'use client'\n\n// @basictech/nextjs/client - Client-side exports for Next.js\n// Use this in client components (files with 'use client' directive)\n\n// Re-export everything from @basictech/react for client-side use\nexport {\n useBasic,\n BasicProvider,\n useQuery,\n RemoteDB,\n RemoteCollection,\n RemoteDBError,\n NotAuthenticatedError,\n STORAGE_KEYS\n} from \"@basictech/react\"\n\n// Re-export types (DBMode is also a type)\nexport type {\n AuthConfig,\n BasicStorage,\n LocalStorageAdapter,\n BasicProviderProps,\n BasicContextType,\n AuthResult,\n BasicDB,\n Collection,\n RemoteDBConfig,\n AuthError\n} from \"@basictech/react\"\n\n// DBMode is a type-only export\nexport type { DBMode } from \"@basictech/react\"\n"],"mappings":";;;AAMA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["'use client'\n\n// @basictech/nextjs/client - Client-side exports for Next.js\n// Use this in client components (files with 'use client' directive)\n\n// Re-export everything from @basictech/react for client-side use\nexport {\n useBasic,\n BasicProvider,\n BasicDevToolbar,\n useQuery,\n RemoteDB,\n RemoteCollection,\n RemoteDBError,\n NotAuthenticatedError,\n STORAGE_KEYS\n} from \"@basictech/react\"\n\n// Re-export types (DBMode is also a type)\nexport type {\n AuthConfig,\n BasicStorage,\n LocalStorageAdapter,\n BasicProviderProps,\n BasicContextType,\n BasicSchemaDevInfo,\n BasicDevToolbarProps,\n AuthResult,\n BasicDB,\n Collection,\n RemoteDBConfig,\n AuthError\n} from \"@basictech/react\"\n\n// DBMode is a type-only export\nexport type { DBMode } from \"@basictech/react\"\n"],"mappings":";;;AAMA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -80,4 +80,4 @@ declare function withBasicAuth(request: NextRequest): NextResponse;
|
|
|
80
80
|
*/
|
|
81
81
|
declare function getReturnUrl(request: NextRequest, defaultUrl?: string): string;
|
|
82
82
|
|
|
83
|
-
export { BasicMiddlewareConfig, createBasicMiddleware, getAuthFromRequest, getReturnUrl, withBasicAuth };
|
|
83
|
+
export { type BasicMiddlewareConfig, createBasicMiddleware, getAuthFromRequest, getReturnUrl, withBasicAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -80,4 +80,4 @@ declare function withBasicAuth(request: NextRequest): NextResponse;
|
|
|
80
80
|
*/
|
|
81
81
|
declare function getReturnUrl(request: NextRequest, defaultUrl?: string): string;
|
|
82
82
|
|
|
83
|
-
export { BasicMiddlewareConfig, createBasicMiddleware, getAuthFromRequest, getReturnUrl, withBasicAuth };
|
|
83
|
+
export { type BasicMiddlewareConfig, createBasicMiddleware, getAuthFromRequest, getReturnUrl, withBasicAuth };
|
package/dist/index.js
CHANGED
|
@@ -18,14 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
createBasicMiddleware: () => createBasicMiddleware,
|
|
24
24
|
getAuthFromRequest: () => getAuthFromRequest,
|
|
25
25
|
getReturnUrl: () => getReturnUrl,
|
|
26
26
|
withBasicAuth: () => withBasicAuth
|
|
27
27
|
});
|
|
28
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
29
|
|
|
30
30
|
// src/middleware.ts
|
|
31
31
|
var import_server = require("next/server");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basictech/nextjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -38,14 +38,13 @@
|
|
|
38
38
|
"author": "",
|
|
39
39
|
"license": "ISC",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@basictech/react": "0.
|
|
42
|
-
"@radix-ui/react-avatar": "^1.1.1",
|
|
43
|
-
"@radix-ui/react-popover": "^1.1.2"
|
|
41
|
+
"@basictech/react": "0.8.0-beta.2"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
44
|
"@repo/typescript-config": "*",
|
|
47
45
|
"@types/uuid": "^10.0.0",
|
|
48
|
-
"
|
|
46
|
+
"next": "^14.2.0",
|
|
47
|
+
"tsup": "^8.0.0",
|
|
49
48
|
"typescript": "^5.0.0"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
package/src/client.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export {
|
|
8
8
|
useBasic,
|
|
9
9
|
BasicProvider,
|
|
10
|
+
BasicDevToolbar,
|
|
10
11
|
useQuery,
|
|
11
12
|
RemoteDB,
|
|
12
13
|
RemoteCollection,
|
|
@@ -22,6 +23,8 @@ export type {
|
|
|
22
23
|
LocalStorageAdapter,
|
|
23
24
|
BasicProviderProps,
|
|
24
25
|
BasicContextType,
|
|
26
|
+
BasicSchemaDevInfo,
|
|
27
|
+
BasicDevToolbarProps,
|
|
25
28
|
AuthResult,
|
|
26
29
|
BasicDB,
|
|
27
30
|
Collection,
|
package/src/components.tsx
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as Avatar from '@radix-ui/react-avatar';
|
|
3
|
-
import * as Popover from '@radix-ui/react-popover';
|
|
4
|
-
|
|
5
|
-
const LoginButton = () => {
|
|
6
|
-
return (
|
|
7
|
-
<Popover.Root>
|
|
8
|
-
{/* Trigger: Avatar that will be clicked */}
|
|
9
|
-
<Popover.Trigger asChild>
|
|
10
|
-
<Avatar.Root style={avatarContainerStyle}>
|
|
11
|
-
<Avatar.Image
|
|
12
|
-
src="https://via.placeholder.com/150"
|
|
13
|
-
alt="User Avatar"
|
|
14
|
-
style={avatarImageStyle}
|
|
15
|
-
/>
|
|
16
|
-
<Avatar.Fallback delayMs={600} style={avatarFallbackStyle}>
|
|
17
|
-
U
|
|
18
|
-
</Avatar.Fallback>
|
|
19
|
-
</Avatar.Root>
|
|
20
|
-
</Popover.Trigger>
|
|
21
|
-
|
|
22
|
-
{/* Popover content */}
|
|
23
|
-
<Popover.Portal>
|
|
24
|
-
<Popover.Content style={popoverContentStyle} sideOffset={10}>
|
|
25
|
-
<p style={{ marginBottom: '10px' }}>Hello, User!</p>
|
|
26
|
-
<button style={buttonStyle}>Logout</button>
|
|
27
|
-
<Popover.Arrow style={popoverArrowStyle} />
|
|
28
|
-
</Popover.Content>
|
|
29
|
-
</Popover.Portal>
|
|
30
|
-
</Popover.Root>
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// Basic styles
|
|
35
|
-
const avatarContainerStyle: React.CSSProperties = {
|
|
36
|
-
display: 'inline-flex',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
justifyContent: 'center',
|
|
39
|
-
width: '40px',
|
|
40
|
-
height: '40px',
|
|
41
|
-
borderRadius: '100%',
|
|
42
|
-
backgroundColor: '#ccc',
|
|
43
|
-
cursor: 'pointer',
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const avatarImageStyle: React.CSSProperties = {
|
|
47
|
-
width: '100%',
|
|
48
|
-
height: '100%',
|
|
49
|
-
borderRadius: '100%',
|
|
50
|
-
objectFit: 'cover',
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const avatarFallbackStyle: React.CSSProperties = {
|
|
54
|
-
width: '100%',
|
|
55
|
-
height: '100%',
|
|
56
|
-
borderRadius: '100%',
|
|
57
|
-
backgroundColor: '#007bff',
|
|
58
|
-
color: 'white',
|
|
59
|
-
display: 'flex',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
justifyContent: 'center',
|
|
62
|
-
fontSize: '20px',
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const popoverContentStyle: React.CSSProperties = {
|
|
66
|
-
padding: '20px',
|
|
67
|
-
borderRadius: '8px',
|
|
68
|
-
backgroundColor: 'white',
|
|
69
|
-
boxShadow: '0 2px 10px rgba(0, 0, 0, 0.2)',
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const buttonStyle: React.CSSProperties = {
|
|
73
|
-
padding: '8px 16px',
|
|
74
|
-
backgroundColor: '#007bff',
|
|
75
|
-
color: '#fff',
|
|
76
|
-
border: 'none',
|
|
77
|
-
borderRadius: '4px',
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const popoverArrowStyle: React.CSSProperties = {
|
|
82
|
-
fill: 'white',
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default LoginButton;
|