@conference-kit/nextjs 0.0.1
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/package.json +27 -0
- package/src/index.tsx +18 -0
- package/tsconfig.json +8 -0
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@conference-kit/nextjs",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.json"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@conference-kit/react": "^0.0.1"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"next": ">=13.0.0",
|
|
21
|
+
"react": ">=18.2.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^18.3.27",
|
|
25
|
+
"typescript": "^5.9.3"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import dynamic from "next/dynamic";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
export * from "@conference-kit/react";
|
|
7
|
+
|
|
8
|
+
export const isClient = typeof window !== "undefined";
|
|
9
|
+
|
|
10
|
+
export function dynamicClient<T>(
|
|
11
|
+
factory: () => Promise<{ default: T }>,
|
|
12
|
+
loading?: ReactNode
|
|
13
|
+
) {
|
|
14
|
+
return dynamic(factory as any, {
|
|
15
|
+
ssr: false,
|
|
16
|
+
loading: loading ? () => <>{loading}</> : undefined,
|
|
17
|
+
});
|
|
18
|
+
}
|