@contentful/live-preview
Advanced tools
Comparing version 2.11.13 to 2.12.0
@@ -1,9 +0,3 @@ | ||
export declare const DATA_CURR_FIELD_ID: string; | ||
export declare const DATA_CURR_ENTRY_ID: string; | ||
export declare const DATA_CURR_LOCALE: string; | ||
export declare const TOOLTIP_CLASS = "contentful-tooltip"; | ||
export declare const TOOLTIP_HEIGHT = 32; | ||
export declare const TOOLTIP_PADDING_LEFT = 5; | ||
export declare const MAX_DEPTH = 10; | ||
export declare const LIVE_PREVIEW_EDITOR_SOURCE: "live-preview-editor"; | ||
export declare const LIVE_PREVIEW_SDK_SOURCE: "live-preview-sdk"; |
import { type DocumentNode } from 'graphql'; | ||
import { InspectorMode } from './inspectorMode'; | ||
import { type InspectorModeTags } from './inspectorMode/types'; | ||
import { LiveUpdates } from './liveUpdates'; | ||
import { EditorMessage, PostMessageMethods } from './messages'; | ||
import { type EditorMessage, type PostMessageMethods } from './messages'; | ||
import { SaveEvent } from './saveEvent'; | ||
import { Argument, InspectorModeTags, LivePreviewProps, SubscribeCallback } from './types'; | ||
import type { Argument, LivePreviewProps, SubscribeCallback } from './types'; | ||
export declare const VERSION: string; | ||
@@ -8,0 +9,0 @@ export interface ContentfulLivePreviewInitConfig { |
@@ -1,11 +0,12 @@ | ||
import { C as t, L as E, a as o, b as a, P as i, V as r, o as I } from "./index-827f3e49.js"; | ||
import { C as t, I as o, L as E, a, b as I, P as r, V as i, o as n } from "./index-f3b45ad7.js"; | ||
export { | ||
t as ContentfulLivePreview, | ||
o as InspectorModeEventMethods, | ||
E as LIVE_PREVIEW_EDITOR_SOURCE, | ||
o as LIVE_PREVIEW_SDK_SOURCE, | ||
a as LivePreviewPostMessageMethods, | ||
i as StorePostMessageMethods, | ||
r as VERSION, | ||
I as openEntryInEditorUtility | ||
a as LIVE_PREVIEW_SDK_SOURCE, | ||
I as LivePreviewPostMessageMethods, | ||
r as StorePostMessageMethods, | ||
i as VERSION, | ||
n as openEntryInEditorUtility | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -6,2 +6,3 @@ import type { RequestEntitiesMessage, RequestedEntitiesMessage } from '@contentful/visual-sdk'; | ||
import type { LIVE_PREVIEW_EDITOR_SOURCE, LIVE_PREVIEW_SDK_SOURCE } from './constants'; | ||
import { type InspectorModeAttributes, type InspectorModeChangedMessage, InspectorModeEventMethods, type InspectorModeMouseMoveMessage, type InspectorModeResizeMessage, type InspectorModeScrollMessage, type InspectorModeTaggedElementsMessage } from './inspectorMode/types'; | ||
import type { ContentType, EntityReferenceMap } from './types'; | ||
@@ -21,3 +22,2 @@ declare enum LivePreviewPostMessageMethods { | ||
ENTRY_SAVED = "ENTRY_SAVED", | ||
INSPECTOR_MODE_CHANGED = "INSPECTOR_MODE_CHANGED", | ||
DEBUG_MODE_ENABLED = "DEBUG_MODE_ENABLED", | ||
@@ -33,4 +33,4 @@ /** | ||
} | ||
export { StorePostMessageMethods, LivePreviewPostMessageMethods, RequestEntitiesMessage, RequestedEntitiesMessage, }; | ||
export type PostMessageMethods = LivePreviewPostMessageMethods | StorePostMessageMethods; | ||
export { StorePostMessageMethods, LivePreviewPostMessageMethods, RequestEntitiesMessage, RequestedEntitiesMessage, InspectorModeEventMethods, }; | ||
export type PostMessageMethods = LivePreviewPostMessageMethods | StorePostMessageMethods | InspectorModeEventMethods; | ||
export type ConnectedMessage = { | ||
@@ -50,6 +50,3 @@ /** @deprecated use method instead */ | ||
action: LivePreviewPostMessageMethods.TAGGED_FIELD_CLICKED; | ||
fieldId: string; | ||
entryId: string; | ||
locale: string; | ||
}; | ||
} & InspectorModeAttributes; | ||
/** @deprecated use RequestEntitiesMessage instead */ | ||
@@ -83,3 +80,3 @@ export type UnknownEntityMessage = { | ||
}; | ||
export type EditorMessage = ConnectedMessage | TaggedFieldClickMessage | UnknownEntityMessage | UrlChangedMessage | SubscribedMessage | RequestEntitiesMessage | ErrorMessage; | ||
export type EditorMessage = ConnectedMessage | TaggedFieldClickMessage | UnknownEntityMessage | UrlChangedMessage | SubscribedMessage | RequestEntitiesMessage | ErrorMessage | InspectorModeMouseMoveMessage | InspectorModeScrollMessage | InspectorModeResizeMessage | InspectorModeTaggedElementsMessage; | ||
export type MessageFromSDK = EditorMessage & { | ||
@@ -115,7 +112,2 @@ method: PostMessageMethods; | ||
}; | ||
export type InspectorModeChangedMessage = { | ||
/** @deprecated use method instead */ | ||
action: LivePreviewPostMessageMethods.INSPECTOR_MODE_CHANGED; | ||
isInspectorActive: boolean; | ||
}; | ||
export type DebugModeEnabledMessage = { | ||
@@ -122,0 +114,0 @@ /** @deprecated use method instead */ |
import { useEffect, type PropsWithChildren, type ReactElement } from 'react'; | ||
import { DocumentNode } from 'graphql'; | ||
import { ContentfulLivePreviewInitConfig } from './index'; | ||
import { Argument, InspectorModeTags, LivePreviewProps } from './types'; | ||
import type { InspectorModeTags } from './inspectorMode/types'; | ||
import { Argument, LivePreviewProps } from './types'; | ||
type UseEffectParams = Parameters<typeof useEffect>; | ||
@@ -6,0 +7,0 @@ type EffectCallback = UseEffectParams[0]; |
import Zr, { createContext as At, useRef as mr, useMemo as $r, useEffect as jt, useState as Dt, useContext as Qr, useCallback as It } from "react"; | ||
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-827f3e49.js"; | ||
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-f3b45ad7.js"; | ||
var Mr = { exports: {} }, Me = {}; | ||
@@ -4,0 +4,0 @@ /** |
@@ -11,12 +11,2 @@ import type { Asset, Entry } from 'contentful'; | ||
}; | ||
export declare const enum TagAttributes { | ||
FIELD_ID = "data-contentful-field-id", | ||
ENTRY_ID = "data-contentful-entry-id", | ||
LOCALE = "data-contentful-locale" | ||
} | ||
export type InspectorModeTags = { | ||
[TagAttributes.ENTRY_ID]: string; | ||
[TagAttributes.FIELD_ID]: string; | ||
[TagAttributes.LOCALE]?: string; | ||
} | null; | ||
export interface SysProps { | ||
@@ -23,0 +13,0 @@ id: string; |
{ | ||
"name": "@contentful/live-preview", | ||
"version": "2.11.13", | ||
"version": "2.12.0", | ||
"author": "Contentful GmbH", | ||
@@ -80,3 +80,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "894a4130994db029fc1b646bde3b9acd046eba82" | ||
"gitHead": "d41e9c6963cb25d91de52b4784bb320097c04f46" | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
756730
45
3706
3