@ixo/editor 2.41.0 → 3.0.0-beta.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.
@@ -2464,6 +2464,9 @@ declare const ApiRequestBlockSpec: {
2464
2464
  readonly assignment: {
2465
2465
  readonly default: string;
2466
2466
  };
2467
+ readonly commitment: {
2468
+ readonly default: string;
2469
+ };
2467
2470
  readonly skill: {
2468
2471
  readonly default: "";
2469
2472
  };
@@ -2518,6 +2521,9 @@ declare const ApiRequestBlockSpec: {
2518
2521
  readonly assignment: {
2519
2522
  readonly default: string;
2520
2523
  };
2524
+ readonly commitment: {
2525
+ readonly default: string;
2526
+ };
2521
2527
  readonly skill: {
2522
2528
  readonly default: "";
2523
2529
  };
@@ -2907,6 +2913,9 @@ declare const blockSpecs: {
2907
2913
  readonly assignment: {
2908
2914
  readonly default: string;
2909
2915
  };
2916
+ readonly commitment: {
2917
+ readonly default: string;
2918
+ };
2910
2919
  readonly skill: {
2911
2920
  readonly default: "";
2912
2921
  };
@@ -2961,6 +2970,9 @@ declare const blockSpecs: {
2961
2970
  readonly assignment: {
2962
2971
  readonly default: string;
2963
2972
  };
2973
+ readonly commitment: {
2974
+ readonly default: string;
2975
+ };
2964
2976
  readonly skill: {
2965
2977
  readonly default: "";
2966
2978
  };
@@ -3157,6 +3169,9 @@ declare const blockSpecs: {
3157
3169
  readonly assignment: {
3158
3170
  readonly default: string;
3159
3171
  };
3172
+ readonly commitment: {
3173
+ readonly default: string;
3174
+ };
3160
3175
  readonly skill: {
3161
3176
  readonly default: "";
3162
3177
  };
@@ -3217,6 +3232,9 @@ declare const blockSpecs: {
3217
3232
  readonly assignment: {
3218
3233
  readonly default: string;
3219
3234
  };
3235
+ readonly commitment: {
3236
+ readonly default: string;
3237
+ };
3220
3238
  readonly skill: {
3221
3239
  readonly default: "";
3222
3240
  };
@@ -3276,6 +3294,9 @@ declare const blockSpecs: {
3276
3294
  readonly assignment: {
3277
3295
  readonly default: string;
3278
3296
  };
3297
+ readonly commitment: {
3298
+ readonly default: string;
3299
+ };
3279
3300
  readonly skill: {
3280
3301
  readonly default: "";
3281
3302
  };
@@ -3333,6 +3354,9 @@ declare const blockSpecs: {
3333
3354
  readonly assignment: {
3334
3355
  readonly default: string;
3335
3356
  };
3357
+ readonly commitment: {
3358
+ readonly default: string;
3359
+ };
3336
3360
  readonly skill: {
3337
3361
  readonly default: "";
3338
3362
  };
@@ -3374,6 +3398,9 @@ declare const blockSpecs: {
3374
3398
  readonly assignment: {
3375
3399
  readonly default: string;
3376
3400
  };
3401
+ readonly commitment: {
3402
+ readonly default: string;
3403
+ };
3377
3404
  readonly skill: {
3378
3405
  readonly default: "";
3379
3406
  };
@@ -3413,6 +3440,9 @@ declare const blockSpecs: {
3413
3440
  readonly assignment: {
3414
3441
  readonly default: string;
3415
3442
  };
3443
+ readonly commitment: {
3444
+ readonly default: string;
3445
+ };
3416
3446
  readonly skill: {
3417
3447
  readonly default: "";
3418
3448
  };
@@ -3910,6 +3940,9 @@ declare const blockSpecs: {
3910
3940
  readonly assignment: {
3911
3941
  readonly default: string;
3912
3942
  };
3943
+ readonly commitment: {
3944
+ readonly default: string;
3945
+ };
3913
3946
  readonly skill: {
3914
3947
  readonly default: "";
3915
3948
  };
@@ -3961,6 +3994,9 @@ declare const blockSpecs: {
3961
3994
  readonly assignment: {
3962
3995
  readonly default: string;
3963
3996
  };
3997
+ readonly commitment: {
3998
+ readonly default: string;
3999
+ };
3964
4000
  readonly skill: {
3965
4001
  readonly default: "";
3966
4002
  };
@@ -4172,6 +4208,122 @@ declare const blockSpecs: {
4172
4208
  readonly content: "none";
4173
4209
  }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
4174
4210
  };
4211
+ action: {
4212
+ config: {
4213
+ readonly type: "action";
4214
+ readonly propSchema: {
4215
+ readonly title: {
4216
+ readonly default: "";
4217
+ };
4218
+ readonly description: {
4219
+ readonly default: "";
4220
+ };
4221
+ readonly icon: {
4222
+ readonly default: "bolt";
4223
+ };
4224
+ readonly actionType: {
4225
+ readonly default: "";
4226
+ };
4227
+ readonly inputs: {
4228
+ readonly default: "{}";
4229
+ };
4230
+ readonly requiresConfirmation: {
4231
+ readonly default: "";
4232
+ };
4233
+ readonly conditions: {
4234
+ readonly default: "";
4235
+ };
4236
+ readonly parentCapability: {
4237
+ readonly default: "";
4238
+ };
4239
+ readonly authorisedActors: {
4240
+ readonly default: "";
4241
+ };
4242
+ readonly activationUpstreamNodeId: {
4243
+ readonly default: "";
4244
+ };
4245
+ readonly activationRequiredStatus: {
4246
+ readonly default: "";
4247
+ };
4248
+ readonly activationRequireAuthorisedActor: {
4249
+ readonly default: false;
4250
+ };
4251
+ readonly ttlAbsoluteDueDate: {
4252
+ readonly default: "";
4253
+ };
4254
+ readonly ttlFromEnablement: {
4255
+ readonly default: "";
4256
+ };
4257
+ readonly ttlFromCommitment: {
4258
+ readonly default: "";
4259
+ };
4260
+ readonly assignment: {
4261
+ readonly default: string;
4262
+ };
4263
+ readonly commitment: {
4264
+ readonly default: string;
4265
+ };
4266
+ };
4267
+ readonly content: "inline";
4268
+ };
4269
+ implementation: _blocknote_core.TiptapBlockImplementation<{
4270
+ readonly type: "action";
4271
+ readonly propSchema: {
4272
+ readonly title: {
4273
+ readonly default: "";
4274
+ };
4275
+ readonly description: {
4276
+ readonly default: "";
4277
+ };
4278
+ readonly icon: {
4279
+ readonly default: "bolt";
4280
+ };
4281
+ readonly actionType: {
4282
+ readonly default: "";
4283
+ };
4284
+ readonly inputs: {
4285
+ readonly default: "{}";
4286
+ };
4287
+ readonly requiresConfirmation: {
4288
+ readonly default: "";
4289
+ };
4290
+ readonly conditions: {
4291
+ readonly default: "";
4292
+ };
4293
+ readonly parentCapability: {
4294
+ readonly default: "";
4295
+ };
4296
+ readonly authorisedActors: {
4297
+ readonly default: "";
4298
+ };
4299
+ readonly activationUpstreamNodeId: {
4300
+ readonly default: "";
4301
+ };
4302
+ readonly activationRequiredStatus: {
4303
+ readonly default: "";
4304
+ };
4305
+ readonly activationRequireAuthorisedActor: {
4306
+ readonly default: false;
4307
+ };
4308
+ readonly ttlAbsoluteDueDate: {
4309
+ readonly default: "";
4310
+ };
4311
+ readonly ttlFromEnablement: {
4312
+ readonly default: "";
4313
+ };
4314
+ readonly ttlFromCommitment: {
4315
+ readonly default: "";
4316
+ };
4317
+ readonly assignment: {
4318
+ readonly default: string;
4319
+ };
4320
+ readonly commitment: {
4321
+ readonly default: string;
4322
+ };
4323
+ };
4324
+ readonly content: "inline";
4325
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
4326
+ };
4175
4327
  location: {
4176
4328
  config: {
4177
4329
  readonly type: "location";
@@ -4306,7 +4458,43 @@ interface FlowNodeAuthzExtension {
4306
4458
  linkedClaim?: LinkedClaim;
4307
4459
  activationCondition?: ActivationCondition;
4308
4460
  }
4461
+ type NodeState = 'idle' | 'running' | 'completed' | 'failed' | 'cancelled';
4309
4462
  interface FlowNodeRuntimeState {
4463
+ state?: NodeState;
4464
+ output?: Record<string, any>;
4465
+ executedByDid?: DID;
4466
+ executedAt?: number;
4467
+ invocations?: string[];
4468
+ lastInvocationCid?: string;
4469
+ assignments?: Array<{
4470
+ actorDid: DID;
4471
+ assignedByDid?: DID;
4472
+ at: number;
4473
+ status: 'assigned' | 'accepted' | 'declined';
4474
+ }>;
4475
+ commitments?: Array<{
4476
+ actorDid: DID;
4477
+ at: number;
4478
+ expiresAt?: number;
4479
+ }>;
4480
+ proposals?: Array<{
4481
+ id: string;
4482
+ proposedByDid: DID;
4483
+ proposedAt: number;
4484
+ mode: 'inputs_patch' | 'output_patch';
4485
+ patch: any;
4486
+ rationale?: string;
4487
+ status: 'open' | 'accepted' | 'rejected';
4488
+ decidedByDid?: DID;
4489
+ decidedAt?: number;
4490
+ acceptanceInvocationCid?: string;
4491
+ }>;
4492
+ error?: {
4493
+ message: string;
4494
+ code?: string;
4495
+ at: number;
4496
+ data?: any;
4497
+ };
4310
4498
  claimId?: string;
4311
4499
  submittedByDid?: DID;
4312
4500
  evaluationStatus?: EvaluationStatus;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FlowNode, a as FlowNodeAuthzExtension, b as FlowNodeRuntimeState, I as IxoEditorType, S as SignedCapability, E as EvaluationStatus, C as Capability, c as CapabilityValidationResult } from './graphql-client-CFEZF6E1.mjs';
2
- export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, D as DelegationGrant, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from './graphql-client-CFEZF6E1.mjs';
1
+ import { F as FlowNode, a as FlowNodeAuthzExtension, b as FlowNodeRuntimeState, I as IxoEditorType, S as SignedCapability, E as EvaluationStatus, C as Capability, c as CapabilityValidationResult } from './graphql-client-B5TxlMUU.mjs';
2
+ export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, W as BlocknoteHandlers, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, D as DelegationGrant, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from './graphql-client-B5TxlMUU.mjs';
3
3
  import { Map } from 'yjs';
4
4
  export { CloneDocumentResult, cloneDocument } from '@ixo/matrix-crdt';
5
5
  export { Block, BlockNoteEditor, BlockNoteSchema, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
package/dist/index.mjs CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  useCreateCollaborativeIxoEditor,
35
35
  useCreateIxoEditor,
36
36
  validateCapabilityChain
37
- } from "./chunk-4TDDY3Q6.mjs";
37
+ } from "./chunk-3RGK4GAV.mjs";
38
38
 
39
39
  // src/index.ts
40
40
  import { cloneDocument } from "@ixo/matrix-crdt";
@@ -1,5 +1,5 @@
1
- import { ak as IxoBlockProps, W as BlocknoteHandlers } from '../graphql-client-CFEZF6E1.mjs';
2
- export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, I as IxoEditorType, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, an as PageHeader, ap as PageHeaderMenuItem, ao as PageHeaderProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, aq as VisualizationRenderer, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from '../graphql-client-CFEZF6E1.mjs';
1
+ import { ak as IxoBlockProps, I as IxoEditorType, b as FlowNodeRuntimeState, W as BlocknoteHandlers } from '../graphql-client-B5TxlMUU.mjs';
2
+ export { a3 as Addr, J as ApiRequestBlockProps, t as ApiRequestBlockSpec, A as AuthorizationTab, i as AuthorizationTabState, U as AuthzExecActionTypes, Y as BlockRequirements, X as BlocknoteContextValue, N as BlocknoteProvider, x as CheckboxBlockProps, s as CheckboxBlockSpec, aa as CosmosMsgForEmpty, g as CoverImage, h as CoverImageProps, av as DomainCardData, au as DomainCardRenderer, am as DropPosition, ar as DynamicListData, as as DynamicListDataProvider, at as DynamicListPanelRenderer, ad as Entity, ae as EntityResponse, l as EntitySigningSetup, af as EntityVariables, j as EvaluationTab, k as EvaluationTabState, a6 as Expiration, al as ExternalDropZone, m as FlowPermissionsPanel, G as GrantPermissionModal, ag as GraphQLClient, aj as GraphQLRequest, ai as GraphQLResponse, K as HttpMethod, r as IxoCollaborativeEditorOptions, q as IxoCollaborativeUser, e as IxoEditor, p as IxoEditorConfig, n as IxoEditorOptions, f as IxoEditorProps, o as IxoEditorTheme, M as KeyValuePair, z as ListBlockProps, y as ListBlockSettings, L as ListBlockSpec, O as OverviewBlock, B as OverviewBlockProps, an as PageHeader, ap as PageHeaderMenuItem, ao as PageHeaderProps, ab as ProposalAction, H as ProposalBlockProps, P as ProposalBlockSpec, Z as ProposalResponse, _ as SingleChoiceProposal, T as StakeType, T as StakeTypeValue, a7 as Status, a8 as Threshold, a5 as Timestamp, a4 as Uint128, a2 as User, V as ValidatorActionType, aq as VisualizationRenderer, a1 as Vote, a0 as VoteInfo, $ as VoteResponse, a9 as Votes, v as blockSpecs, ac as getEntity, w as getExtraSlashMenuItems, ah as ixoGraphQLClient, Q as useBlocknoteContext, R as useBlocknoteHandlers, d as useCreateCollaborativeIxoEditor, u as useCreateIxoEditor } from '../graphql-client-B5TxlMUU.mjs';
3
3
  import React$1, { PropsWithChildren } from 'react';
4
4
  import * as zustand from 'zustand';
5
5
  import * as _blocknote_core from '@blocknote/core';
@@ -165,6 +165,16 @@ declare const usePanel: (panelId: string, content: React.ReactNode) => {
165
165
  close: () => void;
166
166
  };
167
167
 
168
+ /**
169
+ * Reactive hook that subscribes to a single node's runtime state in yDoc.runtime.
170
+ *
171
+ * Usage:
172
+ * const [runtime, updateRuntime] = useNodeRuntime(editor, block.id);
173
+ * // runtime.state, runtime.output, runtime.error, etc.
174
+ * // updateRuntime({ state: 'completed', output: { ... } });
175
+ */
176
+ declare function useNodeRuntime(editor: IxoEditorType, nodeId: string): [FlowNodeRuntimeState, (updates: Partial<FlowNodeRuntimeState>) => void];
177
+
168
178
  type CollapseEvent = 'collapse' | 'expand' | 'toggle';
169
179
  type Listener = (event: CollapseEvent) => void;
170
180
  interface ListBlocksUIContextValue {
@@ -349,4 +359,4 @@ interface HookedActionsTabProps {
349
359
 
350
360
  declare const HookedActionsTab: React$1.FC<HookedActionsTabProps>;
351
361
 
352
- export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DataSource, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, type ListBlocksUIContextValue, type Listener, type PayloadField, getAllHookedActionTypes, getBlockActions, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, useHookedActions, useListBlocksUI, useListBlocksUIStore, usePanel, usePanelStore };
362
+ export { BaseIconPicker, type BlockActionDefinition, BlocknoteHandlers, type CollapseEvent, type ColumnPosition, type DataSource, type DynamicListAction, type DynamicListBlockProps, DynamicListBlockSpec, type DynamicListColumn, type DynamicListPanelConfig, type HookedActionInstanceConfig, type HookedActionType, type HookedActionsConfig, HookedActionsTab, IxoEditorType, type ListBlocksUIContextValue, type Listener, type PayloadField, getAllHookedActionTypes, getBlockActions, getHookedActionType, initializeHookedActions, registerBlockActions, registerBuiltInActionTypes, registerHookedActionType, useHookedActions, useListBlocksUI, useListBlocksUIStore, useNodeRuntime, usePanel, usePanelStore };
@@ -39,9 +39,10 @@ import {
39
39
  useHookedActions,
40
40
  useListBlocksUI,
41
41
  useListBlocksUIStore,
42
+ useNodeRuntime,
42
43
  usePanel,
43
44
  usePanelStore
44
- } from "../chunk-4TDDY3Q6.mjs";
45
+ } from "../chunk-3RGK4GAV.mjs";
45
46
  export {
46
47
  ApiRequestBlockSpec,
47
48
  AuthorizationTab,
@@ -83,6 +84,7 @@ export {
83
84
  useHookedActions,
84
85
  useListBlocksUI,
85
86
  useListBlocksUIStore,
87
+ useNodeRuntime,
86
88
  usePanel,
87
89
  usePanelStore
88
90
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "2.41.0",
3
+ "version": "3.0.0-beta.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",