@powerhousedao/powerhouse-vetra-packages 6.0.0-dev.100
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/LICENSE +661 -0
- package/dist/document-models/document-models.d.ts +3 -0
- package/dist/document-models/document-models.d.ts.map +1 -0
- package/dist/document-models/document-models.js +2 -0
- package/dist/document-models/document-models.js.map +1 -0
- package/dist/editors/document-model-editor/components/button.d.ts +2 -0
- package/dist/editors/document-model-editor/components/button.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/button.js +8 -0
- package/dist/editors/document-model-editor/components/button.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/constants.d.ts +3 -0
- package/dist/editors/document-model-editor/components/code-editors/constants.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/constants.js +38 -0
- package/dist/editors/document-model-editor/components/code-editors/constants.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/factories.d.ts +4 -0
- package/dist/editors/document-model-editor/components/code-editors/factories.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/factories.js +47 -0
- package/dist/editors/document-model-editor/components/code-editors/factories.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/graphql-editor.d.ts +10 -0
- package/dist/editors/document-model-editor/components/code-editors/graphql-editor.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/graphql-editor.js +73 -0
- package/dist/editors/document-model-editor/components/code-editors/graphql-editor.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/hooks.d.ts +23 -0
- package/dist/editors/document-model-editor/components/code-editors/hooks.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/hooks.js +59 -0
- package/dist/editors/document-model-editor/components/code-editors/hooks.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/json-editor.d.ts +8 -0
- package/dist/editors/document-model-editor/components/code-editors/json-editor.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/json-editor.js +47 -0
- package/dist/editors/document-model-editor/components/code-editors/json-editor.js.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/linting.d.ts +6 -0
- package/dist/editors/document-model-editor/components/code-editors/linting.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/code-editors/linting.js +59 -0
- package/dist/editors/document-model-editor/components/code-editors/linting.js.map +1 -0
- package/dist/editors/document-model-editor/components/divider.d.ts +8 -0
- package/dist/editors/document-model-editor/components/divider.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/divider.js +22 -0
- package/dist/editors/document-model-editor/components/divider.js.map +1 -0
- package/dist/editors/document-model-editor/components/errors.d.ts +6 -0
- package/dist/editors/document-model-editor/components/errors.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/errors.js +5 -0
- package/dist/editors/document-model-editor/components/errors.js.map +1 -0
- package/dist/editors/document-model-editor/components/form.d.ts +12 -0
- package/dist/editors/document-model-editor/components/form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/form.js +43 -0
- package/dist/editors/document-model-editor/components/form.js.map +1 -0
- package/dist/editors/document-model-editor/components/input.d.ts +6 -0
- package/dist/editors/document-model-editor/components/input.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/input.js +9 -0
- package/dist/editors/document-model-editor/components/input.js.map +1 -0
- package/dist/editors/document-model-editor/components/label.d.ts +6 -0
- package/dist/editors/document-model-editor/components/label.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/label.js +10 -0
- package/dist/editors/document-model-editor/components/label.js.map +1 -0
- package/dist/editors/document-model-editor/components/model-metadata-form.d.ts +31 -0
- package/dist/editors/document-model-editor/components/model-metadata-form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/model-metadata-form.js +70 -0
- package/dist/editors/document-model-editor/components/model-metadata-form.js.map +1 -0
- package/dist/editors/document-model-editor/components/module-form.d.ts +10 -0
- package/dist/editors/document-model-editor/components/module-form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/module-form.js +22 -0
- package/dist/editors/document-model-editor/components/module-form.js.map +1 -0
- package/dist/editors/document-model-editor/components/module.d.ts +22 -0
- package/dist/editors/document-model-editor/components/module.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/module.js +10 -0
- package/dist/editors/document-model-editor/components/module.js.map +1 -0
- package/dist/editors/document-model-editor/components/modules.d.ts +20 -0
- package/dist/editors/document-model-editor/components/modules.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/modules.js +17 -0
- package/dist/editors/document-model-editor/components/modules.js.map +1 -0
- package/dist/editors/document-model-editor/components/operation-description-form.d.ts +9 -0
- package/dist/editors/document-model-editor/components/operation-description-form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operation-description-form.js +13 -0
- package/dist/editors/document-model-editor/components/operation-description-form.js.map +1 -0
- package/dist/editors/document-model-editor/components/operation-error-form.d.ts +13 -0
- package/dist/editors/document-model-editor/components/operation-error-form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operation-error-form.js +40 -0
- package/dist/editors/document-model-editor/components/operation-error-form.js.map +1 -0
- package/dist/editors/document-model-editor/components/operation-errors.d.ts +10 -0
- package/dist/editors/document-model-editor/components/operation-errors.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operation-errors.js +17 -0
- package/dist/editors/document-model-editor/components/operation-errors.js.map +1 -0
- package/dist/editors/document-model-editor/components/operation-form.d.ts +13 -0
- package/dist/editors/document-model-editor/components/operation-form.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operation-form.js +37 -0
- package/dist/editors/document-model-editor/components/operation-form.js.map +1 -0
- package/dist/editors/document-model-editor/components/operation.d.ts +23 -0
- package/dist/editors/document-model-editor/components/operation.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operation.js +25 -0
- package/dist/editors/document-model-editor/components/operation.js.map +1 -0
- package/dist/editors/document-model-editor/components/operations.d.ts +18 -0
- package/dist/editors/document-model-editor/components/operations.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/operations.js +20 -0
- package/dist/editors/document-model-editor/components/operations.js.map +1 -0
- package/dist/editors/document-model-editor/components/state-error.d.ts +5 -0
- package/dist/editors/document-model-editor/components/state-error.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/state-error.js +21 -0
- package/dist/editors/document-model-editor/components/state-error.js.map +1 -0
- package/dist/editors/document-model-editor/components/state-schemas.d.ts +15 -0
- package/dist/editors/document-model-editor/components/state-schemas.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/state-schemas.js +81 -0
- package/dist/editors/document-model-editor/components/state-schemas.js.map +1 -0
- package/dist/editors/document-model-editor/components/tabs.d.ts +8 -0
- package/dist/editors/document-model-editor/components/tabs.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/tabs.js +13 -0
- package/dist/editors/document-model-editor/components/tabs.js.map +1 -0
- package/dist/editors/document-model-editor/components/text-area.d.ts +9 -0
- package/dist/editors/document-model-editor/components/text-area.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/text-area.js +27 -0
- package/dist/editors/document-model-editor/components/text-area.js.map +1 -0
- package/dist/editors/document-model-editor/components/text-field.d.ts +21 -0
- package/dist/editors/document-model-editor/components/text-field.d.ts.map +1 -0
- package/dist/editors/document-model-editor/components/text-field.js +80 -0
- package/dist/editors/document-model-editor/components/text-field.js.map +1 -0
- package/dist/editors/document-model-editor/config.d.ts +3 -0
- package/dist/editors/document-model-editor/config.d.ts.map +1 -0
- package/dist/editors/document-model-editor/config.js +4 -0
- package/dist/editors/document-model-editor/config.js.map +1 -0
- package/dist/editors/document-model-editor/constants/documents.d.ts +13 -0
- package/dist/editors/document-model-editor/constants/documents.d.ts.map +1 -0
- package/dist/editors/document-model-editor/constants/documents.js +18 -0
- package/dist/editors/document-model-editor/constants/documents.js.map +1 -0
- package/dist/editors/document-model-editor/constants/graphql-kinds.d.ts +9 -0
- package/dist/editors/document-model-editor/constants/graphql-kinds.d.ts.map +1 -0
- package/dist/editors/document-model-editor/constants/graphql-kinds.js +13 -0
- package/dist/editors/document-model-editor/constants/graphql-kinds.js.map +1 -0
- package/dist/editors/document-model-editor/context/form-context.d.ts +11 -0
- package/dist/editors/document-model-editor/context/form-context.d.ts.map +1 -0
- package/dist/editors/document-model-editor/context/form-context.js +4 -0
- package/dist/editors/document-model-editor/context/form-context.js.map +1 -0
- package/dist/editors/document-model-editor/context/schema-context.d.ts +18 -0
- package/dist/editors/document-model-editor/context/schema-context.d.ts.map +1 -0
- package/dist/editors/document-model-editor/context/schema-context.js +129 -0
- package/dist/editors/document-model-editor/context/schema-context.js.map +1 -0
- package/dist/editors/document-model-editor/editor.d.ts +2 -0
- package/dist/editors/document-model-editor/editor.d.ts.map +1 -0
- package/dist/editors/document-model-editor/editor.js +217 -0
- package/dist/editors/document-model-editor/editor.js.map +1 -0
- package/dist/editors/document-model-editor/hooks/index.d.ts +3 -0
- package/dist/editors/document-model-editor/hooks/index.d.ts.map +1 -0
- package/dist/editors/document-model-editor/hooks/index.js +3 -0
- package/dist/editors/document-model-editor/hooks/index.js.map +1 -0
- package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.d.ts +5 -0
- package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.d.ts.map +1 -0
- package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.js +8 -0
- package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.js.map +1 -0
- package/dist/editors/document-model-editor/hooks/useFormField.d.ts +13 -0
- package/dist/editors/document-model-editor/hooks/useFormField.d.ts.map +1 -0
- package/dist/editors/document-model-editor/hooks/useFormField.js +22 -0
- package/dist/editors/document-model-editor/hooks/useFormField.js.map +1 -0
- package/dist/editors/document-model-editor/index.d.ts +2 -0
- package/dist/editors/document-model-editor/index.d.ts.map +1 -0
- package/dist/editors/document-model-editor/index.js +2 -0
- package/dist/editors/document-model-editor/index.js.map +1 -0
- package/dist/editors/document-model-editor/module.d.ts +3 -0
- package/dist/editors/document-model-editor/module.d.ts.map +1 -0
- package/dist/editors/document-model-editor/module.js +10 -0
- package/dist/editors/document-model-editor/module.js.map +1 -0
- package/dist/editors/document-model-editor/schemas/inputs.d.ts +31 -0
- package/dist/editors/document-model-editor/schemas/inputs.d.ts.map +1 -0
- package/dist/editors/document-model-editor/schemas/inputs.js +71 -0
- package/dist/editors/document-model-editor/schemas/inputs.js.map +1 -0
- package/dist/editors/document-model-editor/schemas/utils.d.ts +3 -0
- package/dist/editors/document-model-editor/schemas/utils.d.ts.map +1 -0
- package/dist/editors/document-model-editor/schemas/utils.js +3 -0
- package/dist/editors/document-model-editor/schemas/utils.js.map +1 -0
- package/dist/editors/document-model-editor/types/documents.d.ts +26 -0
- package/dist/editors/document-model-editor/types/documents.d.ts.map +1 -0
- package/dist/editors/document-model-editor/types/documents.js +2 -0
- package/dist/editors/document-model-editor/types/documents.js.map +1 -0
- package/dist/editors/document-model-editor/types.d.ts +2 -0
- package/dist/editors/document-model-editor/types.d.ts.map +1 -0
- package/dist/editors/document-model-editor/types.js +2 -0
- package/dist/editors/document-model-editor/types.js.map +1 -0
- package/dist/editors/document-model-editor/utils/helpers.d.ts +112 -0
- package/dist/editors/document-model-editor/utils/helpers.d.ts.map +1 -0
- package/dist/editors/document-model-editor/utils/helpers.js +920 -0
- package/dist/editors/document-model-editor/utils/helpers.js.map +1 -0
- package/dist/editors/document-model-editor/utils/helpers.test.d.ts +2 -0
- package/dist/editors/document-model-editor/utils/helpers.test.d.ts.map +1 -0
- package/dist/editors/document-model-editor/utils/helpers.test.js +805 -0
- package/dist/editors/document-model-editor/utils/helpers.test.js.map +1 -0
- package/dist/editors/document-model-editor/utils/linting.d.ts +7 -0
- package/dist/editors/document-model-editor/utils/linting.d.ts.map +1 -0
- package/dist/editors/document-model-editor/utils/linting.js +49 -0
- package/dist/editors/document-model-editor/utils/linting.js.map +1 -0
- package/dist/editors/document-model-editor/utils/style.d.ts +3 -0
- package/dist/editors/document-model-editor/utils/style.d.ts.map +1 -0
- package/dist/editors/document-model-editor/utils/style.js +6 -0
- package/dist/editors/document-model-editor/utils/style.js.map +1 -0
- package/dist/editors/editors.d.ts +3 -0
- package/dist/editors/editors.d.ts.map +1 -0
- package/dist/editors/editors.js +7 -0
- package/dist/editors/editors.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/create-document.d.ts +2 -0
- package/dist/editors/generic-drive-explorer/components/create-document.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/create-document.js +19 -0
- package/dist/editors/generic-drive-explorer/components/create-document.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/file-content-view.d.ts +2 -0
- package/dist/editors/generic-drive-explorer/components/file-content-view.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/file-content-view.js +77 -0
- package/dist/editors/generic-drive-explorer/components/file-content-view.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/folder-view.d.ts +5 -0
- package/dist/editors/generic-drive-explorer/components/folder-view.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/folder-view.js +19 -0
- package/dist/editors/generic-drive-explorer/components/folder-view.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/index.d.ts +6 -0
- package/dist/editors/generic-drive-explorer/components/index.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/index.js +6 -0
- package/dist/editors/generic-drive-explorer/components/index.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/layout.d.ts +12 -0
- package/dist/editors/generic-drive-explorer/components/layout.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/layout.js +21 -0
- package/dist/editors/generic-drive-explorer/components/layout.js.map +1 -0
- package/dist/editors/generic-drive-explorer/components/search-bar.d.ts +2 -0
- package/dist/editors/generic-drive-explorer/components/search-bar.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/components/search-bar.js +38 -0
- package/dist/editors/generic-drive-explorer/components/search-bar.js.map +1 -0
- package/dist/editors/generic-drive-explorer/config.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/config.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/config.js +5 -0
- package/dist/editors/generic-drive-explorer/config.js.map +1 -0
- package/dist/editors/generic-drive-explorer/editor.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/editor.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/editor.js +16 -0
- package/dist/editors/generic-drive-explorer/editor.js.map +1 -0
- package/dist/editors/generic-drive-explorer/index.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/index.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/index.js +3 -0
- package/dist/editors/generic-drive-explorer/index.js.map +1 -0
- package/dist/editors/generic-drive-explorer/module.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/module.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/module.js +10 -0
- package/dist/editors/generic-drive-explorer/module.js.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/cn.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/utils/cn.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/cn.js +6 -0
- package/dist/editors/generic-drive-explorer/utils/cn.js.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/index.d.ts +3 -0
- package/dist/editors/generic-drive-explorer/utils/index.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/index.js +3 -0
- package/dist/editors/generic-drive-explorer/utils/index.js.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/types.d.ts +8 -0
- package/dist/editors/generic-drive-explorer/utils/types.d.ts.map +1 -0
- package/dist/editors/generic-drive-explorer/utils/types.js +2 -0
- package/dist/editors/generic-drive-explorer/utils/types.js.map +1 -0
- package/dist/editors/index.d.ts +3 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +3 -0
- package/dist/editors/index.js.map +1 -0
- package/dist/editors/style.css +909 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,2BAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../editors/document-model-editor/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Scope = string;
|
|
2
|
+
export type DocumentActionHandlers = {
|
|
3
|
+
addModule: (name: string) => Promise<string | undefined>;
|
|
4
|
+
addOperation: (moduleId: string, name: string) => Promise<string | undefined>;
|
|
5
|
+
addOperationAndInitialSchema: (moduleId: string, name: string) => Promise<string | undefined>;
|
|
6
|
+
addOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
|
|
7
|
+
setModelId: (id: string) => void;
|
|
8
|
+
setModelExtension: (extension: string) => void;
|
|
9
|
+
setModelName: (name: string) => void;
|
|
10
|
+
setAuthorName: (authorName: string) => void;
|
|
11
|
+
setAuthorWebsite: (authorWebsite: string) => void;
|
|
12
|
+
setStateSchema: (schema: string, scope: Scope) => void;
|
|
13
|
+
setInitialState: (initialValue: string, scope: Scope) => void;
|
|
14
|
+
setModelDescription: (description: string) => void;
|
|
15
|
+
updateModuleName: (id: string, name: string) => void;
|
|
16
|
+
updateModuleDescription: (id: string, description: string) => void;
|
|
17
|
+
deleteModule: (id: string) => void;
|
|
18
|
+
updateOperationName: (id: string, name: string) => void;
|
|
19
|
+
updateOperationSchema: (id: string, schema: string) => void;
|
|
20
|
+
setOperationDescription: (id: string, description: string) => void;
|
|
21
|
+
updateOperationScope: (id: string, scope: Scope) => void;
|
|
22
|
+
deleteOperation: (id: string) => void;
|
|
23
|
+
deleteOperationError: (id: string) => void;
|
|
24
|
+
setOperationErrorName: (operationId: string, errorId: string, errorName: string) => void;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=documents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/types/documents.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,MAAM,MAAM,sBAAsB,GAAG;IAEnC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9E,4BAA4B,EAAE,CAC5B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjC,iBAAiB,EAAE,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAGjC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACvD,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9D,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,qBAAqB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,EAAE,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,KACd,IAAI,CAAC;CACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../editors/document-model-editor/types/documents.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../editors/document-model-editor/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../editors/document-model-editor/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Serializable } from "@powerhousedao/document-engineering/graphql";
|
|
2
|
+
import type { ASTNode, DocumentNode, FieldDefinitionNode, GraphQLObjectType, GraphQLSchema, NamedTypeNode, ObjectTypeDefinitionNode, TypeNode } from "graphql";
|
|
3
|
+
import { GraphQLInputObjectType } from "graphql";
|
|
4
|
+
import type { Scope } from "../types/documents.js";
|
|
5
|
+
export declare function makeStateSchemaNameForScope(modelName: string, scope: string): string;
|
|
6
|
+
export declare function makeInitialSchemaDoc(modelName: string, scope: string): string;
|
|
7
|
+
export declare function makeOperationInitialDoc(name: string): string;
|
|
8
|
+
export declare function makeEmptyOperationSchema(operationName: string): string;
|
|
9
|
+
export declare function isEmptyOperationSchema(schema: string | null | undefined): boolean;
|
|
10
|
+
export declare function safeParseJsonRecord(json: string): Record<string, Serializable> | null;
|
|
11
|
+
export declare function makeMinimalObjectForStateType(args: {
|
|
12
|
+
sharedSchemaDocumentNode: DocumentNode;
|
|
13
|
+
stateTypeDefinitionNode: ObjectTypeDefinitionNode;
|
|
14
|
+
existingValue: string;
|
|
15
|
+
}): string;
|
|
16
|
+
export declare function makeMinimalValuesForObjectFields(args: {
|
|
17
|
+
schemaDocumentNode: DocumentNode;
|
|
18
|
+
existingValueObject: Record<string, Serializable> | null;
|
|
19
|
+
fieldDefinitionNodes: readonly FieldDefinitionNode[];
|
|
20
|
+
visitedTypes?: Set<string>;
|
|
21
|
+
}): Record<string, Serializable>;
|
|
22
|
+
export declare function isGqlPrimitiveNode(astNodeTypeNode: ASTNode | null): astNodeTypeNode is NamedTypeNode;
|
|
23
|
+
export declare function compareStringsWithoutWhitespace(str1: string | null | undefined, str2: string | null | undefined): boolean;
|
|
24
|
+
export declare function renameSchemaType(sdl: string, oldName: string, newName: string, scope: Scope): string;
|
|
25
|
+
export declare function initializeModelSchema(modelName: string): string;
|
|
26
|
+
export declare function updateModelSchemaNames(params: {
|
|
27
|
+
oldName: string;
|
|
28
|
+
newName: string;
|
|
29
|
+
globalStateSchema: string;
|
|
30
|
+
localStateSchema: string;
|
|
31
|
+
setStateSchema: (schema: string, scope: Scope) => void;
|
|
32
|
+
}): void;
|
|
33
|
+
export declare function handleModelNameChange(params: {
|
|
34
|
+
oldName: string;
|
|
35
|
+
newName: string;
|
|
36
|
+
globalStateSchema: string;
|
|
37
|
+
localStateSchema: string;
|
|
38
|
+
setStateSchema: (schema: string, scope: Scope) => void;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* Converts an output object type into an equivalent input object type.
|
|
42
|
+
* Intended for structural validation of state objects.
|
|
43
|
+
*/
|
|
44
|
+
export declare function objectTypeToInputType(schema: GraphQLSchema, objectType: GraphQLObjectType, options?: {
|
|
45
|
+
nameSuffix?: string;
|
|
46
|
+
cache?: Map<string, GraphQLInputObjectType>;
|
|
47
|
+
}): GraphQLInputObjectType;
|
|
48
|
+
export declare function validateStateObject(sharedSchemaDocumentNode: DocumentNode, stateTypeDefinitionNode: ObjectTypeDefinitionNode, stateValue: string): Error[];
|
|
49
|
+
export type StateValidationErrorKind = "MISSING" | "MISSING_OPTIONAL" | "UNKNOWN_FIELD" | "NON_NULL" | "TYPE" | "RECURSIVE_TYPE";
|
|
50
|
+
export type StateValidationErrorPayload = {
|
|
51
|
+
kind: "MISSING";
|
|
52
|
+
path: (string | number)[];
|
|
53
|
+
field: string;
|
|
54
|
+
expectedType?: string;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "MISSING_OPTIONAL";
|
|
57
|
+
path: (string | number)[];
|
|
58
|
+
field: string;
|
|
59
|
+
expectedType?: string;
|
|
60
|
+
} | {
|
|
61
|
+
kind: "UNKNOWN_FIELD";
|
|
62
|
+
path: (string | number)[];
|
|
63
|
+
field: string;
|
|
64
|
+
didYouMean?: string;
|
|
65
|
+
typeName?: string;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "NON_NULL";
|
|
68
|
+
path: (string | number)[];
|
|
69
|
+
field: string;
|
|
70
|
+
expectedType?: string;
|
|
71
|
+
} | {
|
|
72
|
+
kind: "TYPE";
|
|
73
|
+
path: (string | number)[];
|
|
74
|
+
field: string;
|
|
75
|
+
expectedType?: string;
|
|
76
|
+
details?: string;
|
|
77
|
+
} | {
|
|
78
|
+
kind: "RECURSIVE_TYPE";
|
|
79
|
+
path: (string | number)[];
|
|
80
|
+
field: string;
|
|
81
|
+
typeName: string;
|
|
82
|
+
};
|
|
83
|
+
export declare class StateValidationError extends Error {
|
|
84
|
+
readonly payload: StateValidationErrorPayload;
|
|
85
|
+
readonly originalMessage?: string;
|
|
86
|
+
constructor(payload: StateValidationErrorPayload, originalMessage?: string);
|
|
87
|
+
get kind(): StateValidationErrorKind;
|
|
88
|
+
get path(): (string | number)[];
|
|
89
|
+
get field(): string;
|
|
90
|
+
}
|
|
91
|
+
export declare function graphQLErrorsToStateValidationErrors(errors: readonly Error[]): StateValidationError[];
|
|
92
|
+
/**
|
|
93
|
+
* Information about a missing field in the state object.
|
|
94
|
+
*/
|
|
95
|
+
export type MissingFieldInfo = {
|
|
96
|
+
fieldName: string;
|
|
97
|
+
path: (string | number)[];
|
|
98
|
+
isRequired: boolean;
|
|
99
|
+
/** The underlying type (unwrapped from NonNull if applicable) */
|
|
100
|
+
type: TypeNode;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Finds all fields defined in the schema that are missing from the state object.
|
|
104
|
+
* Returns information about each missing field including whether it's required.
|
|
105
|
+
*/
|
|
106
|
+
export declare function findMissingFields(sharedSchemaDocumentNode: DocumentNode, rootTypeNode: ObjectTypeDefinitionNode, value: string | Record<string, unknown>, basePath?: (string | number)[]): MissingFieldInfo[];
|
|
107
|
+
/**
|
|
108
|
+
* Detects optional fields defined in the schema that are missing from the state object.
|
|
109
|
+
* Returns StateValidationError[] for each missing optional field.
|
|
110
|
+
*/
|
|
111
|
+
export declare function detectMissingOptionalFields(sharedSchemaDocumentNode: DocumentNode, rootTypeNode: ObjectTypeDefinitionNode, value: string | Record<string, unknown>): StateValidationError[];
|
|
112
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAGhF,OAAO,KAAK,EACV,OAAO,EAEP,YAAY,EAEZ,mBAAmB,EAEnB,iBAAiB,EAEjB,aAAa,EAGb,aAAa,EAEb,wBAAwB,EAExB,QAAQ,EAET,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,sBAAsB,EAYvB,MAAM,SAAS,CAAC;AAajB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAQ3E;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAOpE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,UAMnD;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAOT;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,uCAM/C;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,wBAAwB,EAAE,YAAY,CAAC;IACvC,uBAAuB,EAAE,wBAAwB,CAAC;IAClD,aAAa,EAAE,MAAM,CAAC;CACvB,UAoBA;AAED,wBAAgB,gCAAgC,CAAC,I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