@atlaskit/editor-synced-block-renderer 12.0.0 → 13.0.0

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,19 @@
1
1
  # @atlaskit/editor-synced-block-renderer
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`0b4753c0a8c07`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0b4753c0a8c07) -
14
+ Clean up feature gates from completed rollout
15
+ - Updated dependencies
16
+
3
17
  ## 12.0.0
4
18
 
5
19
  ### Patch Changes
@@ -46,9 +46,6 @@
46
46
  {
47
47
  "path": "../../../design-system/image/afm-cc/tsconfig.json"
48
48
  },
49
- {
50
- "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
51
- },
52
49
  {
53
50
  "path": "../../../design-system/primitives/afm-cc/tsconfig.json"
54
51
  },
@@ -46,9 +46,6 @@
46
46
  {
47
47
  "path": "../../../design-system/image/afm-products/tsconfig.json"
48
48
  },
49
- {
50
- "path": "../../../platform/feature-flags/afm-products/tsconfig.json"
51
- },
52
49
  {
53
50
  "path": "../../../design-system/primitives/afm-products/tsconfig.json"
54
51
  },
package/compass.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  configVersion: 1
2
2
  id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/339fa24d-6d94-4121-b00a-f8cc50663f94
3
3
  name: '@atlaskit/editor-synced-block-renderer'
4
- ownerId: ari:cloud:identity::team/2484e1f6-f62c-4a70-95f1-8e5695c51b6b # Editor Jenga
4
+ ownerId: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb # Editor Developers
5
5
  labels:
6
6
  - platform-code
7
7
  - platform-afm
@@ -16,14 +16,14 @@ links:
16
16
  url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
17
17
  - name: Slack Channel
18
18
  type: CHAT_CHANNEL
19
- url: https://atlassian.enterprise.slack.com/archives/C061GUMN3NY # #team-cc-editor-exp-cloud-native
19
+ url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
20
20
  - name: Editor Synced Block Renderer
21
21
  type: REPOSITORY
22
22
  url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-synced-block-renderer
23
23
  customFields:
24
24
  - name: Department
25
25
  type: text
26
- value: Eng - Editor Autonomy - Jenga
26
+ value: Editor Developers
27
27
  - name: Trusted Reviewer Teams
28
28
  type: text
29
29
  value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
@@ -11,7 +11,6 @@ var _syncBlock = require("@atlaskit/editor-common/sync-block");
11
11
  var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
12
12
  var _errorHandling = require("@atlaskit/editor-synced-block-provider/errorHandling");
13
13
  var _utils = require("@atlaskit/editor-synced-block-provider/utils");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _SyncedBlockEntityNotFoundError = require("./SyncedBlockEntityNotFoundError");
16
15
  var _SyncedBlockGenericError = require("./SyncedBlockGenericError");
17
16
  var _SyncedBlockLoadError = require("./SyncedBlockLoadError");
@@ -54,10 +53,8 @@ var SyncedBlockErrorComponent = exports.SyncedBlockErrorComponent = function Syn
54
53
  // Emit structured attribution via the shared builder instead of an opaque
55
54
  // `errored`-only blob. Prefer the PII-safe `originalMessage` so the classifier
56
55
  // can bucket the real cause; fall back to `reason` then the bare `type`.
57
- // Gate-off is a no-op (builder returns undefined → no new attributes).
58
- var gateEnabled = (0, _platformFeatureFlags.fg)('platform_editor_blocks_patch_4');
59
56
  var rawError = (error === null || error === void 0 ? void 0 : error.originalMessage) || (error === null || error === void 0 ? void 0 : error.reason) || (error === null || error === void 0 ? void 0 : error.type) || 'unknown';
60
- fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent((0, _editorSyncedBlockProvider.fetchErrorPayload)("".concat(rawError, ": error component rendered"), resourceId, (0, _utils.getSourceProductFromResourceIdSafe)(resourceId), (0, _errorHandling.buildFetchErrorAttribution)(gateEnabled, rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
57
+ fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent((0, _editorSyncedBlockProvider.fetchErrorPayload)("".concat(rawError, ": error component rendered"), resourceId, (0, _utils.getSourceProductFromResourceIdSafe)(resourceId), (0, _errorHandling.buildFetchErrorAttribution)(rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
61
58
  }, [error === null || error === void 0 ? void 0 : error.originalMessage, error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, error === null || error === void 0 ? void 0 : error.statusCode, resourceId, fireAnalyticsEvent]);
62
59
  var getErrorContent = (0, _react.useMemo)(function () {
63
60
  switch (error === null || error === void 0 ? void 0 : error.type) {
@@ -10,7 +10,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
10
10
  var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
11
11
  var _syncBlock = require("@atlaskit/editor-common/sync-block");
12
12
  var _editorSyncedBlockProvider = require("@atlaskit/editor-synced-block-provider");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _SyncedBlockNodeComponentRenderer = require("./ui/SyncedBlockNodeComponentRenderer");
15
14
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
15
  var getSyncBlockNodesFromDoc = exports.getSyncBlockNodesFromDoc = function getSyncBlockNodesFromDoc(doc) {
@@ -46,18 +45,13 @@ var useMemoizedSyncedBlockNodeComponent = exports.useMemoizedSyncedBlockNodeComp
46
45
 
47
46
  // Initial fetch sync block data (will use SSR data as initial cache, or the prefetched data if available)
48
47
  (0, _react.useEffect)(function () {
48
+ var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
49
49
  // On Jira the data provider resolves asynchronously (and is nulled on
50
50
  // `destroy()`), so an eager fetch can throw `Data provider not set`
51
51
  // (EDITOR-7860). Skip until ready; the effect re-runs (referenceManager
52
52
  // identity changes) once the provider resolves, fetching exactly once.
53
- // Readiness is nested under the gate so it is not consulted when the gate
54
- // is off (today's behaviour), while `fg()` stays a standalone condition so
55
- // gate exposure is tracked (@atlaskit/platform/no-preconditioning).
56
- if ((0, _platformFeatureFlags.fg)('platform_editor_blocks_patch_3')) {
57
- var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
58
- if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
59
- return;
60
- }
53
+ if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
54
+ return;
61
55
  }
62
56
  syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
63
57
  }, [syncBlockNodes, syncBlockStoreManager.referenceManager]);
@@ -4,7 +4,6 @@ import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block'
4
4
  import { fetchErrorPayload, getContentIdAndProductFromResourceId, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
5
5
  import { buildFetchErrorAttribution } from '@atlaskit/editor-synced-block-provider/errorHandling';
6
6
  import { getSourceProductFromResourceIdSafe } from '@atlaskit/editor-synced-block-provider/utils';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { SyncedBlockEntityNotFoundError } from './SyncedBlockEntityNotFoundError';
9
8
  import { SyncedBlockGenericError } from './SyncedBlockGenericError';
10
9
  import { SyncedBlockLoadError } from './SyncedBlockLoadError';
@@ -48,10 +47,8 @@ export const SyncedBlockErrorComponent = ({
48
47
  // Emit structured attribution via the shared builder instead of an opaque
49
48
  // `errored`-only blob. Prefer the PII-safe `originalMessage` so the classifier
50
49
  // can bucket the real cause; fall back to `reason` then the bare `type`.
51
- // Gate-off is a no-op (builder returns undefined → no new attributes).
52
- const gateEnabled = fg('platform_editor_blocks_patch_4');
53
50
  const rawError = (error === null || error === void 0 ? void 0 : error.originalMessage) || (error === null || error === void 0 ? void 0 : error.reason) || (error === null || error === void 0 ? void 0 : error.type) || 'unknown';
54
- fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 ? void 0 : fireAnalyticsEvent(fetchErrorPayload(`${rawError}: error component rendered`, resourceId, getSourceProductFromResourceIdSafe(resourceId), buildFetchErrorAttribution(gateEnabled, rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
51
+ fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 ? void 0 : fireAnalyticsEvent(fetchErrorPayload(`${rawError}: error component rendered`, resourceId, getSourceProductFromResourceIdSafe(resourceId), buildFetchErrorAttribution(rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
55
52
  }, [error === null || error === void 0 ? void 0 : error.originalMessage, error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, error === null || error === void 0 ? void 0 : error.statusCode, resourceId, fireAnalyticsEvent]);
56
53
  const getErrorContent = useMemo(() => {
57
54
  switch (error === null || error === void 0 ? void 0 : error.type) {
@@ -3,7 +3,6 @@ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
3
3
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
4
4
  import { SyncBlockActionsProvider } from '@atlaskit/editor-common/sync-block';
5
5
  import { convertSyncBlockJSONNodeToSyncBlockNode, useMemoizedSyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { SyncedBlockNodeComponentRenderer } from './ui/SyncedBlockNodeComponentRenderer';
8
7
  export const getSyncBlockNodesFromDoc = doc => {
9
8
  const {
@@ -37,18 +36,13 @@ export const useMemoizedSyncedBlockNodeComponent = ({
37
36
 
38
37
  // Initial fetch sync block data (will use SSR data as initial cache, or the prefetched data if available)
39
38
  useEffect(() => {
39
+ var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
40
40
  // On Jira the data provider resolves asynchronously (and is nulled on
41
41
  // `destroy()`), so an eager fetch can throw `Data provider not set`
42
42
  // (EDITOR-7860). Skip until ready; the effect re-runs (referenceManager
43
43
  // identity changes) once the provider resolves, fetching exactly once.
44
- // Readiness is nested under the gate so it is not consulted when the gate
45
- // is off (today's behaviour), while `fg()` stays a standalone condition so
46
- // gate exposure is tracked (@atlaskit/platform/no-preconditioning).
47
- if (fg('platform_editor_blocks_patch_3')) {
48
- var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
49
- if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
50
- return;
51
- }
44
+ if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
45
+ return;
52
46
  }
53
47
  syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
54
48
  }, [syncBlockNodes, syncBlockStoreManager.referenceManager]);
@@ -4,7 +4,6 @@ import { SyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block'
4
4
  import { fetchErrorPayload, getContentIdAndProductFromResourceId, SyncBlockError } from '@atlaskit/editor-synced-block-provider';
5
5
  import { buildFetchErrorAttribution } from '@atlaskit/editor-synced-block-provider/errorHandling';
6
6
  import { getSourceProductFromResourceIdSafe } from '@atlaskit/editor-synced-block-provider/utils';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { SyncedBlockEntityNotFoundError } from './SyncedBlockEntityNotFoundError';
9
8
  import { SyncedBlockGenericError } from './SyncedBlockGenericError';
10
9
  import { SyncedBlockLoadError } from './SyncedBlockLoadError';
@@ -46,10 +45,8 @@ export var SyncedBlockErrorComponent = function SyncedBlockErrorComponent(_ref)
46
45
  // Emit structured attribution via the shared builder instead of an opaque
47
46
  // `errored`-only blob. Prefer the PII-safe `originalMessage` so the classifier
48
47
  // can bucket the real cause; fall back to `reason` then the bare `type`.
49
- // Gate-off is a no-op (builder returns undefined → no new attributes).
50
- var gateEnabled = fg('platform_editor_blocks_patch_4');
51
48
  var rawError = (error === null || error === void 0 ? void 0 : error.originalMessage) || (error === null || error === void 0 ? void 0 : error.reason) || (error === null || error === void 0 ? void 0 : error.type) || 'unknown';
52
- fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent(fetchErrorPayload("".concat(rawError, ": error component rendered"), resourceId, getSourceProductFromResourceIdSafe(resourceId), buildFetchErrorAttribution(gateEnabled, rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
49
+ fireAnalyticsEvent === null || fireAnalyticsEvent === void 0 || fireAnalyticsEvent(fetchErrorPayload("".concat(rawError, ": error component rendered"), resourceId, getSourceProductFromResourceIdSafe(resourceId), buildFetchErrorAttribution(rawError, error === null || error === void 0 ? void 0 : error.statusCode)));
53
50
  }, [error === null || error === void 0 ? void 0 : error.originalMessage, error === null || error === void 0 ? void 0 : error.reason, error === null || error === void 0 ? void 0 : error.type, error === null || error === void 0 ? void 0 : error.statusCode, resourceId, fireAnalyticsEvent]);
54
51
  var getErrorContent = useMemo(function () {
55
52
  switch (error === null || error === void 0 ? void 0 : error.type) {
@@ -3,7 +3,6 @@ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
3
3
  import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
4
4
  import { SyncBlockActionsProvider } from '@atlaskit/editor-common/sync-block';
5
5
  import { convertSyncBlockJSONNodeToSyncBlockNode, useMemoizedSyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { SyncedBlockNodeComponentRenderer } from './ui/SyncedBlockNodeComponentRenderer';
8
7
  export var getSyncBlockNodesFromDoc = function getSyncBlockNodesFromDoc(doc) {
9
8
  var content = doc.content;
@@ -38,18 +37,13 @@ export var useMemoizedSyncedBlockNodeComponent = function useMemoizedSyncedBlock
38
37
 
39
38
  // Initial fetch sync block data (will use SSR data as initial cache, or the prefetched data if available)
40
39
  useEffect(function () {
40
+ var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
41
41
  // On Jira the data provider resolves asynchronously (and is nulled on
42
42
  // `destroy()`), so an eager fetch can throw `Data provider not set`
43
43
  // (EDITOR-7860). Skip until ready; the effect re-runs (referenceManager
44
44
  // identity changes) once the provider resolves, fetching exactly once.
45
- // Readiness is nested under the gate so it is not consulted when the gate
46
- // is off (today's behaviour), while `fg()` stays a standalone condition so
47
- // gate exposure is tracked (@atlaskit/platform/no-preconditioning).
48
- if (fg('platform_editor_blocks_patch_3')) {
49
- var _syncBlockStoreManage, _syncBlockStoreManage2, _syncBlockStoreManage3;
50
- if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
51
- return;
52
- }
45
+ if (!((_syncBlockStoreManage = (_syncBlockStoreManage2 = (_syncBlockStoreManage3 = syncBlockStoreManager.referenceManager).hasDataProvider) === null || _syncBlockStoreManage2 === void 0 ? void 0 : _syncBlockStoreManage2.call(_syncBlockStoreManage3)) !== null && _syncBlockStoreManage !== void 0 ? _syncBlockStoreManage : false)) {
46
+ return;
53
47
  }
54
48
  syncBlockStoreManager.referenceManager.fetchSyncBlocksData(syncBlockNodes);
55
49
  }, [syncBlockNodes, syncBlockStoreManager.referenceManager]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-synced-block-renderer",
3
- "version": "12.0.0",
3
+ "version": "13.0.0",
4
4
  "description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,26 +32,25 @@
32
32
  "dependencies": {
33
33
  "@atlaskit/button": "^25.0.0",
34
34
  "@atlaskit/css": "^1.0.0",
35
- "@atlaskit/editor-plugin-synced-block": "^12.0.0",
36
- "@atlaskit/editor-synced-block-provider": "^10.0.0",
35
+ "@atlaskit/editor-plugin-synced-block": "^13.0.0",
36
+ "@atlaskit/editor-synced-block-provider": "^11.0.0",
37
37
  "@atlaskit/heading": "^7.0.0",
38
38
  "@atlaskit/icon": "^37.3.0",
39
39
  "@atlaskit/icon-lab": "^7.5.0",
40
40
  "@atlaskit/image": "^5.0.0",
41
- "@atlaskit/platform-feature-flags": "^2.1.0",
42
41
  "@atlaskit/primitives": "^22.2.0",
43
42
  "@atlaskit/react-compiler-gating": "^0.2.0",
44
- "@atlaskit/renderer": "^135.0.0",
43
+ "@atlaskit/renderer": "^136.0.0",
45
44
  "@atlaskit/spinner": "^20.1.0",
46
- "@atlaskit/tokens": "^16.4.0",
45
+ "@atlaskit/tokens": "^16.7.0",
47
46
  "@atlaskit/tooltip": "^24.0.0",
48
47
  "@babel/runtime": "^7.0.0",
49
- "@compiled/react": "^1.0.0",
48
+ "@compiled/react": "^1.0.2",
50
49
  "react-relay": "^20.1.1",
51
50
  "relay-runtime": "^20.1.1"
52
51
  },
53
52
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^118.0.0",
53
+ "@atlaskit/editor-common": "^119.0.0",
55
54
  "react": "^18.2.0 || ^19.2.0",
56
55
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
57
56
  },
@@ -93,14 +92,5 @@
93
92
  ]
94
93
  }
95
94
  },
96
- "platform-feature-flags": {
97
- "platform_editor_blocks_patch_3": {
98
- "type": "boolean",
99
- "referenceOnly": true
100
- },
101
- "platform_editor_blocks_patch_4": {
102
- "type": "boolean",
103
- "referenceOnly": true
104
- }
105
- }
95
+ "platform-feature-flags": {}
106
96
  }