@contentful/live-preview
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -7,5 +7,6 @@ export type LivePreviewProps = { | ||
export declare const getLivePreviewProps: ({ fieldId, entryId, locale }: LivePreviewProps) => { | ||
'data-contentful-field-id': string | null | undefined; | ||
'data-contentful-entry-id': string | null | undefined; | ||
'data-contentful-locale': string | null | undefined; | ||
"data-contentful-field-id": string | null | undefined; | ||
"data-contentful-entry-id": string | null | undefined; | ||
"data-contentful-locale": string | null | undefined; | ||
onClick: () => void | undefined; | ||
}; |
const a = ({ fieldId: t, entryId: e, locale: n }) => ({ | ||
"data-contentful-field-id": t, | ||
"data-contentful-entry-id": e, | ||
"data-contentful-locale": n | ||
[ | ||
"data-contentful-field-id" | ||
/* FIELD_ID */ | ||
]: t, | ||
[ | ||
"data-contentful-entry-id" | ||
/* ENTRY_ID */ | ||
]: e, | ||
[ | ||
"data-contentful-locale" | ||
/* LOCALE */ | ||
]: n, | ||
onClick: () => { | ||
var o; | ||
return (o = window.top) == null ? void 0 : o.postMessage( | ||
{ | ||
fieldId: t, | ||
entryId: e, | ||
locale: n | ||
}, | ||
//todo: check if there is any security risk with this | ||
"*" | ||
); | ||
} | ||
}); | ||
@@ -6,0 +27,0 @@ export { |
{ | ||
"name": "@contentful/live-preview", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"author": "Contentful GmbH", | ||
@@ -26,2 +26,3 @@ "license": "MIT", | ||
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx", | ||
"tsc": "tsc --noEmit", | ||
"test": "vitest", | ||
@@ -32,3 +33,4 @@ "test:ci": "vitest run", | ||
"presemantic-release": "yarn build", | ||
"semantic-release": "semantic-release" | ||
"semantic-release": "semantic-release", | ||
"cm": "git-cz" | ||
}, | ||
@@ -46,5 +48,8 @@ "homepage": "https://github.com/contentful/live-preview#readme", | ||
"@vitejs/plugin-react-swc": "^3.0.0", | ||
"commitizen": "4.3.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-import-helpers": "^1.2.1", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.1.2", | ||
"prettier": "^2.8.4", | ||
"react": "^18.2.0", | ||
@@ -62,2 +67,16 @@ "react-dom": "^18.2.0", | ||
}, | ||
"lint-staged": { | ||
"*.{t,j}s?(x)": [ | ||
"prettier --write", | ||
"eslint --fix" | ||
], | ||
"*.{json,yml,html}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"release": { | ||
@@ -64,0 +83,0 @@ "branches": [ |
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
7000
45
21