@atlaskit/editor-synced-block-provider 4.1.5 → 4.1.6

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.
Files changed (3) hide show
  1. package/AGENTS.md +30 -18
  2. package/CHANGELOG.md +6 -0
  3. package/package.json +3 -3
package/AGENTS.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # Synced Block Provider — Developer Agent Guide
2
2
 
3
- > **Package**: `@atlaskit/editor-synced-block-provider`
4
- > **Purpose**: Data layer for synced blocks — store managers, block service API client, ARI generation, permissions, media tokens.
5
- > **Full Knowledge Base**: [Synced Blocks — Comprehensive Knowledge Base](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6679548384)
3
+ > **Package**: `@atlaskit/editor-synced-block-provider` **Purpose**: Data layer for synced blocks —
4
+ > store managers, block service API client, ARI generation, permissions, media tokens. **Full
5
+ > Knowledge Base**:
6
+ > [Synced Blocks — Comprehensive Knowledge Base](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6679548384)
6
7
 
7
8
  ---
8
9
 
9
10
  ## Quick Context
10
11
 
11
12
  This package manages the lifecycle and state of synced blocks for both source and reference nodes.
12
- It provides the data fetching, caching, subscription, and persistence layer used by the editor plugin
13
- and the renderer across Confluence and Jira.
13
+ It provides the data fetching, caching, subscription, and persistence layer used by the editor
14
+ plugin and the renderer across Confluence and Jira.
14
15
 
15
16
  ---
16
17
 
@@ -62,17 +63,19 @@ SyncBlockStoreManager (parent coordinator)
62
63
 
63
64
  ### ARI Formats & Utilities
64
65
 
65
- | Function | ARI Pattern | Example |
66
- |----------|-------------|---------|
67
- | `generateBlockAri({cloudId, parentId, product, resourceId})` | Source block ARI | `ari:cloud:block::{cloudId}/confluence-page:{pageId}/{localId}` |
68
- | `generateBlockAriFromReference({cloudId, resourceId})` | Reference block ARI | — |
69
- | `getConfluencePageAri({pageId, cloudId, pageType})` | Confluence page | `ari:cloud:confluence::{cloudId}:page/{pageId}` |
70
- | `getJiraWorkItemAri({cloudId, workItemId})` | Jira issue | `ari:cloud:jira::{cloudId}:work-item/{issueId}` |
71
- | `getJiraWorkItemIdFromAri(ari)` | Extract issue ID from ARI | — |
66
+ | Function | ARI Pattern | Example |
67
+ | ------------------------------------------------------------ | ------------------------- | --------------------------------------------------------------- |
68
+ | `generateBlockAri({cloudId, parentId, product, resourceId})` | Source block ARI | `ari:cloud:block::{cloudId}/confluence-page:{pageId}/{localId}` |
69
+ | `generateBlockAriFromReference({cloudId, resourceId})` | Reference block ARI | — |
70
+ | `getConfluencePageAri({pageId, cloudId, pageType})` | Confluence page | `ari:cloud:confluence::{cloudId}:page/{pageId}` |
71
+ | `getJiraWorkItemAri({cloudId, workItemId})` | Jira issue | `ari:cloud:jira::{cloudId}:work-item/{issueId}` |
72
+ | `getJiraWorkItemIdFromAri(ari)` | Extract issue ID from ARI | — |
72
73
 
73
74
  ### Block Service API
74
75
 
75
- The client in `clients/block-service/blockService.ts` communicates via GraphQL at `/gateway/api/graphql`:
76
+ The client in `clients/block-service/blockService.ts` communicates via GraphQL at
77
+ `/gateway/api/graphql`:
78
+
76
79
  - **Fetch**: Single or batch block content retrieval
77
80
  - **Create**: Register new source block with content
78
81
  - **Update**: Push content changes (debounced 3s)
@@ -82,27 +85,33 @@ The client in `clients/block-service/blockService.ts` communicates via GraphQL a
82
85
 
83
86
  ### Media Token Fetching
84
87
 
85
- `fetchMediaToken(contentId)` → GraphQL `MediaUploadTokenQuery` → returns `{token, config: {clientId, fileStoreUrl}, collectionId}`
88
+ `fetchMediaToken(contentId)` → GraphQL `MediaUploadTokenQuery` → returns
89
+ `{token, config: {clientId, fileStoreUrl}, collectionId}`
86
90
 
87
- Used when synced blocks contain media (images, files) — the reference needs a valid token to render media from the source page.
91
+ Used when synced blocks contain media (images, files) — the reference needs a valid token to render
92
+ media from the source page.
88
93
 
89
94
  ---
90
95
 
91
96
  ## Common Tasks
92
97
 
93
98
  ### Adding a new API method
99
+
94
100
  1. Add the GraphQL query/mutation in `clients/block-service/blockService.ts`
95
101
  2. Expose it through the appropriate store manager
96
102
  3. Export from `src/index.ts` if needed by product integrations
97
103
  4. Add tests in `editor-synced-block-provider-tests`
98
104
 
99
105
  ### Debugging data issues
106
+
100
107
  1. Check `ReferenceSyncBlockStoreManager` cache state
101
108
  2. Verify ARI format matches expected pattern for the product
102
109
  3. Check Block Service API responses in network tab (look for `/gateway/api/graphql`)
103
- 4. Use analytics: [HOW-TO: Debug errors](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6342760320)
110
+ 4. Use analytics:
111
+ [HOW-TO: Debug errors](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6342760320)
104
112
 
105
113
  ### Adding support for a new product
114
+
106
115
  1. Create ARI utilities in `clients/{product}/ari.ts`
107
116
  2. Ensure `generateBlockAri` supports the new product type
108
117
  3. Add media token fetching if the product has media content
@@ -111,7 +120,10 @@ Used when synced blocks contain media (images, files) — the reference needs a
111
120
  ---
112
121
 
113
122
  ## Related Packages
123
+
114
124
  - **Plugin**: `platform/packages/editor/editor-plugin-synced-block/` — uses store managers
115
125
  - **Renderer**: `platform/packages/editor/editor-synced-block-renderer/` — uses fetch provider
116
- - **Confluence**: `confluence/next/packages/fabric-providers/src/SyncedBlockProvider.ts` — wraps this provider
117
- - **Jira**: `jira/src/packages/issue/issue-view-synced-block-provider/` — wraps this provider with Relay
126
+ - **Confluence**: `confluence/next/packages/fabric-providers/src/SyncedBlockProvider.ts` — wraps
127
+ this provider
128
+ - **Jira**: `jira/src/packages/issue/issue-view-synced-block-provider/` — wraps this provider with
129
+ Relay
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 4.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 4.1.5
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/editor-prosemirror": "^7.3.0",
30
30
  "@atlaskit/node-data-provider": "^9.0.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^44.0.0",
32
+ "@atlaskit/tmp-editor-statsig": "^45.0.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@compiled/react": "^0.20.0",
35
35
  "graphql-ws": "^5.14.2",
@@ -38,7 +38,7 @@
38
38
  "uuid": "^3.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@atlaskit/editor-common": "^112.7.0",
41
+ "@atlaskit/editor-common": "^112.8.0",
42
42
  "react": "^18.2.0"
43
43
  },
44
44
  "devDependencies": {
@@ -81,7 +81,7 @@
81
81
  }
82
82
  },
83
83
  "name": "@atlaskit/editor-synced-block-provider",
84
- "version": "4.1.5",
84
+ "version": "4.1.6",
85
85
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
86
86
  "author": "Atlassian Pty Ltd",
87
87
  "license": "Apache-2.0",