document-model 1.0.35 → 1.0.37
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/dist/browser/document-model.cjs +1 -1
- package/dist/browser/document-model.js +2 -2
- package/dist/browser/document.cjs +1 -1
- package/dist/browser/document.js +2 -2
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/internal/{index-DJYIO2I4.js → index-4Z_H8F_J.js} +1 -1
- package/dist/browser/internal/{index-CsKglrKe.js → index-6u2yDIEF.js} +1 -1
- package/dist/browser/internal/index-DQeD1Q-a.js +42 -0
- package/dist/browser/internal/index-QJX_Fa1V.js +1 -0
- package/dist/browser/internal/object-EriwiDIs.js +7 -0
- package/dist/browser/internal/{object-B-Aw8ilC.js → object-Fq6PThAX.js} +301 -263
- package/dist/browser/src/document/reducer.d.ts +2 -2
- package/dist/browser/src/document/types.d.ts +28 -1
- package/dist/browser/src/document/utils/base.d.ts +1 -0
- package/dist/browser/test/document/event-vs-command.test.d.ts +1 -0
- package/dist/browser/test/helpers.d.ts +5 -3
- package/dist/node/document-model.cjs +1 -1
- package/dist/node/document-model.js +2 -2
- package/dist/node/document.cjs +1 -1
- package/dist/node/document.js +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +3 -3
- package/dist/node/internal/{index-DfxrIKIl.js → index-A6Rqm2SZ.js} +1 -1
- package/dist/node/internal/{index-BLZ2ydMH.js → index-BpBnSlTZ.js} +1 -1
- package/dist/node/internal/index-Dl5T5qdc.js +42 -0
- package/dist/node/internal/index-DyCS1h0M.js +1 -0
- package/dist/node/internal/{object-CvntAblp.js → object-S6TngMa9.js} +324 -286
- package/dist/node/internal/object-ifvac9k2.js +2 -0
- package/dist/node/src/document/reducer.d.ts +2 -2
- package/dist/node/src/document/types.d.ts +28 -1
- package/dist/node/src/document/utils/base.d.ts +1 -0
- package/dist/node/test/document/event-vs-command.test.d.ts +1 -0
- package/dist/node/test/helpers.d.ts +5 -3
- package/package.json +1 -1
- package/dist/browser/internal/index-A_QX9cy_.js +0 -41
- package/dist/browser/internal/index-CZWjb-hc.js +0 -1
- package/dist/browser/internal/object-C8B-mq5Y.js +0 -7
- package/dist/node/internal/index-D_eCXEyL.js +0 -41
- package/dist/node/internal/index-DjP2tO7C.js +0 -1
- package/dist/node/internal/object-B5Lf9AWl.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAction } from './actions/types';
|
|
2
2
|
import { UndoRedoAction } from './schema';
|
|
3
|
-
import { Action, Document, ImmutableStateReducer, ReducerOptions } from './types';
|
|
3
|
+
import { Action, Document, ImmutableStateReducer, Operation, ReducerOptions } from './types';
|
|
4
4
|
import { SignalDispatch } from './signal';
|
|
5
5
|
type UndoRedoProcessResult<T, A extends Action, L> = {
|
|
6
6
|
document: Document<T, A, L>;
|
|
@@ -28,5 +28,5 @@ export declare function processUndoRedo<T, A extends Action, L>(document: Docume
|
|
|
28
28
|
* specific to the document's state.
|
|
29
29
|
* @returns The new state of the document.
|
|
30
30
|
*/
|
|
31
|
-
export declare function baseReducer<T, A extends Action, L>(document: Document<T, A, L>, action: A | BaseAction, customReducer: ImmutableStateReducer<T, A, L>, dispatch?: SignalDispatch, options?: ReducerOptions): Document<T, A, L>;
|
|
31
|
+
export declare function baseReducer<T, A extends Action, L>(document: Document<T, A, L>, action: A | BaseAction | Operation, customReducer: ImmutableStateReducer<T, A, L>, dispatch?: SignalDispatch, options?: ReducerOptions): Document<T, A, L>;
|
|
32
32
|
export {};
|
|
@@ -9,6 +9,20 @@ export { z } from './schema';
|
|
|
9
9
|
export type * from './schema/types';
|
|
10
10
|
export type { FileInput } from './utils';
|
|
11
11
|
export type { Immutable } from 'immer';
|
|
12
|
+
export type ActionSigner = {
|
|
13
|
+
user: {
|
|
14
|
+
address: string;
|
|
15
|
+
chainId: string;
|
|
16
|
+
};
|
|
17
|
+
app: {
|
|
18
|
+
name: string;
|
|
19
|
+
key: string;
|
|
20
|
+
};
|
|
21
|
+
signature: string;
|
|
22
|
+
};
|
|
23
|
+
export type ActionContext = {
|
|
24
|
+
signer?: ActionSigner;
|
|
25
|
+
};
|
|
12
26
|
/**
|
|
13
27
|
* Defines the basic structure of an action.
|
|
14
28
|
*
|
|
@@ -23,6 +37,8 @@ export type Action<T extends string = string, I = unknown, S extends OperationSc
|
|
|
23
37
|
scope: S;
|
|
24
38
|
/** The attachments included in the action. */
|
|
25
39
|
attachments?: AttachmentInput[] | undefined;
|
|
40
|
+
/** The context of the action. */
|
|
41
|
+
context?: ActionContext;
|
|
26
42
|
};
|
|
27
43
|
export type ActionWithAttachment<T extends string = string, I = unknown, S extends OperationScope = OperationScope> = Action<T, I, S> & {
|
|
28
44
|
attachments: AttachmentInput[];
|
|
@@ -186,15 +202,26 @@ export type DocumentModel<S = unknown, A extends Action = Action, L = unknown, C
|
|
|
186
202
|
utils: DocumentModelUtils<S, A, L>;
|
|
187
203
|
documentModel: DocumentModelState;
|
|
188
204
|
};
|
|
205
|
+
export type ENSInfo = {
|
|
206
|
+
name?: string;
|
|
207
|
+
avatarUrl?: string;
|
|
208
|
+
};
|
|
209
|
+
export type User = {
|
|
210
|
+
address: `0x${string}`;
|
|
211
|
+
networkId: string;
|
|
212
|
+
chainId: number;
|
|
213
|
+
ens?: ENSInfo;
|
|
214
|
+
};
|
|
189
215
|
export type EditorContext = {
|
|
190
216
|
theme: 'light' | 'dark';
|
|
191
217
|
debug?: boolean;
|
|
218
|
+
user?: User;
|
|
192
219
|
};
|
|
193
220
|
export type ActionErrorCallback = (error: unknown) => void;
|
|
194
221
|
export type EditorProps<S, A extends Action, L> = {
|
|
195
222
|
document: Document<S, A, L>;
|
|
196
223
|
dispatch: (action: A | BaseAction, onErrorCallback?: ActionErrorCallback) => void;
|
|
197
|
-
|
|
224
|
+
context: EditorContext;
|
|
198
225
|
error?: unknown;
|
|
199
226
|
};
|
|
200
227
|
export type Editor<S = unknown, A extends Action = Action, L = unknown> = {
|
|
@@ -71,6 +71,7 @@ export declare function readOnly<T>(value: T): Immutable<T>;
|
|
|
71
71
|
* @throws Error if the operation index is invalid and there are missing operations.
|
|
72
72
|
*/
|
|
73
73
|
export declare function mapSkippedOperations<A extends Action>(operations: Operation<BaseAction | A>[], skippedHeadOperations?: number): MappedOperation<A>[];
|
|
74
|
+
export declare function calculateSkipsLeft<A extends Action>(operations: Operation<BaseAction | A>[], currentIndex: number, skip: number): number;
|
|
74
75
|
export declare function sortOperations<A extends Action>(operations: DocumentOperations<A>): Operation<BaseAction | A>[];
|
|
75
76
|
export declare function sortMappedOperations<A extends Action>(operations: DocumentOperationsIgnoreMap<A>): MappedOperation<A>[];
|
|
76
77
|
export declare function replayOperations<T, A extends Action, L>(initialState: ExtendedState<T, L>, operations: DocumentOperations<A>, reducer: ImmutableStateReducer<T, A, L>, dispatch?: SignalDispatch, header?: DocumentHeader, documentReducer?: typeof baseReducer, skipHeaderOperations?: SkipHeaderOperations): Document<T, A, L>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SignalDispatch } from '../src/document';
|
|
2
|
+
import { Document, Action, BaseAction, ImmutableStateReducer, Operation, OperationScope, ReducerOptions } from '../src/document/types';
|
|
3
|
+
export declare const emptyReducer: import("../src/document").Reducer<unknown, Action, unknown>;
|
|
4
|
+
export declare const wrappedEmptyReducer: (state: Document<unknown, Action>, action: Action | BaseAction | Operation, dispatch?: SignalDispatch, options?: ReducerOptions) => Document<unknown, Action, unknown>;
|
|
3
5
|
export interface IncrementAction extends Action {
|
|
4
6
|
type: 'INCREMENT';
|
|
5
7
|
}
|
|
@@ -21,7 +23,7 @@ export declare const increment: () => IncrementAction;
|
|
|
21
23
|
export declare const decrement: () => DecrementAction;
|
|
22
24
|
export declare const setLocalName: (name: string) => SetLocalNameAction;
|
|
23
25
|
export declare const baseCountReducer: ImmutableStateReducer<CountState, CountAction, CountLocalState>;
|
|
24
|
-
export declare const countReducer: import("../src/document
|
|
26
|
+
export declare const countReducer: import("../src/document").Reducer<CountState, CountAction, CountLocalState>;
|
|
25
27
|
export declare const mapOperations: (operations: Operation[]) => {
|
|
26
28
|
input: unknown;
|
|
27
29
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./internal/object-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./internal/object-ifvac9k2.js");require("immer");require("json-stringify-deterministic");require("crypto");require("fs");require("https");require("path");require("jszip");const e=require("./internal/index-BpBnSlTZ.js");require("zod");exports.Document=e.Document;exports.DocumentModel=e.DocumentModel$1;exports.actions=e.actions;exports.documentModel=e.documentModel;exports.module=e.module;exports.reducer=e.reducer;exports.utils=e.utils;exports.validateInitialState=e.validateInitialState;exports.validateModule=e.validateModule;exports.validateModuleOperation=e.validateModuleOperation;exports.validateModules=e.validateModules;exports.validateStateSchemaName=e.validateStateSchemaName;exports.z=e.zod;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./internal/object-
|
|
1
|
+
import "./internal/object-S6TngMa9.js";
|
|
2
2
|
import "immer";
|
|
3
3
|
import "json-stringify-deterministic";
|
|
4
4
|
import "crypto";
|
|
@@ -6,7 +6,7 @@ import "fs";
|
|
|
6
6
|
import "https";
|
|
7
7
|
import "path";
|
|
8
8
|
import "jszip";
|
|
9
|
-
import { b as u, a as c, c as n, d as v, m as M, r as S, u as f, v as h, g as D, h as b, f as g, e as x, z } from "./internal/index-
|
|
9
|
+
import { b as u, a as c, c as n, d as v, m as M, r as S, u as f, v as h, g as D, h as b, f as g, e as x, z } from "./internal/index-A6Rqm2SZ.js";
|
|
10
10
|
import "zod";
|
|
11
11
|
export {
|
|
12
12
|
u as Document,
|
package/dist/node/document.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./internal/object-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./internal/object-ifvac9k2.js"),r=require("./internal/index-DyCS1h0M.js");require("immer");require("json-stringify-deterministic");require("zod");require("crypto");require("fs");require("https");require("path");require("jszip");exports.BaseDocument=e.BaseDocument;exports.actions=e.BaseActions;exports.applyMixins=e.applyMixins;exports.baseReducer=e.baseReducer;exports.processUndoRedo=e.processUndoRedo;exports.z=e.zod;exports.utils=r.index;
|
package/dist/node/document.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as n, h as d, g as u,
|
|
2
|
-
import { i as D } from "./internal/index-
|
|
1
|
+
import { B as n, h as d, g as u, C as x, D as f, E as l } from "./internal/object-S6TngMa9.js";
|
|
2
|
+
import { i as D } from "./internal/index-Dl5T5qdc.js";
|
|
3
3
|
import "immer";
|
|
4
4
|
import "json-stringify-deterministic";
|
|
5
5
|
import "zod";
|
package/dist/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./internal/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./internal/index-DyCS1h0M.js"),o=require("./internal/index-BpBnSlTZ.js");require("./internal/object-ifvac9k2.js");require("immer");require("json-stringify-deterministic");require("zod");require("crypto");require("fs");require("https");require("path");require("jszip");const u={"powerhouse/document":e.Document,"powerhouse/document-model":o.DocumentModel},r={Document:e.Document,DocumentModel:o.DocumentModel};exports.Document=e.Document;exports.DocumentModel=o.DocumentModel;exports.DocumentModels=u;exports.default=r;
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as o } from "./internal/index-
|
|
2
|
-
import { D as t } from "./internal/index-
|
|
3
|
-
import "./internal/object-
|
|
1
|
+
import { D as o } from "./internal/index-Dl5T5qdc.js";
|
|
2
|
+
import { D as t } from "./internal/index-A6Rqm2SZ.js";
|
|
3
|
+
import "./internal/object-S6TngMa9.js";
|
|
4
4
|
import "immer";
|
|
5
5
|
import "json-stringify-deterministic";
|
|
6
6
|
import "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Rt = Object.defineProperty;
|
|
2
2
|
var xt = (t, e, r) => e in t ? Rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var Ee = (t, e, r) => (xt(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import { c as At, i as Mt, a as Dt, b as Nt, s as Lt, d as Pt, l as Ct, e as jt, f as a, B as c, g as yt, h as wt } from "./object-
|
|
4
|
+
import { c as At, i as Mt, a as Dt, b as Nt, s as Lt, d as Pt, l as Ct, e as jt, f as a, B as c, g as yt, h as wt } from "./object-S6TngMa9.js";
|
|
5
5
|
import "immer";
|
|
6
6
|
import "json-stringify-deterministic";
|
|
7
7
|
import "crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Tt=Object.defineProperty;var Rt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var be=(t,e,r)=>(Rt(t,typeof e!="symbol"?e+"":e,r),r);const s=require("./object-
|
|
1
|
+
"use strict";var Tt=Object.defineProperty;var Rt=(t,e,r)=>e in t?Tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var be=(t,e,r)=>(Rt(t,typeof e!="symbol"?e+"":e,r),r);const s=require("./object-ifvac9k2.js");require("immer");require("json-stringify-deterministic");require("crypto");require("fs");require("https");require("path");require("jszip");const o=require("zod"),xt=new RegExp("([\\p{Ll}\\d])(\\p{Lu})","gu"),Mt=new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])","gu"),Dt=new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d","u"),Nt=/[^\p{L}\d]+/giu,_e="$1\0$2",Ae="";function ze(t){let e=t.trim();e=e.replace(xt,_e).replace(Mt,_e),e=e.replace(Nt,"\0");let r=0,n=e.length;for(;e.charAt(r)==="\0";)r++;if(r===n)return[];for(;e.charAt(n-1)==="\0";)n--;return e.slice(r,n).split(/\0/g)}function Lt(t){const e=ze(t);for(let r=0;r<e.length;r++){const n=e[r],i=Dt.exec(n);if(i){const a=i.index+(i[1]??i[2]).length;e.splice(r,1,n.slice(0,a),n.slice(a))}}return e}function Ie(t,e){const[r,n,i]=wt(t,e),a=Pt(e==null?void 0:e.locale),l=jt(e==null?void 0:e.locale),d=e!=null&&e.mergeAmbiguousCharacters?Ct(a,l):yt(a,l);return r+n.map(d).join((e==null?void 0:e.delimiter)??"")+i}function Pt(t){return t===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t)}function jt(t){return t===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t)}function Ct(t,e){return r=>`${e(r[0])}${t(r.slice(1))}`}function yt(t,e){return(r,n)=>{const i=r[0];return(n>0&&i>="0"&&i<="9"?"_"+i:e(i))+t(r.slice(1))}}function wt(t,e={}){const r=e.split??(e.separateNumbers?Lt:ze),n=e.prefixCharacters??Ae,i=e.suffixCharacters??Ae;let a=0,l=t.length;for(;a<t.length;){const d=t.charAt(a);if(!n.includes(d))break;a++}for(;l>a;){const d=l-1,zt=t.charAt(d);if(!i.includes(zt))break;l=d}return[t.slice(0,a),r(t.slice(a,l)),t.slice(l)]}function T(t,e=!1){const r=[];if(e&&t==="")return r;try{const n=JSON.parse(t);!e&&!Object.keys(n).length&&r.push({message:"Initial state cannot be empty",details:{initialState:t}})}catch{r.push({message:"Invalid initial state",details:{initialState:t}})}return r}function R(t,e,r="",n=!0){const i=[];if(!n&&!t)return i.push({message:"State schema is required",details:{schema:t}}),i;if(n&&!t)return i;const a=`type ${Ie(e)}${Ie(r)}State`;return t.includes(a)||i.push({message:`Invalid state schema name. Expected ${a}`,details:{schema:t}}),i}function x(t){const e=[];t.length||e.push({message:"Modules are required",details:{modules:t}});const r=t.reduce((n,i)=>[...n,...b(i)],[]);return[...e,...r]}function b(t){const e=[];t.name||e.push({message:"Module name is required",details:{module:t}}),t.operations.length||e.push({message:"Module operations are required",details:{module:t}});const r=t.operations.reduce((n,i)=>[...n,..._(i)],[]);return[...e,...r]}function _(t){const e=[];return t.name||e.push({message:"Operation name is required",details:{operation:t}}),t.schema||e.push({message:"Operation schema is required",details:{operation:t}}),e}const kt=Object.freeze(Object.defineProperty({__proto__:null,validateInitialState:T,validateModule:b,validateModuleOperation:_,validateModules:x,validateStateSchemaName:R},Symbol.toStringTag,{value:"Module"})),M={id:"powerhouse/document-model",name:"DocumentModel",extension:"phdm",description:"The Powerhouse Document Model describes the state and operations of a document type.",author:{name:"Powerhouse",website:"https://www.powerhouse.inc/"},specifications:[{version:1,changeLog:[],modules:[{name:"header",operations:[{name:"SetModelName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelId",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelExtension",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModelDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetAuthorWebsite",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"versioning",operations:[{name:"AddChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteChangeLogItem",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderChangeLogItems",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReleaseNewVersion",schema:null,id:"",description:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"module",operations:[{name:"AddModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetModuleDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteModule",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModules",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-error",operations:[{name:"AddOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorCode",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationErrorTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationError",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationErrors",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation-example",operations:[{name:"AddOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperationExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderOperationExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"operation",operations:[{name:"AddOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationName",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationDescription",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationTemplate",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetOperationReducer",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"MoveOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteOperation",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderModuleOperations",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""},{name:"state",operations:[{name:"SetStateSchema",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"SetInitialState",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"AddStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"UpdateStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"DeleteStateExample",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"},{name:"ReorderStateExamples",id:"",description:"",schema:"",template:"",reducer:"",examples:[],errors:[],scope:"global"}],id:"",description:""}],state:{global:{schema:"",initialValue:`{
|
|
2
2
|
"id": "",
|
|
3
3
|
"name": "",
|
|
4
4
|
"extension": "",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { j as e, f as a, b as s, a as o, c as t, k as r, m as i, n, o as c, p as l, i as p, q as d, r as u, t as m, l as O, e as y, u as b, v as D, w as S, x as _, s as f, d as g, y as F, z as v, A as h, B as j, h as x, g as z, C as R, D as A, E as B } from "./object-S6TngMa9.js";
|
|
2
|
+
const M = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
|
+
__proto__: null,
|
|
4
|
+
calculateSkipsLeft: e,
|
|
5
|
+
createAction: a,
|
|
6
|
+
createDocument: s,
|
|
7
|
+
createExtendedState: o,
|
|
8
|
+
createReducer: t,
|
|
9
|
+
createZip: r,
|
|
10
|
+
getLocalFile: i,
|
|
11
|
+
getRemoteFile: n,
|
|
12
|
+
hashDocument: c,
|
|
13
|
+
hashKey: l,
|
|
14
|
+
isBaseAction: p,
|
|
15
|
+
isNoopOperation: d,
|
|
16
|
+
isSameDocument: u,
|
|
17
|
+
isUndoRedo: m,
|
|
18
|
+
loadFromFile: O,
|
|
19
|
+
loadFromInput: y,
|
|
20
|
+
mapSkippedOperations: b,
|
|
21
|
+
readOnly: D,
|
|
22
|
+
replayDocument: S,
|
|
23
|
+
replayOperations: _,
|
|
24
|
+
saveToFile: f,
|
|
25
|
+
saveToFileHandle: g,
|
|
26
|
+
sortMappedOperations: F,
|
|
27
|
+
sortOperations: v,
|
|
28
|
+
validateOperations: h
|
|
29
|
+
}, Symbol.toStringTag, { value: "Module" })), k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
30
|
+
__proto__: null,
|
|
31
|
+
BaseDocument: j,
|
|
32
|
+
actions: x,
|
|
33
|
+
applyMixins: z,
|
|
34
|
+
baseReducer: R,
|
|
35
|
+
processUndoRedo: A,
|
|
36
|
+
utils: M,
|
|
37
|
+
z: B
|
|
38
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
39
|
+
export {
|
|
40
|
+
k as D,
|
|
41
|
+
M as i
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./object-ifvac9k2.js"),t=Object.freeze(Object.defineProperty({__proto__:null,calculateSkipsLeft:e.calculateSkipsLeft,createAction:e.createAction,createDocument:e.createDocument,createExtendedState:e.createExtendedState,createReducer:e.createReducer,createZip:e.createZip,getLocalFile:e.getLocalFile,getRemoteFile:e.getRemoteFile,hashDocument:e.hashDocument,hashKey:e.hashKey,isBaseAction:e.isBaseAction,isNoopOperation:e.isNoopOperation,isSameDocument:e.isSameDocument,isUndoRedo:e.isUndoRedo,loadFromFile:e.loadFromFile,loadFromInput:e.loadFromInput,mapSkippedOperations:e.mapSkippedOperations,readOnly:e.readOnly,replayDocument:e.replayDocument,replayOperations:e.replayOperations,saveToFile:e.saveToFile,saveToFileHandle:e.saveToFileHandle,sortMappedOperations:e.sortMappedOperations,sortOperations:e.sortOperations,validateOperations:e.validateOperations},Symbol.toStringTag,{value:"Module"})),o=Object.freeze(Object.defineProperty({__proto__:null,BaseDocument:e.BaseDocument,actions:e.BaseActions,applyMixins:e.applyMixins,baseReducer:e.baseReducer,processUndoRedo:e.processUndoRedo,utils:t,z:e.zod},Symbol.toStringTag,{value:"Module"}));exports.Document=o;exports.index=t;
|