@ixo/editor 3.2.0 → 3.2.1

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.
@@ -1,5 +1,5 @@
1
- import { n as ActionDefinition, o as ActionServices } from '../setup-Cbd3tcfL.mjs';
2
- export { q as ActionContext, r as ActionResult, h as ActivationResult, u as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, v as CompiledBlock, w as CompiledEdge, m as CompiledFlow, x as CompiledFlowNode, C as CompilerRegistry, t as ConditionRef, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, O as OutputSchemaField, R as RuntimeRef, S as SetupFlowOptions, k as SetupFlowResult, T as TTLConstraint, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, p as clearRuntimeForTemplateClone, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, y as isRuntimeRef, s as setupFlowFromBaseUcan } from '../setup-Cbd3tcfL.mjs';
1
+ import { n as ActionDefinition, o as ActionServices } from '../setup-B0la8n04.mjs';
2
+ export { q as ActionContext, r as ActionResult, h as ActivationResult, u as ActorConstraint, A as AuthorizationResult, B as BaseUcanFlow, v as CompiledBlock, w as CompiledEdge, m as CompiledFlow, x as CompiledFlowNode, C as CompilerRegistry, t as ConditionRef, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, O as OutputSchemaField, R as RuntimeRef, S as SetupFlowOptions, k as SetupFlowResult, T as TTLConstraint, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, p as clearRuntimeForTemplateClone, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, y as isRuntimeRef, s as setupFlowFromBaseUcan } from '../setup-B0la8n04.mjs';
3
3
  export { A as ActivationCondition, C as ClaimCollectionURI, G as CreateDelegationParams, H as CreateInvocationParams, B as CreateRootDelegationParams, s as DID, D as DelegationChainValidationResult, k as DelegationGrant, E as EvaluationStatus, y as ExecutionWithInvocationResult, z as FindProofsResult, v as FlowNode, F as FlowNodeAuthzExtension, u as FlowNodeBase, t as FlowNodeRuntimeState, w as InvocationRequest, x as InvocationResult, I as InvocationStore, L as LinkedClaim, N as NodeState, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService } from '../index-DMrZ4EwQ.mjs';
4
4
  import 'yjs';
5
5
  import 'matrix-js-sdk';
@@ -3,7 +3,7 @@ import {
3
3
  isRuntimeRef,
4
4
  resolveRuntimeRefs,
5
5
  setupFlowFromBaseUcan
6
- } from "../chunk-BAW3ML7X.mjs";
6
+ } from "../chunk-IQX6H7AK.mjs";
7
7
  import {
8
8
  buildAuthzFromProps,
9
9
  buildFlowNodeFromBlock,
@@ -26,7 +26,7 @@ import {
26
26
  isNodeActive,
27
27
  registerAction,
28
28
  typeToCan
29
- } from "../chunk-3EZI42YS.mjs";
29
+ } from "../chunk-F2JSGDES.mjs";
30
30
  import {
31
31
  computeCID,
32
32
  computeJsonCID
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { N as Addr, n as ApiRequestBlockProps, h as ApiRequestBlockSpec, A as AuthorizationTab, d as AuthorizationTabState, t as AuthzExecActionTypes, B as BlockPresenceUser, x as BlockRequirements, w as BlocknoteContextValue, v as BlocknoteHandlers, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, F as FlowPermissionsPanel, G as GrantPermissionModal, a3 as GraphQLClient, a6 as GraphQLRequest, a5 as GraphQLResponse, H as HttpMethod, I as IxoEditor, b as IxoEditorProps, K as KeyValuePair, k as ListBlockProps, j as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, l as OverviewBlockProps, _ as ProposalAction, m as ProposalBlockProps, P as ProposalBlockSpec, y as ProposalResponse, z as SingleChoiceProposal, S as StakeType, S as StakeTypeValue, W as Status, X as Threshold, T as Timestamp, Q as Uint128, U as User, V as ValidatorActionType, M as Vote, J as VoteInfo, D as VoteResponse, Y as Votes, $ as getEntity, a4 as ixoGraphQLClient, o as useBlockPresence, r as useBlocknoteContext, s as useBlocknoteHandlers, a as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor, p as useTrackBlockFocus } from './graphql-client-BxmM6bOC.mjs';
2
- export { h as ActivationResult, A as AuthorizationResult, B as BaseUcanFlow, m as CompiledFlow, C as CompilerRegistry, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, S as SetupFlowOptions, k as SetupFlowResult, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, s as setupFlowFromBaseUcan } from './setup-Cbd3tcfL.mjs';
2
+ export { h as ActivationResult, A as AuthorizationResult, B as BaseUcanFlow, m as CompiledFlow, C as CompilerRegistry, E as ExecuteNodeParams, g as ExecutionContext, f as ExecutionOutcome, l as FlowCapability, F as FlowRuntimeStateManager, N as NodeActionResult, S as SetupFlowOptions, k as SetupFlowResult, d as buildAuthzFromProps, b as buildFlowNodeFromBlock, j as compileBaseUcanFlow, c as createRuntimeStateManager, e as executeNode, i as isAuthorized, a as isNodeActive, s as setupFlowFromBaseUcan } from './setup-B0la8n04.mjs';
3
3
  export { D as DelegationChainValidationResult, k as DelegationGrant, I as InvocationStore, p as IxoCollaborativeEditorOptions, o as IxoCollaborativeUser, n as IxoEditorConfig, l as IxoEditorOptions, m as IxoEditorTheme, S as StoredDelegation, j as StoredInvocation, i as UcanCapability, U as UcanDelegationStore, f as UcanService, g as UcanServiceConfig, h as UcanServiceHandlers, q as blockSpecs, b as createInvocationStore, d as createMemoryInvocationStore, a as createMemoryUcanDelegationStore, c as createUcanDelegationStore, e as createUcanService, r as getExtraSlashMenuItems } from './index-DMrZ4EwQ.mjs';
4
4
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
5
5
  export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
package/dist/index.mjs CHANGED
@@ -26,11 +26,11 @@ import {
26
26
  useCreateCollaborativeIxoEditor,
27
27
  useCreateIxoEditor,
28
28
  useTrackBlockFocus
29
- } from "./chunk-3MI2QQYH.mjs";
29
+ } from "./chunk-ZCRLP7QH.mjs";
30
30
  import {
31
31
  compileBaseUcanFlow,
32
32
  setupFlowFromBaseUcan
33
- } from "./chunk-BAW3ML7X.mjs";
33
+ } from "./chunk-IQX6H7AK.mjs";
34
34
  import {
35
35
  buildAuthzFromProps,
36
36
  buildFlowNodeFromBlock,
@@ -43,7 +43,7 @@ import {
43
43
  executeNode,
44
44
  isAuthorized,
45
45
  isNodeActive
46
- } from "./chunk-3EZI42YS.mjs";
46
+ } from "./chunk-F2JSGDES.mjs";
47
47
 
48
48
  // src/index.ts
49
49
  import { cloneDocument } from "@ixo/matrix-crdt";
@@ -49,13 +49,13 @@ import {
49
49
  usePanel,
50
50
  usePanelStore,
51
51
  useTrackBlockFocus
52
- } from "../chunk-3MI2QQYH.mjs";
52
+ } from "../chunk-ZCRLP7QH.mjs";
53
53
  import {
54
54
  didToMatrixUserId,
55
55
  findOrCreateDMRoom,
56
56
  getHomeserver,
57
57
  sendDirectMessage
58
- } from "../chunk-3EZI42YS.mjs";
58
+ } from "../chunk-F2JSGDES.mjs";
59
59
  export {
60
60
  ApiRequestBlockSpec,
61
61
  AuthorizationTab,
@@ -178,11 +178,15 @@ interface NodeActionResult {
178
178
  }
179
179
  interface ExecutionContext {
180
180
  runtime: FlowRuntimeStateManager;
181
- ucanService: UcanService;
182
- invocationStore: InvocationStore;
181
+ /** UCAN service — optional for v0.x flows, required for v1.0.0+ */
182
+ ucanService?: UcanService;
183
+ /** Invocation store — optional for v0.x flows */
184
+ invocationStore?: InvocationStore;
183
185
  flowUri: string;
184
186
  flowId: string;
185
187
  flowOwnerDid: string;
188
+ /** Flow schema version. When set, controls whether UCAN is enforced. */
189
+ schemaVersion?: string;
186
190
  now?: () => number;
187
191
  }
188
192
  interface ExecutionOutcome {
@@ -203,15 +207,15 @@ interface ExecuteNodeParams {
203
207
  pin: string;
204
208
  }
205
209
  /**
206
- * Execute a node with UCAN invocation-based authorization.
210
+ * Execute a node.
207
211
  *
208
- * Pipeline:
209
- * 1. Check activation (upstream conditions)
210
- * 2. Check authorization (UCAN delegation chain)
211
- * 3. Create invocation (signed proof of execution)
212
- * 4. Execute action
213
- * 5. Store invocation result
214
- * 6. Update runtime state
212
+ * The pipeline adapts based on the flow's schema version (via context.schemaVersion):
213
+ *
214
+ * **v0.x (legacy):** activation action → runtime update.
215
+ * UCAN authorization and invocations are skipped when ucanService is not available.
216
+ *
217
+ * **v1.0.0+:** activation → UCAN authorization → invocation → action → runtime update.
218
+ * Requires a configured ucanService with valid delegation chains.
215
219
  */
216
220
  declare const executeNode: ({ node, actorDid, actorType, entityRoomId, context, action, pin }: ExecuteNodeParams) => Promise<ExecutionOutcome>;
217
221
 
@@ -222,15 +226,14 @@ interface AuthorizationResult {
222
226
  proofCids?: string[];
223
227
  }
224
228
  /**
225
- * Check if an actor is authorized to execute a block via UCAN delegation chain.
226
- *
227
- * Every execution requires a valid delegation chain from the flow owner to the actor.
228
- * There is no default-allow or whitelist bypass.
229
+ * Check if an actor is authorized to execute a block.
229
230
  *
230
- * For legacy flows (v0.x), UCAN delegation chain validation is skipped and execution
231
- * is allowed without a full proof chain.
231
+ * Behaviour depends on the flow's schema version:
232
+ * - v0.x (or no version): UCAN is optional. If ucanService is unavailable,
233
+ * execution is allowed without a delegation chain.
234
+ * - v1.0.0+: UCAN is required. A valid delegation chain must exist.
232
235
  */
233
- declare const isAuthorized: (blockId: string, actorDid: string, ucanService: UcanService, flowUri: string, schemaVersion?: string) => Promise<AuthorizationResult>;
236
+ declare const isAuthorized: (blockId: string, actorDid: string, ucanService: UcanService | undefined, flowUri: string, schemaVersion?: string) => Promise<AuthorizationResult>;
234
237
 
235
238
  interface ActivationResult {
236
239
  active: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",