document-model 1.0.9 → 1.0.11
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/index.d.ts +1 -0
- package/dist/browser/document/object.d.ts +10 -4
- package/dist/browser/document/reducer.d.ts +2 -1
- package/dist/browser/document/signal.d.ts +15 -0
- package/dist/browser/document/types.d.ts +12 -3
- package/dist/browser/document/utils/base.d.ts +2 -2
- package/dist/browser/document-model/gen/object.d.ts +2 -2
- package/dist/browser/document-model/gen/operation/actions.d.ts +3 -2
- package/dist/browser/document-model/gen/operation/creators.d.ts +3 -2
- package/dist/browser/document-model/gen/operation/object.d.ts +2 -1
- package/dist/browser/document-model/gen/operation/operations.d.ts +2 -1
- package/dist/browser/document-model/gen/schema/types.d.ts +8 -0
- package/dist/browser/document-model/gen/schema/zod.d.ts +5 -1
- package/dist/browser/document-model/index.d.ts +1 -0
- 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-ac329925.js +22 -0
- package/dist/{node/internal/index-5b0ca13a.js → browser/internal/index-c9e4dc9e.js} +1 -1
- package/dist/{node/internal/index-6a7277fe.js → browser/internal/index-cf51e575.js} +1 -1
- package/dist/browser/internal/{index-48f140bc.js → index-df1f6a1b.js} +442 -374
- package/dist/browser/internal/{object-ceb8f869.js → object-113c73e2.js} +2 -2
- package/dist/browser/internal/{object-98a2cff6.js → object-13eaec2b.js} +219 -218
- package/dist/node/document/index.d.ts +1 -0
- package/dist/node/document/object.d.ts +10 -4
- package/dist/node/document/reducer.d.ts +2 -1
- package/dist/node/document/signal.d.ts +15 -0
- package/dist/node/document/types.d.ts +12 -3
- package/dist/node/document/utils/base.d.ts +2 -2
- package/dist/node/document-model/gen/object.d.ts +2 -2
- package/dist/node/document-model/gen/operation/actions.d.ts +3 -2
- package/dist/node/document-model/gen/operation/creators.d.ts +3 -2
- package/dist/node/document-model/gen/operation/object.d.ts +2 -1
- package/dist/node/document-model/gen/operation/operations.d.ts +2 -1
- package/dist/node/document-model/gen/schema/types.d.ts +8 -0
- package/dist/node/document-model/gen/schema/zod.d.ts +5 -1
- package/dist/node/document-model/index.d.ts +1 -0
- 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-dfaca09a.js → index-0abc9251.js} +442 -374
- package/dist/{browser/internal/index-9922a4fc.js → node/internal/index-150bbba4.js} +1 -1
- package/dist/node/internal/index-2cd26a65.js +22 -0
- package/dist/{browser/internal/index-ff22a5bb.js → node/internal/index-a74d15aa.js} +1 -1
- package/dist/node/internal/{object-10abe15d.js → object-073dccc4.js} +1 -1
- package/dist/node/internal/{object-6f942fcb.js → object-baf4e3d5.js} +79 -78
- package/package.json +1 -1
- package/dist/browser/internal/index-7d7d05c8.js +0 -22
- package/dist/node/internal/index-2e487f63.js +0 -22
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BaseAction } from './actions/types';
|
|
1
|
+
import type { BaseAction } from './actions/types';
|
|
2
|
+
import type { Signal } from './signal';
|
|
2
3
|
import type { Action, AttachmentRef, Document, ExtendedState, Reducer } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* This is an abstract class representing a document and provides methods
|
|
@@ -9,12 +10,13 @@ import type { Action, AttachmentRef, Document, ExtendedState, Reducer } from './
|
|
|
9
10
|
export declare abstract class BaseDocument<T, A extends Action> {
|
|
10
11
|
protected _document: Document<T, A>;
|
|
11
12
|
private _reducer;
|
|
13
|
+
private _dispatch?;
|
|
12
14
|
/**
|
|
13
15
|
* Constructs a BaseDocument instance with an initial state.
|
|
14
16
|
* @param reducer - The reducer function that updates the state.
|
|
15
17
|
* @param document - The initial state of the document.
|
|
16
18
|
*/
|
|
17
|
-
constructor(reducer: Reducer<T, A>, document: Document<T, A
|
|
19
|
+
constructor(reducer: Reducer<T, A>, document: Document<T, A>, dispatch?: (signal: Signal) => void);
|
|
18
20
|
/**
|
|
19
21
|
* Dispatches an action to update the state of the document.
|
|
20
22
|
* @param action - The action to dispatch.
|
|
@@ -88,7 +90,9 @@ export declare abstract class BaseDocument<T, A extends Action> {
|
|
|
88
90
|
readonly hash: string;
|
|
89
91
|
} | import("immer").Immutable<A & {
|
|
90
92
|
index: number;
|
|
91
|
-
timestamp: string;
|
|
93
|
+
timestamp: string; /**
|
|
94
|
+
* Gets the timestamp of the date the document was created.
|
|
95
|
+
*/
|
|
92
96
|
hash: string;
|
|
93
97
|
}>)[];
|
|
94
98
|
/**
|
|
@@ -189,7 +193,9 @@ export declare abstract class BaseDocument<T, A extends Action> {
|
|
|
189
193
|
readonly hash: string;
|
|
190
194
|
} | import("immer").Immutable<A & {
|
|
191
195
|
index: number;
|
|
192
|
-
timestamp: string;
|
|
196
|
+
timestamp: string; /**
|
|
197
|
+
* Gets the timestamp of the date the document was created.
|
|
198
|
+
*/
|
|
193
199
|
hash: string;
|
|
194
200
|
}>)[];
|
|
195
201
|
readonly initialState: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseAction } from './actions/types';
|
|
2
2
|
import { Action, Document, ImmutableStateReducer } from './types';
|
|
3
|
+
import { Signal } from './signal';
|
|
3
4
|
/**
|
|
4
5
|
* Base document reducer that wraps a custom document reducer and handles
|
|
5
6
|
* document-level actions such as undo, redo, prune, and set name.
|
|
@@ -12,4 +13,4 @@ import { Action, Document, ImmutableStateReducer } from './types';
|
|
|
12
13
|
* specific to the document's state.
|
|
13
14
|
* @returns The new state of the document.
|
|
14
15
|
*/
|
|
15
|
-
export declare function baseReducer<T, A extends Action>(document: Document<T, A>, action: A | BaseAction, customReducer: ImmutableStateReducer<T, A
|
|
16
|
+
export declare function baseReducer<T, A extends Action>(document: Document<T, A>, action: A | BaseAction, customReducer: ImmutableStateReducer<T, A>, dispatch?: (signal: Signal) => void): Document<T, A>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ISignal<T extends string = string, I = unknown> {
|
|
2
|
+
type: T;
|
|
3
|
+
input: I;
|
|
4
|
+
}
|
|
5
|
+
export type CreateChildDocumentInput = {
|
|
6
|
+
id: string;
|
|
7
|
+
documentType: string;
|
|
8
|
+
initialState?: unknown;
|
|
9
|
+
};
|
|
10
|
+
export type CreateChildDocumentSignal = ISignal<'CREATE_CHILD_DOCUMENT', CreateChildDocumentInput>;
|
|
11
|
+
export type DeleteChildDocumentInput = {
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
14
|
+
export type DeleteChildDocumentSignal = ISignal<'DELETE_CHILD_DOCUMENT', DeleteChildDocumentInput>;
|
|
15
|
+
export type Signal = CreateChildDocumentSignal | DeleteChildDocumentSignal;
|
|
@@ -4,6 +4,7 @@ import type { DocumentModelState } from '../document-model/';
|
|
|
4
4
|
import type { BaseAction } from './actions/types';
|
|
5
5
|
import { BaseDocument } from './object';
|
|
6
6
|
import { FileInput } from './utils';
|
|
7
|
+
import { Signal } from './signal';
|
|
7
8
|
export { z } from './schema';
|
|
8
9
|
export type * from './schema/types';
|
|
9
10
|
export type { FileInput } from './utils';
|
|
@@ -20,6 +21,8 @@ export type Action<T extends string = string, I = unknown> = {
|
|
|
20
21
|
input: I;
|
|
21
22
|
/** The attachments included in the action. */
|
|
22
23
|
attachments?: AttachmentInput[] | undefined;
|
|
24
|
+
/** The scope of the action, can either be 'global' or 'local'. Defaults to 'global' */
|
|
25
|
+
scope?: OperationScope;
|
|
23
26
|
};
|
|
24
27
|
export type ActionWithAttachment<T extends string = string, I = unknown> = Action<T, I> & {
|
|
25
28
|
attachments: AttachmentInput[];
|
|
@@ -31,7 +34,7 @@ export type ActionWithAttachment<T extends string = string, I = unknown> = Actio
|
|
|
31
34
|
* @typeParam State - The type of the document data.
|
|
32
35
|
* @typeParam A - The type of the actions supported by the reducer.
|
|
33
36
|
*/
|
|
34
|
-
export type Reducer<State, A extends Action> = (state: Document<State, A>, action: A | BaseAction) => Document<State, A>;
|
|
37
|
+
export type Reducer<State, A extends Action> = (state: Document<State, A>, action: A | BaseAction, dispatch?: (signal: Signal) => void) => Document<State, A>;
|
|
35
38
|
/**
|
|
36
39
|
* A {@link Reducer} that prevents mutable code from changing the previous state.
|
|
37
40
|
*
|
|
@@ -44,8 +47,14 @@ export type Reducer<State, A extends Action> = (state: Document<State, A>, actio
|
|
|
44
47
|
* @typeParam State - The type of the document data.
|
|
45
48
|
* @typeParam A - The type of the actions supported by the reducer.
|
|
46
49
|
*/
|
|
47
|
-
export type ImmutableReducer<State, A extends Action> = (state: Draft<Document<State, A>>, action: A | BaseAction) => Document<State, A> | void;
|
|
48
|
-
export type ImmutableStateReducer<State, A extends Action> = (state: Draft<State>, action: A) => State | void;
|
|
50
|
+
export type ImmutableReducer<State, A extends Action> = (state: Draft<Document<State, A>>, action: A | BaseAction, dispatch?: (signal: Signal) => void) => Document<State, A> | void;
|
|
51
|
+
export type ImmutableStateReducer<State, A extends Action> = (state: Draft<State>, action: A, dispatch?: (signal: Signal) => void) => State | void;
|
|
52
|
+
/**
|
|
53
|
+
* Scope of an operation.
|
|
54
|
+
* Global: The operation is synchronized everywhere in the network. This is the default document operation.
|
|
55
|
+
* Local: The operation is applied only locally (to a local state). Used for local settings such as a drive's local path
|
|
56
|
+
*/
|
|
57
|
+
export type OperationScope = 'global' | 'local';
|
|
49
58
|
/**
|
|
50
59
|
* An operation that was applied to a {@link Document}.
|
|
51
60
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { baseReducer } from '../reducer';
|
|
2
|
-
import { Action, BaseAction, Document, ExtendedState, ImmutableStateReducer, Reducer, Immutable } from '../types';
|
|
2
|
+
import { Action, BaseAction, Document, ExtendedState, ImmutableStateReducer, Reducer, Immutable, OperationScope } from '../types';
|
|
3
3
|
export declare function isBaseAction(action: Action): action is BaseAction;
|
|
4
4
|
/**
|
|
5
5
|
* Helper function to be used by action creators.
|
|
@@ -19,7 +19,7 @@ export declare function isBaseAction(action: Action): action is BaseAction;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function createAction<A extends Action>(type: A['type'], input?: A['input'], attachments?: Action['attachments'], validator?: () => {
|
|
21
21
|
parse(v: unknown): A;
|
|
22
|
-
}): A;
|
|
22
|
+
}, scope?: OperationScope): A;
|
|
23
23
|
/**
|
|
24
24
|
* Helper function to create a document model reducer.
|
|
25
25
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentModelState } from './types';
|
|
2
|
-
import { ExtendedState } from '../../document';
|
|
2
|
+
import { ExtendedState, Signal } from '../../document';
|
|
3
3
|
import { BaseDocument } from '../../document/object';
|
|
4
4
|
import { DocumentModelAction } from './actions';
|
|
5
5
|
import DocumentModel_Header from './header/object';
|
|
@@ -20,7 +20,7 @@ interface DocumentModel extends DocumentModel_Header, DocumentModel_Versioning,
|
|
|
20
20
|
}
|
|
21
21
|
declare class DocumentModel extends BaseDocument<DocumentModelState, DocumentModelAction> {
|
|
22
22
|
static fileExtension: string;
|
|
23
|
-
constructor(initialState?: Partial<ExtendedState<Partial<DocumentModelState
|
|
23
|
+
constructor(initialState?: Partial<ExtendedState<Partial<DocumentModelState>>>, dispatch?: (signal: Signal) => void);
|
|
24
24
|
saveToFile(path: string, name?: string): Promise<string>;
|
|
25
25
|
loadFromFile(path: string): Promise<void>;
|
|
26
26
|
static fromFile(path: string): Promise<DocumentModel>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
|
-
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput } from '../types';
|
|
2
|
+
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, SetOperationScopeInput } from '../types';
|
|
3
3
|
export type AddOperationAction = Action<'ADD_OPERATION', AddOperationInput>;
|
|
4
4
|
export type SetOperationNameAction = Action<'SET_OPERATION_NAME', SetOperationNameInput>;
|
|
5
|
+
export type SetOperationScopeAction = Action<'SET_OPERATION_SCOPE', SetOperationScopeInput>;
|
|
5
6
|
export type SetOperationSchemaAction = Action<'SET_OPERATION_SCHEMA', SetOperationSchemaInput>;
|
|
6
7
|
export type SetOperationDescriptionAction = Action<'SET_OPERATION_DESCRIPTION', SetOperationDescriptionInput>;
|
|
7
8
|
export type SetOperationTemplateAction = Action<'SET_OPERATION_TEMPLATE', SetOperationTemplateInput>;
|
|
@@ -9,4 +10,4 @@ export type SetOperationReducerAction = Action<'SET_OPERATION_REDUCER', SetOpera
|
|
|
9
10
|
export type MoveOperationAction = Action<'MOVE_OPERATION', MoveOperationInput>;
|
|
10
11
|
export type DeleteOperationAction = Action<'DELETE_OPERATION', DeleteOperationInput>;
|
|
11
12
|
export type ReorderModuleOperationsAction = Action<'REORDER_MODULE_OPERATIONS', ReorderModuleOperationsInput>;
|
|
12
|
-
export type DocumentModelOperationAction = AddOperationAction | SetOperationNameAction | SetOperationSchemaAction | SetOperationDescriptionAction | SetOperationTemplateAction | SetOperationReducerAction | MoveOperationAction | DeleteOperationAction | ReorderModuleOperationsAction;
|
|
13
|
+
export type DocumentModelOperationAction = AddOperationAction | SetOperationNameAction | SetOperationScopeAction | SetOperationSchemaAction | SetOperationDescriptionAction | SetOperationTemplateAction | SetOperationReducerAction | MoveOperationAction | DeleteOperationAction | ReorderModuleOperationsAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput } from '../types';
|
|
2
|
-
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction } from './actions';
|
|
1
|
+
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, SetOperationScopeInput } from '../types';
|
|
2
|
+
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction, SetOperationScopeAction } from './actions';
|
|
3
3
|
export declare const addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
4
4
|
export declare const setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
5
|
+
export declare const setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
5
6
|
export declare const setOperationSchema: (input: SetOperationSchemaInput) => SetOperationSchemaAction;
|
|
6
7
|
export declare const setOperationDescription: (input: SetOperationDescriptionInput) => SetOperationDescriptionAction;
|
|
7
8
|
export declare const setOperationTemplate: (input: SetOperationTemplateInput) => SetOperationTemplateAction;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseDocument } from '../../../document/object';
|
|
2
|
-
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, DocumentModelState } from '../types';
|
|
2
|
+
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, DocumentModelState, SetOperationScopeInput } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
export default class DocumentModel_Operation extends BaseDocument<DocumentModelState, DocumentModelAction> {
|
|
5
5
|
addOperation(input: AddOperationInput): this;
|
|
6
6
|
setOperationName(input: SetOperationNameInput): this;
|
|
7
|
+
setOperationScope(input: SetOperationScopeInput): this;
|
|
7
8
|
setOperationSchema(input: SetOperationSchemaInput): this;
|
|
8
9
|
setOperationDescription(input: SetOperationDescriptionInput): this;
|
|
9
10
|
setOperationTemplate(input: SetOperationTemplateInput): this;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction } from './actions';
|
|
1
|
+
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction, SetOperationScopeAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
3
|
export interface DocumentModelOperationOperations {
|
|
4
4
|
addOperationOperation: (state: DocumentModelState, action: AddOperationAction) => void;
|
|
5
5
|
setOperationNameOperation: (state: DocumentModelState, action: SetOperationNameAction) => void;
|
|
6
|
+
setOperationScopeOperation: (state: DocumentModelState, action: SetOperationScopeAction) => void;
|
|
6
7
|
setOperationSchemaOperation: (state: DocumentModelState, action: SetOperationSchemaAction) => void;
|
|
7
8
|
setOperationDescriptionOperation: (state: DocumentModelState, action: SetOperationDescriptionAction) => void;
|
|
8
9
|
setOperationTemplateOperation: (state: DocumentModelState, action: SetOperationTemplateAction) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OperationScope } from "../../../document";
|
|
1
2
|
export type Maybe<T> = T | null;
|
|
2
3
|
export type InputMaybe<T> = T | null | undefined;
|
|
3
4
|
export type Exact<T extends {
|
|
@@ -74,6 +75,7 @@ export type AddOperationInput = {
|
|
|
74
75
|
reducer?: InputMaybe<Scalars['String']['input']>;
|
|
75
76
|
schema?: InputMaybe<Scalars['String']['input']>;
|
|
76
77
|
template?: InputMaybe<Scalars['String']['input']>;
|
|
78
|
+
scope?: InputMaybe<OperationScope>;
|
|
77
79
|
};
|
|
78
80
|
export type AddStateExampleInput = {
|
|
79
81
|
example: Scalars['String']['input'];
|
|
@@ -119,6 +121,7 @@ export type DocumentModelState = {
|
|
|
119
121
|
name: Scalars['String']['output'];
|
|
120
122
|
specifications: Array<DocumentSpecification>;
|
|
121
123
|
};
|
|
124
|
+
export type DocumentModelMeta = unknown;
|
|
122
125
|
export type DocumentSpecification = {
|
|
123
126
|
__typename?: 'DocumentSpecification';
|
|
124
127
|
changeLog: Array<Scalars['String']['output']>;
|
|
@@ -315,6 +318,7 @@ export type Operation = {
|
|
|
315
318
|
reducer: Maybe<Scalars['String']['output']>;
|
|
316
319
|
schema: Maybe<Scalars['String']['output']>;
|
|
317
320
|
template: Maybe<Scalars['String']['output']>;
|
|
321
|
+
scope: OperationScope;
|
|
318
322
|
};
|
|
319
323
|
export type OperationError = {
|
|
320
324
|
__typename?: 'OperationError';
|
|
@@ -399,6 +403,10 @@ export type SetOperationNameInput = {
|
|
|
399
403
|
id: Scalars['ID']['input'];
|
|
400
404
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
401
405
|
};
|
|
406
|
+
export type SetOperationScopeInput = {
|
|
407
|
+
id: Scalars['ID']['input'];
|
|
408
|
+
scope: InputMaybe<OperationScope>;
|
|
409
|
+
};
|
|
402
410
|
export type SetOperationReducerInput = {
|
|
403
411
|
id: Scalars['ID']['input'];
|
|
404
412
|
reducer?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AddChangeLogItemInput, AddModuleInput, AddOperationErrorInput, AddOperationExampleInput, AddOperationInput, AddStateExampleInput, Author, CodeExample, DeleteChangeLogItemInput, DeleteModuleInput, DeleteOperationErrorInput, DeleteOperationExampleInput, DeleteOperationInput, DeleteStateExampleInput, DocumentModelState, DocumentSpecification, Module, MoveOperationInput, Operation, OperationError, ReorderChangeLogItemsInput, ReorderModuleOperationsInput, ReorderModulesInput, ReorderOperationErrorsInput, ReorderOperationExamplesInput, ReorderStateExamplesInput, SetAuthorNameInput, SetAuthorWebsiteInput, SetInitialStateInput, SetModelDescriptionInput, SetModelExtensionInput, SetModelIdInput, SetModelNameInput, SetModuleDescriptionInput, SetModuleNameInput, SetOperationDescriptionInput, SetOperationErrorCodeInput, SetOperationErrorDescriptionInput, SetOperationErrorNameInput, SetOperationErrorTemplateInput, SetOperationNameInput, SetOperationReducerInput, SetOperationSchemaInput, SetOperationTemplateInput, SetStateSchemaInput, State, UpdateChangeLogItemInput, UpdateOperationExampleInput, UpdateStateExampleInput } from '.';
|
|
2
|
+
import { AddChangeLogItemInput, AddModuleInput, AddOperationErrorInput, AddOperationExampleInput, AddOperationInput, AddStateExampleInput, Author, CodeExample, DeleteChangeLogItemInput, DeleteModuleInput, DeleteOperationErrorInput, DeleteOperationExampleInput, DeleteOperationInput, DeleteStateExampleInput, DocumentModelState, DocumentSpecification, Module, MoveOperationInput, Operation, OperationError, ReorderChangeLogItemsInput, ReorderModuleOperationsInput, ReorderModulesInput, ReorderOperationErrorsInput, ReorderOperationExamplesInput, ReorderStateExamplesInput, SetAuthorNameInput, SetAuthorWebsiteInput, SetInitialStateInput, SetModelDescriptionInput, SetModelExtensionInput, SetModelIdInput, SetModelNameInput, SetModuleDescriptionInput, SetModuleNameInput, SetOperationDescriptionInput, SetOperationErrorCodeInput, SetOperationErrorDescriptionInput, SetOperationErrorNameInput, SetOperationErrorTemplateInput, SetOperationNameInput, SetOperationReducerInput, SetOperationSchemaInput, SetOperationScopeInput, SetOperationTemplateInput, SetStateSchemaInput, State, UpdateChangeLogItemInput, UpdateOperationExampleInput, UpdateStateExampleInput } from '.';
|
|
3
3
|
type Properties<T> = Required<{
|
|
4
4
|
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
5
5
|
}>;
|
|
@@ -88,6 +88,7 @@ export declare function DocumentModelInputSchema(): z.ZodUnion<[z.ZodObject<Requ
|
|
|
88
88
|
reducer?: z.ZodType<import("./types").InputMaybe<string>, any, import("./types").InputMaybe<string>> | undefined;
|
|
89
89
|
schema?: z.ZodType<import("./types").InputMaybe<string>, any, import("./types").InputMaybe<string>> | undefined;
|
|
90
90
|
template?: z.ZodType<import("./types").InputMaybe<string>, any, import("./types").InputMaybe<string>> | undefined;
|
|
91
|
+
scope?: z.ZodType<import("./types").InputMaybe<import("../../../document").OperationScope>, any, import("./types").InputMaybe<import("../../../document").OperationScope>> | undefined;
|
|
91
92
|
}>, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
92
93
|
id: string;
|
|
93
94
|
name: string;
|
|
@@ -96,6 +97,7 @@ export declare function DocumentModelInputSchema(): z.ZodUnion<[z.ZodObject<Requ
|
|
|
96
97
|
reducer?: import("./types").InputMaybe<string>;
|
|
97
98
|
schema?: import("./types").InputMaybe<string>;
|
|
98
99
|
template?: import("./types").InputMaybe<string>;
|
|
100
|
+
scope?: import("./types").InputMaybe<import("../../../document").OperationScope>;
|
|
99
101
|
}, {
|
|
100
102
|
id: string;
|
|
101
103
|
name: string;
|
|
@@ -104,6 +106,7 @@ export declare function DocumentModelInputSchema(): z.ZodUnion<[z.ZodObject<Requ
|
|
|
104
106
|
reducer?: import("./types").InputMaybe<string>;
|
|
105
107
|
schema?: import("./types").InputMaybe<string>;
|
|
106
108
|
template?: import("./types").InputMaybe<string>;
|
|
109
|
+
scope?: import("./types").InputMaybe<import("../../../document").OperationScope>;
|
|
107
110
|
}>, z.ZodObject<Required<{
|
|
108
111
|
example: z.ZodType<string, any, string>;
|
|
109
112
|
id: z.ZodType<string, any, string>;
|
|
@@ -417,6 +420,7 @@ export declare function SetOperationErrorDescriptionInputSchema(): z.ZodObject<P
|
|
|
417
420
|
export declare function SetOperationErrorNameInputSchema(): z.ZodObject<Properties<SetOperationErrorNameInput>>;
|
|
418
421
|
export declare function SetOperationErrorTemplateInputSchema(): z.ZodObject<Properties<SetOperationErrorTemplateInput>>;
|
|
419
422
|
export declare function SetOperationNameInputSchema(): z.ZodObject<Properties<SetOperationNameInput>>;
|
|
423
|
+
export declare function SetOperationScopeInputSchema(): z.ZodObject<Properties<SetOperationScopeInput>>;
|
|
420
424
|
export declare function SetOperationReducerInputSchema(): z.ZodObject<Properties<SetOperationReducerInput>>;
|
|
421
425
|
export declare function SetOperationSchemaInputSchema(): z.ZodObject<Properties<SetOperationSchemaInput>>;
|
|
422
426
|
export declare function SetOperationTemplateInputSchema(): z.ZodObject<Properties<SetOperationTemplateInput>>;
|
|
@@ -48,6 +48,7 @@ declare const actions: {
|
|
|
48
48
|
reorderOperationExamples: (input: import("./gen").ReorderOperationExamplesInput) => import("./gen").ReorderOperationExamplesAction;
|
|
49
49
|
addOperation: (input: import("./gen").AddOperationInput) => import("./gen").AddOperationAction;
|
|
50
50
|
setOperationName: (input: import("./gen").SetOperationNameInput) => import("./gen").SetOperationNameAction;
|
|
51
|
+
setOperationScope: (input: import("./gen").SetOperationScopeInput) => import("./gen").SetOperationScopeAction;
|
|
51
52
|
setOperationSchema: (input: import("./gen").SetOperationSchemaInput) => import("./gen").SetOperationSchemaAction;
|
|
52
53
|
setOperationDescription: (input: import("./gen").SetOperationDescriptionInput) => import("./gen").SetOperationDescriptionAction;
|
|
53
54
|
setOperationTemplate: (input: import("./gen").SetOperationTemplateInput) => import("./gen").SetOperationTemplateAction;
|
|
@@ -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-113c73e2.js");require("json-stringify-deterministic");require("immer");require("jszip");const e=require("./internal/index-ac329925.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.z=e.zod;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./internal/object-
|
|
1
|
+
import "./internal/object-13eaec2b.js";
|
|
2
2
|
import "json-stringify-deterministic";
|
|
3
3
|
import "immer";
|
|
4
4
|
import "jszip";
|
|
5
|
-
import { b as i, a as u, c, d, m as p, r as l, u as n, z as D } from "./internal/index-
|
|
5
|
+
import { b as i, a as u, c, d, m as p, r as l, u as n, z as D } from "./internal/index-df1f6a1b.js";
|
|
6
6
|
import "zod";
|
|
7
7
|
export {
|
|
8
8
|
i as Document,
|
|
@@ -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-113c73e2.js"),r=require("./internal/index-cf51e575.js");require("json-stringify-deterministic");require("immer");require("jszip");require("zod");exports.BaseDocument=e.BaseDocument;exports.actions=e.BaseActions;exports.applyMixins=e.applyMixins;exports.baseReducer=e.baseReducer;exports.z=e.zod;exports.utils=r.index;
|
package/dist/browser/document.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as t, h as e, g as m, p as c, z as n } from "./internal/object-
|
|
2
|
-
import { i as x } from "./internal/index-
|
|
1
|
+
import { B as t, h as e, g as m, p as c, z as n } from "./internal/object-13eaec2b.js";
|
|
2
|
+
import { i as x } from "./internal/index-c9e4dc9e.js";
|
|
3
3
|
import "json-stringify-deterministic";
|
|
4
4
|
import "immer";
|
|
5
5
|
import "jszip";
|
package/dist/browser/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-cf51e575.js"),o=require("./internal/index-ac329925.js");require("./internal/object-113c73e2.js");require("json-stringify-deterministic");require("immer");require("jszip");require("zod");const u={"powerhouse/document":e.Document,"powerhouse/document-model":o.DocumentModel},t={Document:e.Document,DocumentModel:o.DocumentModel};exports.Document=e.Document;exports.DocumentModel=o.DocumentModel;exports.DocumentModels=u;exports.default=t;
|
package/dist/browser/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-c9e4dc9e.js";
|
|
2
|
+
import { D as t } from "./internal/index-df1f6a1b.js";
|
|
3
|
+
import "./internal/object-13eaec2b.js";
|
|
4
4
|
import "json-stringify-deterministic";
|
|
5
5
|
import "immer";
|
|
6
6
|
import "jszip";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";var dt=Object.defineProperty;var ut=(t,e,n)=>e in t?dt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var de=(t,e,n)=>(ut(t,typeof e!="symbol"?e+"":e,n),n);const s=require("./object-113c73e2.js");require("json-stringify-deterministic");require("immer");require("jszip");const r=require("zod"),mt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),f={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:{schema:"",initialValue:`{
|
|
2
|
+
"id": "",
|
|
3
|
+
"name": "",
|
|
4
|
+
"extension": "",
|
|
5
|
+
"description": "",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "",
|
|
8
|
+
"website": ""
|
|
9
|
+
},
|
|
10
|
+
"specifications": [
|
|
11
|
+
{
|
|
12
|
+
"version": 1,
|
|
13
|
+
"changeLog": [],
|
|
14
|
+
"state": {
|
|
15
|
+
"schema": "",
|
|
16
|
+
"initialValue": "",
|
|
17
|
+
"examples": []
|
|
18
|
+
},
|
|
19
|
+
"modules": []
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}`,examples:[]}}]},ue=t=>t!=null,Et=r.z.any().refine(t=>ue(t));function _(){return r.z.object({__typename:r.z.literal("AddChangeLogItemInput").optional(),content:r.z.string(),id:r.z.string(),insertBefore:r.z.string().nullable()})}function A(){return r.z.object({description:r.z.string().nullish(),id:r.z.string(),name:r.z.string()})}function z(){return r.z.object({errorCode:r.z.string().nullish(),errorDescription:r.z.string().nullish(),errorName:r.z.string().nullish(),errorTemplate:r.z.string().nullish(),id:r.z.string(),operationId:r.z.string()})}function I(){return r.z.object({example:r.z.string(),id:r.z.string(),operationId:r.z.string()})}function T(){return r.z.object({description:r.z.string().nullish(),id:r.z.string(),moduleId:r.z.string(),name:r.z.string(),reducer:r.z.string().nullish(),schema:r.z.string().nullish(),template:r.z.string().nullish(),scope:r.z.literal("local").or(r.z.literal("global")).nullish()})}function b(){return r.z.object({example:r.z.string(),id:r.z.string(),insertBefore:r.z.string().nullish()})}function me(){return r.z.object({__typename:r.z.literal("Author").optional(),name:r.z.string(),website:r.z.string().nullable()})}function R(){return r.z.object({__typename:r.z.literal("CodeExample").optional(),id:r.z.string(),value:r.z.string()})}function D(){return r.z.object({__typename:r.z.literal("DeleteChangeLogItemInput").optional(),id:r.z.string()})}function M(){return r.z.object({id:r.z.string()})}function x(){return r.z.object({id:r.z.string()})}function N(){return r.z.object({id:r.z.string()})}function L(){return r.z.object({id:r.z.string()})}function P(){return r.z.object({id:r.z.string()})}function ht(){return r.z.union([_(),A(),z(),I(),T(),b(),D(),M(),x(),N(),L(),P(),j(),C(),k(),y(),w(),U(),v(),F(),H(),V(),X(),G(),B(),W(),$(),q(),J(),K(),Q(),Y(),Z(),ee(),te(),re(),oe(),ne(),ie(),se(),ae()])}function Ot(){return r.z.object({__typename:r.z.literal("DocumentModelState").optional(),author:me(),description:r.z.string(),extension:r.z.string(),id:r.z.string(),name:r.z.string(),specifications:r.z.array(Ee())})}function Ee(){return r.z.object({__typename:r.z.literal("DocumentSpecification").optional(),changeLog:r.z.array(r.z.string()),modules:r.z.array(he()),state:fe(),version:r.z.number()})}function he(){return r.z.object({__typename:r.z.literal("Module").optional(),description:r.z.string().nullable(),id:r.z.string(),name:r.z.string(),operations:r.z.array(Oe())})}function j(){return r.z.object({newModuleId:r.z.string(),operationId:r.z.string()})}function Oe(){return r.z.object({__typename:r.z.literal("Operation").optional(),description:r.z.string().nullable(),errors:r.z.array(ge()),examples:r.z.array(R()),id:r.z.string(),name:r.z.string().nullable(),reducer:r.z.string().nullable(),schema:r.z.string().nullable(),template:r.z.string().nullable(),scope:r.z.literal("local").or(r.z.literal("global"))})}function ge(){return r.z.object({__typename:r.z.literal("OperationError").optional(),code:r.z.string().nullable(),description:r.z.string().nullable(),id:r.z.string(),name:r.z.string().nullable(),template:r.z.string().nullable()})}function C(){return r.z.object({__typename:r.z.literal("ReorderChangeLogItemsInput").optional(),order:r.z.array(r.z.string())})}function k(){return r.z.object({moduleId:r.z.string(),order:r.z.array(r.z.string())})}function y(){return r.z.object({order:r.z.array(r.z.string())})}function w(){return r.z.object({operationId:r.z.string(),order:r.z.array(r.z.string())})}function U(){return r.z.object({operationId:r.z.string(),order:r.z.array(r.z.string())})}function v(){return r.z.object({order:r.z.array(r.z.string())})}function F(){return r.z.object({authorName:r.z.string()})}function H(){return r.z.object({authorWebsite:r.z.string()})}function V(){return r.z.object({initialValue:r.z.string()})}function X(){return r.z.object({description:r.z.string()})}function G(){return r.z.object({extension:r.z.string()})}function B(){return r.z.object({id:r.z.string()})}function W(){return r.z.object({name:r.z.string()})}function $(){return r.z.object({description:r.z.string().nullish(),id:r.z.string()})}function q(){return r.z.object({id:r.z.string(),name:r.z.string().nullish()})}function J(){return r.z.object({description:r.z.string().nullish(),id:r.z.string()})}function K(){return r.z.object({errorCode:r.z.string().nullish(),id:r.z.string()})}function Q(){return r.z.object({errorDescription:r.z.string().nullish(),id:r.z.string()})}function Y(){return r.z.object({errorName:r.z.string().nullish(),id:r.z.string()})}function Z(){return r.z.object({errorTemplate:r.z.string().nullish(),id:r.z.string()})}function ee(){return r.z.object({id:r.z.string(),name:r.z.string().nullish()})}function Se(){return r.z.object({id:r.z.string(),scope:r.z.literal("global").or(r.z.literal("local"))})}function te(){return r.z.object({id:r.z.string(),reducer:r.z.string().nullish()})}function re(){return r.z.object({id:r.z.string(),schema:r.z.string().nullish()})}function oe(){return r.z.object({id:r.z.string(),template:r.z.string().nullish()})}function ne(){return r.z.object({schema:r.z.string()})}function fe(){return r.z.object({__typename:r.z.literal("State").optional(),examples:r.z.array(R()),initialValue:r.z.string(),schema:r.z.string()})}function ie(){return r.z.object({__typename:r.z.literal("UpdateChangeLogItemInput").optional(),id:r.z.string(),newContent:r.z.string()})}function se(){return r.z.object({example:r.z.string(),id:r.z.string()})}function ae(){return r.z.object({id:r.z.string(),newExample:r.z.string()})}const _e=Object.freeze(Object.defineProperty({__proto__:null,AddChangeLogItemInputSchema:_,AddModuleInputSchema:A,AddOperationErrorInputSchema:z,AddOperationExampleInputSchema:I,AddOperationInputSchema:T,AddStateExampleInputSchema:b,AuthorSchema:me,CodeExampleSchema:R,DeleteChangeLogItemInputSchema:D,DeleteModuleInputSchema:M,DeleteOperationErrorInputSchema:x,DeleteOperationExampleInputSchema:N,DeleteOperationInputSchema:L,DeleteStateExampleInputSchema:P,DocumentModelInputSchema:ht,DocumentModelStateSchema:Ot,DocumentSpecificationSchema:Ee,ModuleSchema:he,MoveOperationInputSchema:j,OperationErrorSchema:ge,OperationSchema:Oe,ReorderChangeLogItemsInputSchema:C,ReorderModuleOperationsInputSchema:k,ReorderModulesInputSchema:y,ReorderOperationErrorsInputSchema:w,ReorderOperationExamplesInputSchema:U,ReorderStateExamplesInputSchema:v,SetAuthorNameInputSchema:F,SetAuthorWebsiteInputSchema:H,SetInitialStateInputSchema:V,SetModelDescriptionInputSchema:X,SetModelExtensionInputSchema:G,SetModelIdInputSchema:B,SetModelNameInputSchema:W,SetModuleDescriptionInputSchema:$,SetModuleNameInputSchema:q,SetOperationDescriptionInputSchema:J,SetOperationErrorCodeInputSchema:K,SetOperationErrorDescriptionInputSchema:Q,SetOperationErrorNameInputSchema:Y,SetOperationErrorTemplateInputSchema:Z,SetOperationNameInputSchema:ee,SetOperationReducerInputSchema:te,SetOperationSchemaInputSchema:re,SetOperationScopeInputSchema:Se,SetOperationTemplateInputSchema:oe,SetStateSchemaInputSchema:ne,StateSchema:fe,UpdateChangeLogItemInputSchema:ie,UpdateOperationExampleInputSchema:se,UpdateStateExampleInputSchema:ae,definedNonNullAnySchema:Et,isDefinedNonNullAny:ue},Symbol.toStringTag,{value:"Module"})),c={setModelNameOperation(t,e){t.name=e.input.name},setModelIdOperation(t,e){t.id=e.input.id},setModelExtensionOperation(t,e){t.extension=e.input.extension},setModelDescriptionOperation(t,e){t.description=e.input.description},setAuthorNameOperation(t,e){t.author=t.author||{name:"",website:null},t.author.name=e.input.authorName},setAuthorWebsiteOperation(t,e){t.author=t.author||{name:"",website:null},t.author.website=e.input.authorWebsite}},E={addChangeLogItemOperation(t,e){throw new Error('Reducer "addChangeLogItemOperation" not yet implemented')},updateChangeLogItemOperation(t,e){throw new Error('Reducer "updateChangeLogItemOperation" not yet implemented')},deleteChangeLogItemOperation(t,e){throw new Error('Reducer "deleteChangeLogItemOperation" not yet implemented')},reorderChangeLogItemsOperation(t,e){throw new Error('Reducer "reorderChangeLogItemsOperation" not yet implemented')},releaseNewVersionOperation(t,e){throw new Error('Reducer "releaseNewVersionOperation" not yet implemented')}},gt=t=>{const e={};return t.forEach((n,o)=>e[n]=o),(n,o)=>(e[o.id]||999999)-(e[n.id]||999999)},h={addModuleOperation(t,e){t.specifications[t.specifications.length-1].modules.push({id:e.input.id,name:e.input.name,description:e.input.description||"",operations:[]})},setModuleNameOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)n.modules[o].id===e.input.id&&(n.modules[o].name=e.input.name||"")},setModuleDescriptionOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)n.modules[o].id===e.input.id&&(n.modules[o].description=e.input.description||"")},deleteModuleOperation(t,e){const n=t.specifications[t.specifications.length-1];n.modules=n.modules.filter(o=>o.id!=e.input.id)},reorderModulesOperation(t,e){t.specifications[t.specifications.length-1].modules.sort(gt(e.input.order))}},St=t=>{const e={};return t.forEach((n,o)=>e[n]=o),(n,o)=>(e[o.id]||999999)-(e[n.id]||999999)},l={addOperationErrorOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.operationId&&n.modules[o].operations[i].errors.push({id:e.input.id,name:e.input.errorName||"",code:e.input.errorCode||"",description:e.input.errorDescription||"",template:e.input.errorTemplate||""})},setOperationErrorCodeOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)for(let a=0;a<n.modules[o].operations[i].errors.length;a++)n.modules[o].operations[i].errors[a].id==e.input.id&&(n.modules[o].operations[i].errors[a].code=e.input.errorCode||"")},setOperationErrorNameOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)for(let a=0;a<n.modules[o].operations[i].errors.length;a++)n.modules[o].operations[i].errors[a].id==e.input.id&&(n.modules[o].operations[i].errors[a].name=e.input.errorName||"")},setOperationErrorDescriptionOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)for(let a=0;a<n.modules[o].operations[i].errors.length;a++)n.modules[o].operations[i].errors[a].id==e.input.id&&(n.modules[o].operations[i].errors[a].description=e.input.errorDescription||"")},setOperationErrorTemplateOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)for(let a=0;a<n.modules[o].operations[i].errors.length;a++)n.modules[o].operations[i].errors[a].id==e.input.id&&(n.modules[o].operations[i].errors[a].template=e.input.errorTemplate||"")},deleteOperationErrorOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].errors=n.modules[o].operations[i].errors.filter(a=>a.id!=e.input.id)},reorderOperationErrorsOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.operationId&&n.modules[o].operations[i].errors.sort(St(e.input.order))}},ft=t=>{const e={};return t.forEach((n,o)=>e[n]=o),(n,o)=>(e[o.id]||999999)-(e[n.id]||999999)},g={addOperationExampleOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.operationId&&n.modules[o].operations[i].examples.push({id:e.input.id,value:e.input.example})},updateOperationExampleOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)for(let a=0;a<n.modules[o].operations[i].examples.length;a++)n.modules[o].operations[i].examples[a].id==e.input.id&&(n.modules[o].operations[i].examples[a].value=e.input.example)},deleteOperationExampleOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].examples=n.modules[o].operations[i].examples.filter(a=>a.id!=e.input.id)},reorderOperationExamplesOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.operationId&&n.modules[o].operations[i].examples.sort(ft(e.input.order))}},_t=t=>{const e={};return t.forEach((n,o)=>e[n]=o),(n,o)=>(e[o.id]||999999)-(e[n.id]||999999)},p={addOperationOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)n.modules[o].id==e.input.moduleId&&n.modules[o].operations.push({id:e.input.id,name:e.input.name,description:e.input.description||"",schema:e.input.schema||"",template:e.input.template||e.input.description||"",reducer:e.input.reducer||"",errors:[],examples:[],scope:e.input.scope||"global"})},setOperationNameOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].name=e.input.name||"")},setOperationScopeOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].scope=e.input.scope||"global")},setOperationSchemaOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].schema=e.input.schema||"")},setOperationDescriptionOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].description=e.input.description||"")},setOperationTemplateOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].template=e.input.template||"")},setOperationReducerOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)for(let i=0;i<n.modules[o].operations.length;i++)n.modules[o].operations[i].id==e.input.id&&(n.modules[o].operations[i].reducer=e.input.reducer||"")},moveOperationOperation(t,e){const n=[],o=t.specifications[t.specifications.length-1];for(let i=0;i<o.modules.length;i++)o.modules[i].operations=o.modules[i].operations.filter(a=>a.id==e.input.operationId?(n.push(a),!1):!0);for(let i=0;i<o.modules.length;i++)o.modules[i].id==e.input.newModuleId&&o.modules[i].operations.push(...n)},deleteOperationOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)n.modules[o].operations=n.modules[o].operations.filter(i=>i.id!=e.input.id)},reorderModuleOperationsOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.modules.length;o++)n.modules[o].id==e.input.moduleId&&n.modules[o].operations.sort(_t(e.input.order))}},At=t=>{const e={};return t.forEach((n,o)=>e[n]=o),(n,o)=>(e[o.id]||999999)-(e[n.id]||999999)},d={setStateSchemaOperation(t,e){const n=t.specifications[t.specifications.length-1];n.state.schema=e.input.schema},setInitialStateOperation(t,e){const n=t.specifications[t.specifications.length-1];n.state.initialValue=e.input.initialValue},addStateExampleOperation(t,e){t.specifications[t.specifications.length-1].state.examples.push({id:e.input.id,value:e.input.example})},updateStateExampleOperation(t,e){const n=t.specifications[t.specifications.length-1];for(let o=0;o<n.state.examples.length;o++)n.state.examples[o].id==e.input.id&&(n.state.examples[o].value=e.input.newExample)},deleteStateExampleOperation(t,e){const n=t.specifications[t.specifications.length-1];n.state.examples=n.state.examples.filter(o=>o.id!=e.input.id)},reorderStateExamplesOperation(t,e){t.specifications[t.specifications.length-1].state.examples.sort(At(e.input.order))}},zt=(t,e)=>{if(s.isBaseAction(e))return t;switch(e.type){case"SET_MODEL_NAME":W().parse(e.input),c.setModelNameOperation(t,e);break;case"SET_MODEL_ID":B().parse(e.input),c.setModelIdOperation(t,e);break;case"SET_MODEL_EXTENSION":G().parse(e.input),c.setModelExtensionOperation(t,e);break;case"SET_MODEL_DESCRIPTION":X().parse(e.input),c.setModelDescriptionOperation(t,e);break;case"SET_AUTHOR_NAME":F().parse(e.input),c.setAuthorNameOperation(t,e);break;case"SET_AUTHOR_WEBSITE":H().parse(e.input),c.setAuthorWebsiteOperation(t,e);break;case"ADD_CHANGE_LOG_ITEM":_().parse(e.input),E.addChangeLogItemOperation(t,e);break;case"UPDATE_CHANGE_LOG_ITEM":ie().parse(e.input),E.updateChangeLogItemOperation(t,e);break;case"DELETE_CHANGE_LOG_ITEM":D().parse(e.input),E.deleteChangeLogItemOperation(t,e);break;case"REORDER_CHANGE_LOG_ITEMS":C().parse(e.input),E.reorderChangeLogItemsOperation(t,e);break;case"RELEASE_NEW_VERSION":if(Object.keys(e.input).length>0)throw new Error("Expected empty input for action RELEASE_NEW_VERSION");E.releaseNewVersionOperation(t,e);break;case"ADD_MODULE":A().parse(e.input),h.addModuleOperation(t,e);break;case"SET_MODULE_NAME":q().parse(e.input),h.setModuleNameOperation(t,e);break;case"SET_MODULE_DESCRIPTION":$().parse(e.input),h.setModuleDescriptionOperation(t,e);break;case"DELETE_MODULE":M().parse(e.input),h.deleteModuleOperation(t,e);break;case"REORDER_MODULES":y().parse(e.input),h.reorderModulesOperation(t,e);break;case"ADD_OPERATION_ERROR":z().parse(e.input),l.addOperationErrorOperation(t,e);break;case"SET_OPERATION_ERROR_CODE":K().parse(e.input),l.setOperationErrorCodeOperation(t,e);break;case"SET_OPERATION_ERROR_NAME":Y().parse(e.input),l.setOperationErrorNameOperation(t,e);break;case"SET_OPERATION_ERROR_DESCRIPTION":Q().parse(e.input),l.setOperationErrorDescriptionOperation(t,e);break;case"SET_OPERATION_ERROR_TEMPLATE":Z().parse(e.input),l.setOperationErrorTemplateOperation(t,e);break;case"DELETE_OPERATION_ERROR":x().parse(e.input),l.deleteOperationErrorOperation(t,e);break;case"REORDER_OPERATION_ERRORS":w().parse(e.input),l.reorderOperationErrorsOperation(t,e);break;case"ADD_OPERATION_EXAMPLE":I().parse(e.input),g.addOperationExampleOperation(t,e);break;case"UPDATE_OPERATION_EXAMPLE":se().parse(e.input),g.updateOperationExampleOperation(t,e);break;case"DELETE_OPERATION_EXAMPLE":N().parse(e.input),g.deleteOperationExampleOperation(t,e);break;case"REORDER_OPERATION_EXAMPLES":U().parse(e.input),g.reorderOperationExamplesOperation(t,e);break;case"ADD_OPERATION":T().parse(e.input),p.addOperationOperation(t,e);break;case"SET_OPERATION_NAME":ee().parse(e.input),p.setOperationNameOperation(t,e);break;case"SET_OPERATION_SCOPE":Se().parse(e.input),p.setOperationScopeOperation(t,e);break;case"SET_OPERATION_SCHEMA":re().parse(e.input),p.setOperationSchemaOperation(t,e);break;case"SET_OPERATION_DESCRIPTION":J().parse(e.input),p.setOperationDescriptionOperation(t,e);break;case"SET_OPERATION_TEMPLATE":oe().parse(e.input),p.setOperationTemplateOperation(t,e);break;case"SET_OPERATION_REDUCER":te().parse(e.input),p.setOperationReducerOperation(t,e);break;case"MOVE_OPERATION":j().parse(e.input),p.moveOperationOperation(t,e);break;case"DELETE_OPERATION":L().parse(e.input),p.deleteOperationOperation(t,e);break;case"REORDER_MODULE_OPERATIONS":k().parse(e.input),p.reorderModuleOperationsOperation(t,e);break;case"SET_STATE_SCHEMA":ne().parse(e.input),d.setStateSchemaOperation(t,e);break;case"SET_INITIAL_STATE":V().parse(e.input),d.setInitialStateOperation(t,e);break;case"ADD_STATE_EXAMPLE":b().parse(e.input),d.addStateExampleOperation(t,e);break;case"UPDATE_STATE_EXAMPLE":ae().parse(e.input),d.updateStateExampleOperation(t,e);break;case"DELETE_STATE_EXAMPLE":P().parse(e.input),d.deleteStateExampleOperation(t,e);break;case"REORDER_STATE_EXAMPLES":v().parse(e.input),d.reorderStateExamplesOperation(t,e);break;default:return t}},m=s.createReducer(zt),It={id:"",name:"",extension:"",description:"",author:{name:"",website:""},specifications:[{version:1,changeLog:[],state:{schema:"",initialValue:"",examples:[]},modules:[]}]},O={fileExtension:"phdm",createState(t){return{...It,...t}},createExtendedState(t){return s.createExtendedState({...t,documentType:"powerhouse/document-model"},O.createState)},createDocument(t){return s.createDocument(O.createExtendedState(t),O.createState)},saveToFile(t,e,n){return s.saveToFile(t,e,"phdm",n)},saveToFileHandle(t,e){return s.saveToFileHandle(t,e)},loadFromFile(t){return s.loadFromFile(t,m)},loadFromInput(t){return s.loadFromInput(t,m)}},Ae=t=>s.createAction("SET_MODEL_NAME",{...t}),ze=t=>s.createAction("SET_MODEL_ID",{...t}),Ie=t=>s.createAction("SET_MODEL_EXTENSION",{...t}),Te=t=>s.createAction("SET_MODEL_DESCRIPTION",{...t}),be=t=>s.createAction("SET_AUTHOR_NAME",{...t}),Re=t=>s.createAction("SET_AUTHOR_WEBSITE",{...t});class Tt extends s.BaseDocument{setModelName(e){return this.dispatch(Ae(e))}setModelId(e){return this.dispatch(ze(e))}setModelExtension(e){return this.dispatch(Ie(e))}setModelDescription(e){return this.dispatch(Te(e))}setAuthorName(e){return this.dispatch(be(e))}setAuthorWebsite(e){return this.dispatch(Re(e))}}const De=t=>s.createAction("ADD_CHANGE_LOG_ITEM",{...t}),Me=t=>s.createAction("UPDATE_CHANGE_LOG_ITEM",{...t}),xe=t=>s.createAction("DELETE_CHANGE_LOG_ITEM",{...t}),Ne=t=>s.createAction("REORDER_CHANGE_LOG_ITEMS",{...t}),Le=()=>s.createAction("RELEASE_NEW_VERSION");class bt extends s.BaseDocument{addChangeLogItem(e){return this.dispatch(De(e))}updateChangeLogItem(e){return this.dispatch(Me(e))}deleteChangeLogItem(e){return this.dispatch(xe(e))}reorderChangeLogItems(e){return this.dispatch(Ne(e))}releaseNewVersion(){return this.dispatch(Le())}}const Pe=t=>s.createAction("ADD_MODULE",{...t}),je=t=>s.createAction("SET_MODULE_NAME",{...t}),Ce=t=>s.createAction("SET_MODULE_DESCRIPTION",{...t}),ke=t=>s.createAction("DELETE_MODULE",{...t}),ye=t=>s.createAction("REORDER_MODULES",{...t});class Rt extends s.BaseDocument{addModule(e){return this.dispatch(Pe(e))}setModuleName(e){return this.dispatch(je(e))}setModuleDescription(e){return this.dispatch(Ce(e))}deleteModule(e){return this.dispatch(ke(e))}reorderModules(e){return this.dispatch(ye(e))}}const we=t=>s.createAction("ADD_OPERATION_ERROR",{...t}),Ue=t=>s.createAction("SET_OPERATION_ERROR_CODE",{...t}),ve=t=>s.createAction("SET_OPERATION_ERROR_NAME",{...t}),Fe=t=>s.createAction("SET_OPERATION_ERROR_DESCRIPTION",{...t}),He=t=>s.createAction("SET_OPERATION_ERROR_TEMPLATE",{...t}),Ve=t=>s.createAction("DELETE_OPERATION_ERROR",{...t}),Xe=t=>s.createAction("REORDER_OPERATION_ERRORS",{...t});class Dt extends s.BaseDocument{addOperationError(e){return this.dispatch(we(e))}setOperationErrorCode(e){return this.dispatch(Ue(e))}setOperationErrorName(e){return this.dispatch(ve(e))}setOperationErrorDescription(e){return this.dispatch(Fe(e))}setOperationErrorTemplate(e){return this.dispatch(He(e))}deleteOperationError(e){return this.dispatch(Ve(e))}reorderOperationErrors(e){return this.dispatch(Xe(e))}}const Ge=t=>s.createAction("ADD_OPERATION_EXAMPLE",{...t}),Be=t=>s.createAction("UPDATE_OPERATION_EXAMPLE",{...t}),We=t=>s.createAction("DELETE_OPERATION_EXAMPLE",{...t}),$e=t=>s.createAction("REORDER_OPERATION_EXAMPLES",{...t});class Mt extends s.BaseDocument{addOperationExample(e){return this.dispatch(Ge(e))}updateOperationExample(e){return this.dispatch(Be(e))}deleteOperationExample(e){return this.dispatch(We(e))}reorderOperationExamples(e){return this.dispatch($e(e))}}const qe=t=>s.createAction("ADD_OPERATION",{...t}),Je=t=>s.createAction("SET_OPERATION_NAME",{...t}),Ke=t=>s.createAction("SET_OPERATION_SCOPE",{...t}),Qe=t=>s.createAction("SET_OPERATION_SCHEMA",{...t}),Ye=t=>s.createAction("SET_OPERATION_DESCRIPTION",{...t}),Ze=t=>s.createAction("SET_OPERATION_TEMPLATE",{...t}),et=t=>s.createAction("SET_OPERATION_REDUCER",{...t}),tt=t=>s.createAction("MOVE_OPERATION",{...t}),rt=t=>s.createAction("DELETE_OPERATION",{...t}),ot=t=>s.createAction("REORDER_MODULE_OPERATIONS",{...t});class xt extends s.BaseDocument{addOperation(e){return this.dispatch(qe(e))}setOperationName(e){return this.dispatch(Je(e))}setOperationScope(e){return this.dispatch(Ke(e))}setOperationSchema(e){return this.dispatch(Qe(e))}setOperationDescription(e){return this.dispatch(Ye(e))}setOperationTemplate(e){return this.dispatch(Ze(e))}setOperationReducer(e){return this.dispatch(et(e))}moveOperation(e){return this.dispatch(tt(e))}deleteOperation(e){return this.dispatch(rt(e))}reorderModuleOperations(e){return this.dispatch(ot(e))}}const nt=t=>s.createAction("SET_STATE_SCHEMA",{...t}),it=t=>s.createAction("SET_INITIAL_STATE",{...t}),st=t=>s.createAction("ADD_STATE_EXAMPLE",{...t}),at=t=>s.createAction("UPDATE_STATE_EXAMPLE",{...t}),pt=t=>s.createAction("DELETE_STATE_EXAMPLE",{...t}),lt=t=>s.createAction("REORDER_STATE_EXAMPLES",{...t});class Nt extends s.BaseDocument{setStateSchema(e){return this.dispatch(nt(e))}setInitialState(e){return this.dispatch(it(e))}addStateExample(e){return this.dispatch(st(e))}updateStateExample(e){return this.dispatch(at(e))}deleteStateExample(e){return this.dispatch(pt(e))}reorderStateExamples(e){return this.dispatch(lt(e))}}var u;let S=(u=class extends s.BaseDocument{constructor(e,n){super(m,O.createDocument(e),n)}saveToFile(e,n){return super.saveToFile(e,u.fileExtension,n)}loadFromFile(e){return super.loadFromFile(e)}static async fromFile(e){const n=new this;return await n.loadFromFile(e),n}},de(u,"fileExtension","phdm"),u);s.applyMixins(S,[Tt,bt,Rt,Dt,Mt,xt,Nt]);const Lt=Object.freeze(Object.defineProperty({__proto__:null,addChangeLogItem:De,addModule:Pe,addOperation:qe,addOperationError:we,addOperationExample:Ge,addStateExample:st,deleteChangeLogItem:xe,deleteModule:ke,deleteOperation:rt,deleteOperationError:Ve,deleteOperationExample:We,deleteStateExample:pt,moveOperation:tt,releaseNewVersion:Le,reorderChangeLogItems:Ne,reorderModuleOperations:ot,reorderModules:ye,reorderOperationErrors:Xe,reorderOperationExamples:$e,reorderStateExamples:lt,setAuthorName:be,setAuthorWebsite:Re,setInitialState:it,setModelDescription:Te,setModelExtension:Ie,setModelId:ze,setModelName:Ae,setModuleDescription:Ce,setModuleName:je,setOperationDescription:Ye,setOperationErrorCode:Ue,setOperationErrorDescription:Fe,setOperationErrorName:ve,setOperationErrorTemplate:He,setOperationName:Je,setOperationReducer:et,setOperationSchema:Qe,setOperationScope:Ke,setOperationTemplate:Ze,setStateSchema:nt,updateChangeLogItem:Me,updateOperationExample:Be,updateStateExample:at},Symbol.toStringTag,{value:"Module"})),pe=S,le={...O,...mt},ce={...s.BaseActions,...Lt},ct={Document:pe,reducer:m,actions:ce,utils:le,documentModel:f},Pt=Object.freeze(Object.defineProperty({__proto__:null,Document:pe,DocumentModel:S,actions:ce,documentModel:f,module:ct,reducer:m,utils:le,z:_e},Symbol.toStringTag,{value:"Module"}));exports.Document=pe;exports.DocumentModel=Pt;exports.DocumentModel$1=S;exports.actions=ce;exports.documentModel=f;exports.module=ct;exports.reducer=m;exports.utils=le;exports.zod=_e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as e, b as a, a as s, c as t, j as o, k as r, m as c, n as l, o as n, i, l as d, e as u, r as m, s as p, d as b, B as _, h as g, g as y, p as F, z as f } from "./object-
|
|
1
|
+
import { f as e, b as a, a as s, c as t, j as o, k as r, m as c, n as l, o as n, i, l as d, e as u, r as m, s as p, d as b, B as _, h as g, g as y, p as F, z as f } from "./object-13eaec2b.js";
|
|
2
2
|
const h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null,
|
|
4
4
|
createAction: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./object-
|
|
1
|
+
"use strict";const e=require("./object-113c73e2.js"),t=Object.freeze(Object.defineProperty({__proto__:null,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,loadFromFile:e.loadFromFile,loadFromInput:e.loadFromInput,readOnly:e.readOnly,saveToFile:e.saveToFile,saveToFileHandle:e.saveToFileHandle},Symbol.toStringTag,{value:"Module"})),o=Object.freeze(Object.defineProperty({__proto__:null,BaseDocument:e.BaseDocument,actions:e.BaseActions,applyMixins:e.applyMixins,baseReducer:e.baseReducer,utils:t,z:e.zod},Symbol.toStringTag,{value:"Module"}));exports.Document=o;exports.index=t;
|