@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.
@@ -1,29 +1,30 @@
1
1
 
2
2
  
3
- > @basictech/nextjs@0.6.0-beta.6 build
3
+ > @basictech/nextjs@0.7.0-beta.1 build
4
4
  > tsup
5
5
 
6
- CLI Building entry: src/index.ts, src/client.ts
6
+ CLI Building entry: src/client.ts, src/index.ts
7
7
  CLI Using tsconfig: tsconfig.json
8
- CLI tsup v7.2.0
8
+ CLI tsup v8.5.1
9
9
  CLI Using tsup config: /Users/raz/codebook/basic/libs/client-ts/packages/nextjs/tsup.config.ts
10
10
  CLI Target: es2022
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- ESM dist/index.mjs 2.22 KB
15
- ESM dist/client.mjs 375.00 B
16
- ESM dist/index.mjs.map 6.68 KB
17
- ESM dist/client.mjs.map 933.00 B
18
- ESM ⚡️ Build success in 19ms
19
- CJS dist/client.js 1.60 KB
14
+ CJS dist/client.js 1.67 KB
20
15
  CJS dist/index.js 3.43 KB
21
- CJS dist/client.js.map 927.00 B
16
+ CJS dist/client.js.map 1000.00 B
22
17
  CJS dist/index.js.map 7.77 KB
23
- CJS ⚡️ Build success in 20ms
24
- DTS Build start
25
- DTS ⚡️ Build success in 1866ms
26
- DTS dist/client.d.ts 303.00 B
27
- DTS dist/index.d.ts 2.47 KB
28
- DTS dist/client.d.mts 303.00 B
29
- DTS dist/index.d.mts 2.47 KB
18
+ CJS ⚡️ Build success in 23ms
19
+ ESM dist/index.mjs 2.22 KB
20
+ ESM dist/client.mjs 413.00 B
21
+ ESM dist/index.mjs.map 6.68 KB
22
+ ESM dist/client.mjs.map 1011.00 B
23
+ ESM ⚡️ 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
+ ⠙
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,
@@ -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,mBASO;","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":";;;;;;;;;;;;;;;;;;;;;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,
@@ -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 src_exports = {};
22
- __export(src_exports, {
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(src_exports);
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.6.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.7.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
- "tsup": "^7.2.0",
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,
@@ -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;