@atlaskit/editor-plugin-card 12.3.2 → 12.3.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 12.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`edd1a9cea5ca1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edd1a9cea5ca1) -
8
+ Make sure exposure fires regardless of whether the url is in cache
9
+
10
+ ## 12.3.3
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 12.3.2
4
17
 
5
18
  ### Patch Changes
@@ -127,7 +127,7 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
127
127
  var card = (0, _react.useMemo)(function () {
128
128
  var _cardContext$value2;
129
129
  var cardState = cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 || (_cardContext$value2 = _cardContext$value2.store) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.getState()[url || ''];
130
- if ((isPageSSRed || cardState && (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
130
+ if ((isPageSSRed || (0, _expValEquals.expValEquals)('platform_editor_smartlink_local_cache', 'isEnabled', true) && cardState) && url) {
131
131
  return /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
132
132
  key: url,
133
133
  url: url,
@@ -122,7 +122,7 @@ export const InlineCard = /*#__PURE__*/memo(({
122
122
  const card = useMemo(() => {
123
123
  var _cardContext$value2, _cardContext$value2$s;
124
124
  const cardState = cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : (_cardContext$value2$s = _cardContext$value2.store) === null || _cardContext$value2$s === void 0 ? void 0 : _cardContext$value2$s.getState()[url || ''];
125
- if ((isPageSSRed || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
125
+ if ((isPageSSRed || expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && cardState) && url) {
126
126
  return /*#__PURE__*/React.createElement(CardSSR, {
127
127
  key: url,
128
128
  url: url,
@@ -115,7 +115,7 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
115
115
  var card = useMemo(function () {
116
116
  var _cardContext$value2;
117
117
  var cardState = cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 || (_cardContext$value2 = _cardContext$value2.store) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.getState()[url || ''];
118
- if ((isPageSSRed || cardState && expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true)) && url) {
118
+ if ((isPageSSRed || expValEquals('platform_editor_smartlink_local_cache', 'isEnabled', true) && cardState) && url) {
119
119
  return /*#__PURE__*/React.createElement(CardSSR, {
120
120
  key: url,
121
121
  url: url,
@@ -5,5 +5,5 @@ import type { CardProvider } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
6
  import type { DatasourceAdf } from '@atlaskit/linking-common';
7
7
  import type { Request } from '../../types';
8
- export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf<Record<string, unknown>>>;
8
+ export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | DatasourceAdf<Record<string, unknown>> | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf>;
9
9
  export declare const handleProvider: (_: "cardProvider", provider: Promise<CardProvider> | undefined, view: EditorView) => void;
@@ -10,7 +10,7 @@ export declare function getNodeSubject(node: Node): EVENT_SUBJECT | null;
10
10
  /**
11
11
  * Analytics appearance for link object
12
12
  */
13
- export declare function appearanceForLink(node: Node): "url" | import("@atlaskit/editor-common/provider-factory").CardAppearance;
13
+ export declare function appearanceForLink(node: Node): import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
14
14
  export declare function getUrl(node: Node): string | undefined;
15
15
  export declare const getNodeContext: (doc: Node, pos: number) => string;
16
16
  export declare const findAtPositions: (tr: Transaction | ReadonlyTransaction, positions: number[]) => Entity[];
@@ -20,5 +20,5 @@ export declare class DatasourceErrorBoundary extends React.Component<DatasourceE
20
20
  error: Error | APIError;
21
21
  };
22
22
  componentDidCatch(error: Error | APIError): void;
23
- render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
23
+ render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
24
24
  }
@@ -5,5 +5,5 @@ import type { CardProvider } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
6
  import type { DatasourceAdf } from '@atlaskit/linking-common';
7
7
  import type { Request } from '../../types';
8
- export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf<Record<string, unknown>>>;
8
+ export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | DatasourceAdf<Record<string, unknown>> | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf>;
9
9
  export declare const handleProvider: (_: "cardProvider", provider: Promise<CardProvider> | undefined, view: EditorView) => void;
@@ -10,7 +10,7 @@ export declare function getNodeSubject(node: Node): EVENT_SUBJECT | null;
10
10
  /**
11
11
  * Analytics appearance for link object
12
12
  */
13
- export declare function appearanceForLink(node: Node): "url" | import("@atlaskit/editor-common/provider-factory").CardAppearance;
13
+ export declare function appearanceForLink(node: Node): import("@atlaskit/editor-common/provider-factory").CardAppearance | "url";
14
14
  export declare function getUrl(node: Node): string | undefined;
15
15
  export declare const getNodeContext: (doc: Node, pos: number) => string;
16
16
  export declare const findAtPositions: (tr: Transaction | ReadonlyTransaction, positions: number[]) => Entity[];
@@ -20,5 +20,5 @@ export declare class DatasourceErrorBoundary extends React.Component<DatasourceE
20
20
  error: Error | APIError;
21
21
  };
22
22
  componentDidCatch(error: Error | APIError): void;
23
- render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
23
+ render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "12.3.2",
3
+ "version": "12.3.4",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/prosemirror-history": "^0.2.0",
62
62
  "@atlaskit/smart-card": "^43.24.0",
63
63
  "@atlaskit/theme": "^21.0.0",
64
- "@atlaskit/tmp-editor-statsig": "^22.1.0",
64
+ "@atlaskit/tmp-editor-statsig": "^23.1.0",
65
65
  "@atlaskit/tokens": "^11.0.0",
66
66
  "@babel/runtime": "^7.0.0",
67
67
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^111.11.0",
74
+ "@atlaskit/editor-common": "^111.12.0",
75
75
  "@atlaskit/link-provider": "^4.1.0",
76
76
  "react": "^18.2.0",
77
77
  "react-intl-next": "npm:react-intl@^5.18.1"