next-sanity
Advanced tools
Comparing version 0.7.0 to 0.7.1-new-preview-mode.1
@@ -32,3 +32,3 @@ /// <reference types="react" /> | ||
static getInitialProps(ctx: DocumentContext): Promise<{ | ||
styles: ({} | undefined)[]; | ||
styles: (JSX.Element | import("react").ReactFragment | undefined)[]; | ||
html: string; | ||
@@ -35,0 +35,0 @@ head?: (JSX.Element | null)[] | undefined; |
@@ -15,1 +15,2 @@ import { ProjectConfig } from './types'; | ||
}; | ||
export declare function useParams(params: Params): Params; |
@@ -32,3 +32,3 @@ /// <reference types="react" /> | ||
static getInitialProps(ctx: DocumentContext): Promise<{ | ||
styles: ({} | undefined)[]; | ||
styles: (JSX.Element | import("react").ReactFragment | undefined)[]; | ||
html: string; | ||
@@ -35,0 +35,0 @@ head?: (JSX.Element | null)[] | undefined; |
@@ -15,1 +15,2 @@ import { ProjectConfig } from './types'; | ||
}; | ||
export declare function useParams(params: Params): Params; |
{ | ||
"name": "next-sanity", | ||
"version": "0.7.0", | ||
"version": "0.7.1-new-preview-mode.1", | ||
"description": "Sanity.io toolkit for Next.js", | ||
@@ -30,6 +30,11 @@ "keywords": [ | ||
"./package.json": "./package.json", | ||
"./preview": { | ||
"source": "./src/preview/index.ts", | ||
"require": "./lib/cjs/preview/index.js", | ||
"default": "./lib/esm/preview/index.js" | ||
}, | ||
"./studio": { | ||
"source": "./src/studio.ts", | ||
"require": "./lib/cjs/studio.js", | ||
"default": "./lib/esm/studio.js" | ||
"source": "./src/studio/index.ts", | ||
"require": "./lib/cjs/studio/index.js", | ||
"default": "./lib/esm/studio/index.js" | ||
} | ||
@@ -41,4 +46,7 @@ }, | ||
"*": { | ||
"preview": [ | ||
"./lib/dts/preview/index.d.ts" | ||
], | ||
"studio": [ | ||
"./lib/dts/studio.d.ts" | ||
"./lib/dts/studio/index.d.ts" | ||
] | ||
@@ -55,3 +63,3 @@ } | ||
"prebuild": "npm run clean && node scripts/preParcel.js", | ||
"build": "npm run tsdx build && parcel build && tsc --declarationDir lib/dts --project tsconfig.studio.json", | ||
"build": "npm run tsdx build && parcel build && tsc --project tsconfig.build.json", | ||
"clean": "rimraf lib", | ||
@@ -79,3 +87,6 @@ "coverage": "npm test -- --coverage", | ||
"@sanity/groq-store": "^0.4.0", | ||
"groq": "^2.29.3" | ||
"@swc/helpers": "^0.4.6", | ||
"eventsource": "^2.0.2", | ||
"groq": "^2.29.3", | ||
"use-sync-external-store": "^1.2.0" | ||
}, | ||
@@ -88,6 +99,8 @@ "devDependencies": { | ||
"@types/jest": "^28.1.6", | ||
"@types/react": "^17.0.17", | ||
"@types/react": "^18.0.6", | ||
"@types/react-dom": "^18.0.6", | ||
"@types/styled-components": "^5.1.26", | ||
"@types/use-sync-external-store": "^0.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"autoprefixer": "^10.4.8", | ||
"eslint": "^8.21.0", | ||
@@ -104,2 +117,3 @@ "eslint-config-next": "^12.2.4", | ||
"parcel": "^2.7.0", | ||
"postcss": "^8.4.16", | ||
"prettier": "^2.7.1", | ||
@@ -113,2 +127,3 @@ "prettier-plugin-packagejson": "^2.2.18", | ||
"styled-components": "^5.3.5", | ||
"tailwindcss": "^3.1.8", | ||
"tsdx": "^0.14.1", | ||
@@ -127,3 +142,6 @@ "typescript": "^4.7.4", | ||
"distDir": "./lib/cjs", | ||
"source": "./src/studio.ts", | ||
"source": [ | ||
"./src/studio/index.ts", | ||
"./src/preview/index.ts" | ||
], | ||
"outputFormat": "commonjs", | ||
@@ -139,3 +157,6 @@ "isLibrary": true, | ||
"distDir": "./lib/esm", | ||
"source": "./src/studio.ts", | ||
"source": [ | ||
"./src/studio/index.ts", | ||
"./src/preview/index.ts" | ||
], | ||
"outputFormat": "esmodule", | ||
@@ -142,0 +163,0 @@ "isLibrary": true, |
@@ -217,3 +217,3 @@ # next-sanity<!-- omit in toc --> | ||
> [See it live](https://next.sanity.build/) | ||
> [See it live](https://next.sanity.build/studio) | ||
@@ -220,0 +220,0 @@ The latest version of Sanity Studio allows you to embed a near-infinitely configurable content editing interface into any React application. This opens up many possibilities: |
@@ -138,5 +138,5 @@ import {GroqStore, Subscription} from '@sanity/groq-store' | ||
// Return params that are stable with deep equal as long as the key order is the same | ||
function useParams(params: Params): Params { | ||
export function useParams(params: Params): Params { | ||
const stringifiedParams = useMemo(() => JSON.stringify(params), [params]) | ||
return useMemo(() => JSON.parse(stringifiedParams), [stringifiedParams]) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
325910
90
2875
7
35
5
+ Added@swc/helpers@^0.4.6
+ Addedeventsource@^2.0.2
+ Added@swc/helpers@0.4.36(transitive)
+ Addedtslib@2.7.0(transitive)
+ Addeduse-sync-external-store@1.2.2(transitive)