@ixo/editor 3.1.0 → 3.2.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getActionByCan
3
- } from "./chunk-5D26UG3I.mjs";
3
+ } from "./chunk-3EZI42YS.mjs";
4
4
 
5
5
  // src/core/lib/flowCompiler/blockMapping.ts
6
6
  var ICON_DEFAULTS = {
@@ -467,4 +467,4 @@ export {
467
467
  resolveRuntimeRefs,
468
468
  setupFlowFromBaseUcan
469
469
  };
470
- //# sourceMappingURL=chunk-KXKEXO53.mjs.map
470
+ //# sourceMappingURL=chunk-BAW3ML7X.mjs.map
@@ -1,6 +1,6 @@
1
- import { n as ActionDefinition, o as ActionServices } from '../setup-eMnRk02Q.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-eMnRk02Q.mjs';
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-Ch49AFng.mjs';
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';
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';
6
6
  import '@blocknote/core';
@@ -3,7 +3,7 @@ import {
3
3
  isRuntimeRef,
4
4
  resolveRuntimeRefs,
5
5
  setupFlowFromBaseUcan
6
- } from "../chunk-KXKEXO53.mjs";
6
+ } from "../chunk-BAW3ML7X.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-5D26UG3I.mjs";
29
+ } from "../chunk-3EZI42YS.mjs";
30
30
  import {
31
31
  computeCID,
32
32
  computeJsonCID
@@ -1,5 +1,5 @@
1
1
  import * as _blocknote_core from '@blocknote/core';
2
- import { K as IxoBlockProps, J as IxoEditorType, l as IxoEditorOptions, p as IxoCollaborativeEditorOptions, k as DelegationGrant } from './index-Ch49AFng.mjs';
2
+ import { K as IxoBlockProps, J as IxoEditorType, l as IxoEditorOptions, p as IxoCollaborativeEditorOptions, k as DelegationGrant } from './index-DMrZ4EwQ.mjs';
3
3
  import { Text, Doc, Map, Array as Array$1 } from 'yjs';
4
4
  import React from 'react';
5
5
  import { MatrixClient } from 'matrix-js-sdk';
@@ -2250,6 +2250,8 @@ interface BlocknoteContextValue {
2250
2250
  mapConfig?: UnlMapConfig;
2251
2251
  editable?: boolean;
2252
2252
  docType: DocType;
2253
+ /** Current flow schema version (e.g., '0.3', '1.0.0') */
2254
+ flowVersion: string;
2253
2255
  sharedProposals: SharedProposalData;
2254
2256
  fetchSharedProposal: (proposalId: string, contractAddress: string, force?: boolean) => Promise<ProposalResponse>;
2255
2257
  invalidateProposal: (proposalId: string) => void;
@@ -2428,6 +2428,11 @@ interface IxoEditorType<BSchema extends IxoBlockSchema = IxoBlockSchema, ISchema
2428
2428
  * @internal
2429
2429
  */
2430
2430
  _yInvocations?: Map<any>;
2431
+ /**
2432
+ * Y.Map for migration state persistence
2433
+ * @internal
2434
+ */
2435
+ _yMigration?: Map<any>;
2431
2436
  /**
2432
2437
  * UCAN delegation store (new @ixo/ucan integration)
2433
2438
  * Supports both CAR format (new) and JSON format (legacy)
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
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-B49ND-qp.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-eMnRk02Q.mjs';
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-Ch49AFng.mjs';
4
- export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
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';
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';
5
4
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
5
+ export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
6
6
  import 'yjs';
7
7
  import 'react';
8
8
  import 'matrix-js-sdk';
package/dist/index.mjs CHANGED
@@ -26,11 +26,11 @@ import {
26
26
  useCreateCollaborativeIxoEditor,
27
27
  useCreateIxoEditor,
28
28
  useTrackBlockFocus
29
- } from "./chunk-FM2G22RS.mjs";
29
+ } from "./chunk-3MI2QQYH.mjs";
30
30
  import {
31
31
  compileBaseUcanFlow,
32
32
  setupFlowFromBaseUcan
33
- } from "./chunk-KXKEXO53.mjs";
33
+ } from "./chunk-BAW3ML7X.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-5D26UG3I.mjs";
46
+ } from "./chunk-3EZI42YS.mjs";
47
47
 
48
48
  // src/index.ts
49
49
  import { cloneDocument } from "@ixo/matrix-crdt";
@@ -1,8 +1,8 @@
1
- import { v as BlocknoteHandlers } from '../graphql-client-B49ND-qp.mjs';
2
- 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, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, ae as DomainCardData, ad as DomainCardRenderer, a8 as DropPosition, aa as DynamicListData, ab as DynamicListDataProvider, ac as DynamicListPanelRenderer, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, a7 as ExternalDropZone, 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, a9 as VisualizationRenderer, 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-B49ND-qp.mjs';
1
+ import { v as BlocknoteHandlers } from '../graphql-client-BxmM6bOC.mjs';
2
+ 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, q as BlocknoteProvider, i as CheckboxBlockProps, g as CheckboxBlockSpec, Z as CosmosMsgForEmpty, C as CoverImage, c as CoverImageProps, ae as DomainCardData, ad as DomainCardRenderer, a8 as DropPosition, aa as DynamicListData, ab as DynamicListDataProvider, ac as DynamicListPanelRenderer, a0 as Entity, a1 as EntityResponse, f as EntitySigningSetup, a2 as EntityVariables, E as EvaluationTab, e as EvaluationTabState, R as Expiration, a7 as ExternalDropZone, 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, a9 as VisualizationRenderer, 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';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
- import { K as IxoBlockProps, J as IxoEditorType, t as FlowNodeRuntimeState } from '../index-Ch49AFng.mjs';
5
- export { p as IxoCollaborativeEditorOptions, o as IxoCollaborativeUser, n as IxoEditorConfig, l as IxoEditorOptions, m as IxoEditorTheme, q as blockSpecs, r as getExtraSlashMenuItems } from '../index-Ch49AFng.mjs';
4
+ import { K as IxoBlockProps, J as IxoEditorType, t as FlowNodeRuntimeState } from '../index-DMrZ4EwQ.mjs';
5
+ export { p as IxoCollaborativeEditorOptions, o as IxoCollaborativeUser, n as IxoEditorConfig, l as IxoEditorOptions, m as IxoEditorTheme, q as blockSpecs, r as getExtraSlashMenuItems } from '../index-DMrZ4EwQ.mjs';
6
6
  import * as zustand from 'zustand';
7
7
  import * as _blocknote_core from '@blocknote/core';
8
8
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
@@ -49,13 +49,13 @@ import {
49
49
  usePanel,
50
50
  usePanelStore,
51
51
  useTrackBlockFocus
52
- } from "../chunk-FM2G22RS.mjs";
52
+ } from "../chunk-3MI2QQYH.mjs";
53
53
  import {
54
54
  didToMatrixUserId,
55
55
  findOrCreateDMRoom,
56
56
  getHomeserver,
57
57
  sendDirectMessage
58
- } from "../chunk-5D26UG3I.mjs";
58
+ } from "../chunk-3EZI42YS.mjs";
59
59
  export {
60
60
  ApiRequestBlockSpec,
61
61
  AuthorizationTab,
@@ -1,4 +1,4 @@
1
- import { v as FlowNode, F as FlowNodeAuthzExtension, t as FlowNodeRuntimeState, J as IxoEditorType, f as UcanService, I as InvocationStore, E as EvaluationStatus } from './index-Ch49AFng.mjs';
1
+ import { v as FlowNode, F as FlowNodeAuthzExtension, t as FlowNodeRuntimeState, J as IxoEditorType, f as UcanService, I as InvocationStore, E as EvaluationStatus } from './index-DMrZ4EwQ.mjs';
2
2
  import { Doc } from 'yjs';
3
3
  import { MatrixClient } from 'matrix-js-sdk';
4
4
 
@@ -226,8 +226,11 @@ interface AuthorizationResult {
226
226
  *
227
227
  * Every execution requires a valid delegation chain from the flow owner to the actor.
228
228
  * There is no default-allow or whitelist bypass.
229
+ *
230
+ * For legacy flows (v0.x), UCAN delegation chain validation is skipped and execution
231
+ * is allowed without a full proof chain.
229
232
  */
230
- declare const isAuthorized: (blockId: string, actorDid: string, ucanService: UcanService, flowUri: string) => Promise<AuthorizationResult>;
233
+ declare const isAuthorized: (blockId: string, actorDid: string, ucanService: UcanService, flowUri: string, schemaVersion?: string) => Promise<AuthorizationResult>;
231
234
 
232
235
  interface ActivationResult {
233
236
  active: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",