@powerhousedao/vetra 5.0.0-staging.17 → 5.0.0-staging.19
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/editors/app-editor/components/AppEditorForm.d.ts +0 -1
- package/dist/editors/app-editor/components/AppEditorForm.d.ts.map +1 -1
- package/dist/editors/app-editor/components/AppEditorForm.js +2 -2
- package/dist/editors/app-editor/components/AppEditorForm.js.map +1 -1
- package/dist/editors/app-editor/editor.d.ts +1 -3
- package/dist/editors/app-editor/editor.d.ts.map +1 -1
- package/dist/editors/app-editor/editor.js +8 -10
- package/dist/editors/app-editor/editor.js.map +1 -1
- package/dist/editors/app-editor/index.js +1 -1
- package/dist/editors/app-editor/index.js.map +1 -1
- package/dist/editors/document-editor/components/DocumentEditorForm.d.ts +0 -1
- package/dist/editors/document-editor/components/DocumentEditorForm.d.ts.map +1 -1
- package/dist/editors/document-editor/components/DocumentEditorForm.js +2 -2
- package/dist/editors/document-editor/components/DocumentEditorForm.js.map +1 -1
- package/dist/editors/document-editor/editor.d.ts +1 -3
- package/dist/editors/document-editor/editor.d.ts.map +1 -1
- package/dist/editors/document-editor/editor.js +7 -9
- package/dist/editors/document-editor/editor.js.map +1 -1
- package/dist/editors/document-editor/index.js +1 -1
- package/dist/editors/document-editor/index.js.map +1 -1
- package/dist/editors/hooks/useAvailableDocumentTypes.d.ts +1 -1
- package/dist/editors/hooks/useAvailableDocumentTypes.d.ts.map +1 -1
- package/dist/editors/hooks/useAvailableDocumentTypes.js +5 -4
- package/dist/editors/hooks/useAvailableDocumentTypes.js.map +1 -1
- package/dist/editors/hooks/useVetraDocument.d.ts +16 -0
- package/dist/editors/hooks/useVetraDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useVetraDocument.js +37 -0
- package/dist/editors/hooks/useVetraDocument.js.map +1 -0
- package/dist/editors/processor-editor/components/ProcessorEditorForm.d.ts +0 -1
- package/dist/editors/processor-editor/components/ProcessorEditorForm.d.ts.map +1 -1
- package/dist/editors/processor-editor/components/ProcessorEditorForm.js +2 -2
- package/dist/editors/processor-editor/components/ProcessorEditorForm.js.map +1 -1
- package/dist/editors/processor-editor/editor.d.ts +1 -3
- package/dist/editors/processor-editor/editor.d.ts.map +1 -1
- package/dist/editors/processor-editor/editor.js +8 -10
- package/dist/editors/processor-editor/editor.js.map +1 -1
- package/dist/editors/processor-editor/index.js +1 -1
- package/dist/editors/processor-editor/index.js.map +1 -1
- package/dist/editors/subgraph-editor/editor.d.ts +1 -3
- package/dist/editors/subgraph-editor/editor.d.ts.map +1 -1
- package/dist/editors/subgraph-editor/editor.js +6 -8
- package/dist/editors/subgraph-editor/editor.js.map +1 -1
- package/dist/editors/subgraph-editor/index.js +1 -1
- package/dist/editors/subgraph-editor/index.js.map +1 -1
- package/dist/editors/vetra-drive-app/DriveExplorer.d.ts +2 -2
- package/dist/editors/vetra-drive-app/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/vetra-drive-app/DriveExplorer.js +1 -1
- package/dist/editors/vetra-drive-app/DriveExplorer.js.map +1 -1
- package/dist/editors/vetra-drive-app/components/EditorContainer.d.ts +1 -2
- package/dist/editors/vetra-drive-app/components/EditorContainer.d.ts.map +1 -1
- package/dist/editors/vetra-drive-app/components/EditorContainer.js +3 -3
- package/dist/editors/vetra-drive-app/components/EditorContainer.js.map +1 -1
- package/dist/editors/vetra-drive-app/components/PackageInformationSection.d.ts +1 -2
- package/dist/editors/vetra-drive-app/components/PackageInformationSection.d.ts.map +1 -1
- package/dist/editors/vetra-drive-app/components/PackageInformationSection.js +2 -2
- package/dist/editors/vetra-drive-app/components/PackageInformationSection.js.map +1 -1
- package/dist/editors/vetra-drive-app/editor.d.ts +2 -2
- package/dist/editors/vetra-drive-app/editor.d.ts.map +1 -1
- package/dist/editors/vetra-drive-app/editor.js +8 -7
- package/dist/editors/vetra-drive-app/editor.js.map +1 -1
- package/dist/editors/vetra-drive-app/index.js +1 -1
- package/dist/editors/vetra-drive-app/index.js.map +1 -1
- package/dist/editors/vetra-drive-app/utils/withDropZone.d.ts.map +1 -1
- package/dist/editors/vetra-drive-app/utils/withDropZone.js +3 -2
- package/dist/editors/vetra-drive-app/utils/withDropZone.js.map +1 -1
- package/dist/editors/vetra-package/editor.d.ts +1 -3
- package/dist/editors/vetra-package/editor.d.ts.map +1 -1
- package/dist/editors/vetra-package/editor.js +25 -27
- package/dist/editors/vetra-package/editor.js.map +1 -1
- package/dist/editors/vetra-package/index.js +1 -1
- package/dist/editors/vetra-package/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/style.css +111 -17
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/subgraph-editor/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/subgraph-editor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAiB;IAClC,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,CAAC,qBAAqB,CAAC;IACtC,MAAM,EAAE;QACN,EAAE,EAAE,wBAAwB;QAC5B,uBAAuB,EAAE,IAAI;QAC7B,sBAAsB,EAAE,IAAI;QAC5B,mBAAmB,EAAE,IAAI;KAC1B;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IDriveContext } from "@powerhousedao/reactor-browser";
|
|
2
1
|
import type { FileNode } from "document-drive";
|
|
2
|
+
import type { EditorContext } from "document-model";
|
|
3
3
|
import type React from "react";
|
|
4
4
|
interface DriveExplorerProps {
|
|
5
|
-
context
|
|
5
|
+
context?: EditorContext;
|
|
6
6
|
documentModels?: FileNode[];
|
|
7
7
|
editors?: FileNode[];
|
|
8
8
|
apps?: FileNode[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../editors/vetra-drive-app/DriveExplorer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../editors/vetra-drive-app/DriveExplorer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0DtD,CAAC"}
|
|
@@ -7,6 +7,6 @@ import { DOCUMENT_TYPES } from "./document-types.js";
|
|
|
7
7
|
export const DriveExplorer = ({ documentModels = [], editors = [], apps = [], subgraphs = [], processors = [], codegenProcessors = [], onShareDrive, onAddDocumentModel, onAddEditor, onAddApp, onAddSubgraph, onAddProcessor, onAddCodegenProcessor, context, packageDocumentId, onAddPackageDocument, driveId, onOpenDocument, }) => {
|
|
8
8
|
const vetraPackageModule = useDocumentModelModuleById(DOCUMENT_TYPES.documentPackage);
|
|
9
9
|
const vetraPackageEditorModule = useFallbackEditorModule(DOCUMENT_TYPES.documentPackage);
|
|
10
|
-
return (_jsxs("div", { className: "min-h-screen bg-white", children: [_jsx(DriveHeader, { onShareClick: onShareDrive }), _jsxs("div", { className: "mx-6 mt-6 bg-white", children: [_jsx(PackageInformationSection, { className: "mb-6",
|
|
10
|
+
return (_jsxs("div", { className: "min-h-screen bg-white", children: [_jsx(DriveHeader, { onShareClick: onShareDrive }), _jsxs("div", { className: "mx-6 mt-6 bg-white", children: [_jsx(PackageInformationSection, { className: "mb-6", packageDocumentId: packageDocumentId, onAddPackageDocument: onAddPackageDocument, documentModelModule: vetraPackageModule, editorModule: vetraPackageEditorModule, driveId: driveId }), _jsx(ModuleSpecificationsSection, { documentModels: documentModels, editors: editors, apps: apps, subgraphs: subgraphs, processors: processors, codegenProcessors: codegenProcessors, onAddDocumentModel: onAddDocumentModel, onAddEditor: onAddEditor, onAddApp: onAddApp, onAddSubgraph: onAddSubgraph, onAddProcessor: onAddProcessor, onAddCodegenProcessor: onAddCodegenProcessor, onOpenDocument: onOpenDocument })] })] }));
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=DriveExplorer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DriveExplorer.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/DriveExplorer.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DriveExplorer.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/DriveExplorer.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuBrD,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,cAAc,GAAG,EAAE,EACnB,OAAO,GAAG,EAAE,EACZ,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,EAAE,EACd,UAAU,GAAG,EAAE,EACf,iBAAiB,GAAG,EAAE,EACtB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,OAAO,EACP,iBAAiB,EACjB,oBAAoB,EACpB,OAAO,EACP,cAAc,GACf,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,0BAA0B,CACnD,cAAc,CAAC,eAAe,CAC/B,CAAC;IACF,MAAM,wBAAwB,GAAG,uBAAuB,CACtD,cAAc,CAAC,eAAe,CAC/B,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,WAAW,IAAC,YAAY,EAAE,YAAY,GAAI,EAE3C,eAAK,SAAS,EAAC,oBAAoB,aACjC,KAAC,yBAAyB,IACxB,SAAS,EAAC,MAAM,EAChB,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,mBAAmB,EAAE,kBAAkB,EACvC,YAAY,EAAE,wBAAwB,EACtC,OAAO,EAAE,OAAO,GAChB,EACF,KAAC,2BAA2B,IAC1B,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,qBAAqB,EAAE,qBAAqB,EAC5C,cAAc,EAAE,cAAc,GAC9B,IACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VetraDocumentModelModule, VetraEditorModule } from "@powerhousedao/reactor-browser";
|
|
2
2
|
export interface EditorContainerProps {
|
|
3
3
|
driveId: string;
|
|
4
4
|
documentId: string;
|
|
5
5
|
documentType: string;
|
|
6
|
-
context: IDriveContext;
|
|
7
6
|
documentModelModule: VetraDocumentModelModule;
|
|
8
7
|
editorModule: VetraEditorModule;
|
|
9
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorContainer.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/EditorContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"EditorContainer.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/EditorContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AAIxC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,wBAAwB,CAAC;IAC9C,YAAY,EAAE,iBAAiB,CAAC;CACjC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmB1D,CAAC"}
|
|
@@ -3,12 +3,12 @@ import { DefaultEditorLoader } from "@powerhousedao/design-system";
|
|
|
3
3
|
import { useDocumentById } from "@powerhousedao/reactor-browser";
|
|
4
4
|
import { Suspense } from "react";
|
|
5
5
|
export const EditorContainer = (props) => {
|
|
6
|
-
const {
|
|
7
|
-
const [document] = useDocumentById(documentId);
|
|
6
|
+
const { editorModule, documentId } = props;
|
|
7
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
8
8
|
const loadingContent = (_jsx("div", { className: "flex h-full flex-1 items-center justify-center", children: _jsx(DefaultEditorLoader, {}) }));
|
|
9
9
|
if (!document)
|
|
10
10
|
return loadingContent;
|
|
11
11
|
const EditorComponent = editorModule.Component;
|
|
12
|
-
return (_jsx(Suspense, { fallback: loadingContent, children: _jsx(EditorComponent, {
|
|
12
|
+
return (_jsx(Suspense, { fallback: loadingContent, children: _jsx(EditorComponent, { documentId: documentId }) }));
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=EditorContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorContainer.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/EditorContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"EditorContainer.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/EditorContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjC,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,KAAK,EAAE,EAAE;IACvE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3C,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAEzD,MAAM,cAAc,GAAG,CACrB,cAAK,SAAS,EAAC,gDAAgD,YAC7D,KAAC,mBAAmB,KAAG,GACnB,CACP,CAAC;IAEF,IAAI,CAAC,QAAQ;QAAE,OAAO,cAAc,CAAC;IAErC,MAAM,eAAe,GAAG,YAAY,CAAC,SAAS,CAAC;IAE/C,OAAO,CACL,KAAC,QAAQ,IAAC,QAAQ,EAAE,cAAc,YAChC,KAAC,eAAe,IAAC,UAAU,EAAE,UAAU,GAAI,GAClC,CACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { VetraDocumentModelModule, VetraEditorModule } from "@powerhousedao/reactor-browser";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
interface PackageInformationSectionProps {
|
|
4
4
|
className?: string;
|
|
5
|
-
context: IDriveContext;
|
|
6
5
|
packageDocumentId?: string;
|
|
7
6
|
onAddPackageDocument?: () => void;
|
|
8
7
|
documentModelModule?: VetraDocumentModelModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageInformationSection.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/PackageInformationSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"PackageInformationSection.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/PackageInformationSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,8BAA8B;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CAuC/B,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { DOCUMENT_TYPES } from "../document-types.js";
|
|
3
3
|
import { EditorContainer } from "./EditorContainer.js";
|
|
4
4
|
import { SectionAccordion } from "./SectionAccordion.js";
|
|
5
|
-
export const PackageInformationSection = ({ className,
|
|
5
|
+
export const PackageInformationSection = ({ className, packageDocumentId, onAddPackageDocument, documentModelModule, editorModule, driveId, }) => {
|
|
6
6
|
const createpackageContent = (_jsx("button", { className: "my-2 h-[200px] w-full rounded-md border border-dashed border-zinc-200 bg-zinc-50", onClick: onAddPackageDocument, children: "Click to create package manifest" }));
|
|
7
|
-
return (_jsx(SectionAccordion, { title: "Package Information", defaultOpen: true, className: className, children: _jsx("div", { className: "", children: packageDocumentId && documentModelModule && editorModule ? (_jsx(EditorContainer, {
|
|
7
|
+
return (_jsx(SectionAccordion, { title: "Package Information", defaultOpen: true, className: className, children: _jsx("div", { className: "", children: packageDocumentId && documentModelModule && editorModule ? (_jsx(EditorContainer, { documentId: packageDocumentId, driveId: driveId, documentModelModule: documentModelModule, editorModule: editorModule, documentType: DOCUMENT_TYPES.documentPackage })) : (createpackageContent) }) }));
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=PackageInformationSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageInformationSection.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/PackageInformationSection.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PackageInformationSection.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/components/PackageInformationSection.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAWzD,MAAM,CAAC,MAAM,yBAAyB,GAElC,CAAC,EACH,SAAS,EACT,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,oBAAoB,GAAG,CAC3B,iBACE,SAAS,EAAC,kFAAkF,EAC5F,OAAO,EAAE,oBAAoB,iDAGtB,CACV,CAAC;IAEF,OAAO,CACL,KAAC,gBAAgB,IACf,KAAK,EAAC,qBAAqB,EAC3B,WAAW,EAAE,IAAI,EACjB,SAAS,EAAE,SAAS,YAEpB,cAAK,SAAS,EAAC,EAAE,YACd,iBAAiB,IAAI,mBAAmB,IAAI,YAAY,CAAC,CAAC,CAAC,CAC1D,KAAC,eAAe,IACd,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,cAAc,CAAC,eAAe,GAC5C,CACH,CAAC,CAAC,CAAC,CACF,oBAAoB,CACrB,GACG,GACW,CACpB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DriveEditorProps } from "@powerhousedao/reactor-browser";
|
|
2
2
|
export type IProps = DriveEditorProps;
|
|
3
|
-
export declare function BaseEditor(props: IProps): import("react/jsx-runtime").JSX.Element
|
|
4
|
-
export
|
|
3
|
+
export declare function BaseEditor(props: IProps): string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode>;
|
|
4
|
+
export declare function Editor(props: IProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/vetra-drive-app/editor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/vetra-drive-app/editor.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAiBvE,MAAM,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEtC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,0GAmFvC;AAID,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,2CAWnC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { WagmiContext } from "@powerhousedao/design-system";
|
|
3
|
-
import { addDocument, DriveContextProvider, setSelectedNode, useAnalyticsDatabaseName, useDocumentModelModules, useDriveContext, } from "@powerhousedao/reactor-browser";
|
|
3
|
+
import { addDocument, DriveContextProvider, setSelectedNode, useAnalyticsDatabaseName, useDocumentModelModules, useDriveContext, useSelectedDriveDocument, } from "@powerhousedao/reactor-browser";
|
|
4
4
|
import { AnalyticsProvider } from "@powerhousedao/reactor-browser/analytics/context";
|
|
5
5
|
import { useCallback } from "react";
|
|
6
6
|
import { DriveExplorer } from "./DriveExplorer.js";
|
|
7
7
|
import { DOCUMENT_TYPES } from "./document-types.js";
|
|
8
8
|
import { withDropZone } from "./utils/withDropZone.js";
|
|
9
9
|
export function BaseEditor(props) {
|
|
10
|
-
const {
|
|
11
|
-
const
|
|
10
|
+
const { children, context } = props;
|
|
11
|
+
const [document] = useSelectedDriveDocument();
|
|
12
12
|
const { showCreateDocumentModal } = useDriveContext();
|
|
13
|
-
const driveId =
|
|
13
|
+
const driveId = document.header.id;
|
|
14
14
|
const documentModels = useDocumentModelModules();
|
|
15
|
-
const fileNodes =
|
|
15
|
+
const fileNodes = document.state.global.nodes.filter((node) => node.kind === "file");
|
|
16
16
|
const packageDocumentId = fileNodes.find((node) => node.documentType === DOCUMENT_TYPES.documentPackage)?.id;
|
|
17
17
|
const docModelsNodes = fileNodes.filter((node) => node.documentType === DOCUMENT_TYPES.documentModel);
|
|
18
18
|
const docEditorsNodes = fileNodes.filter((node) => node.documentType === DOCUMENT_TYPES.documentEditor);
|
|
@@ -28,10 +28,11 @@ export function BaseEditor(props) {
|
|
|
28
28
|
const onCreatePackageFile = useCallback(() => {
|
|
29
29
|
addDocument(driveId, "vetra-package", DOCUMENT_TYPES.documentPackage).catch(console.error);
|
|
30
30
|
}, [driveId]);
|
|
31
|
-
|
|
31
|
+
const showDocumentEditor = !!children;
|
|
32
|
+
return showDocumentEditor ? (children) : (_jsx("div", { style: { height: "100%" }, className: "bg-white after:pointer-events-none after:absolute after:inset-0 after:bg-blue-500 after:opacity-0 after:transition after:content-['']", children: _jsx(DriveExplorer, { documentModels: docModelsNodes, editors: docEditorsNodes, apps: docAppsNodes, subgraphs: docSubgraphsNodes, processors: docProcessorsNodes, codegenProcessors: [], onAddDocumentModel: () => onCreateDocument(DOCUMENT_TYPES.documentModel), onAddEditor: () => onCreateDocument(DOCUMENT_TYPES.documentEditor), onAddApp: () => onCreateDocument(DOCUMENT_TYPES.documentApp), onAddSubgraph: () => onCreateDocument(DOCUMENT_TYPES.documentSubgraph), onAddProcessor: () => onCreateDocument(DOCUMENT_TYPES.documentProcessor), onAddCodegenProcessor: () => console.log("add codegen processor"), packageDocumentId: packageDocumentId, onAddPackageDocument: onCreatePackageFile, driveId: document.header.id, onOpenDocument: (node) => setSelectedNode(node) }) }));
|
|
32
33
|
}
|
|
33
34
|
const BaseEditorWithDropZone = withDropZone(BaseEditor);
|
|
34
|
-
export
|
|
35
|
+
export function Editor(props) {
|
|
35
36
|
const analyticsDatabaseName = useAnalyticsDatabaseName();
|
|
36
37
|
return (_jsx(DriveContextProvider, { value: props.context, children: _jsx(WagmiContext, { children: _jsx(AnalyticsProvider, { databaseName: analyticsDatabaseName, children: _jsx(BaseEditorWithDropZone, { ...props }) }) }) }));
|
|
37
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEpC,MAAM,CAAC,QAAQ,CAAC,GAAG,wBAAwB,EAAE,CAAC;IAE9C,MAAM,EAAE,uBAAuB,EAAE,GAAG,eAAe,EAAE,CAAC;IACtD,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;IACnC,MAAM,cAAc,GAAG,uBAAuB,EAAE,CAAC;IACjD,MAA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AM,CAAC,EAAE,EAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,GAC/C,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,sBAAsB,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;AAExD,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,qBAAqB,GAAG,wBAAwB,EAAE,CAAC;IACzD,OAAO,CACL,KAAC,oBAAoB,IAAC,KAAK,EAAE,KAAK,CAAC,OAAQ,YACzC,KAAC,YAAY,cACX,KAAC,iBAAiB,IAAC,YAAY,EAAE,qBAAqB,YACpD,KAAC,sBAAsB,OAAK,KAAK,GAAI,GACnB,GACP,GACM,CACxB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/vetra-drive-app/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAsB;IACvC,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,CAAC,2BAA2B,CAAC;IAC5C,MAAM,EAAE;QACN,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,iBAAiB;QACvB,uBAAuB,EAAE,IAAI;QAC7B,sBAAsB,EAAE,IAAI;QAC5B,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE;YACb,2BAA2B;YAC3B,gBAAgB;YAChB,4BAA4B;YAC5B,sBAAsB;YACtB,qBAAqB;YACrB,oBAAoB;SACrB;QACD,WAAW,EAAE;YACX,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDropZone.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/utils/withDropZone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"withDropZone.d.ts","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/utils/withDropZone.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,gBAAgB,EAEjB,MAAM,gCAAgC,CAAC;AAMxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,wBAAgB,YAAY,CAAC,CAAC,SAAS,gBAAgB,EACrD,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,GACjC,aAAa,CAAC,CAAC,CAAC,CAoClB"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { DropZone } from "@powerhousedao/design-system";
|
|
3
|
-
import { setSelectedNode, useOnDropFile } from "@powerhousedao/reactor-browser";
|
|
3
|
+
import { setSelectedNode, useOnDropFile, useSelectedDriveId, } from "@powerhousedao/reactor-browser";
|
|
4
4
|
export function withDropZone(WrappedComponent) {
|
|
5
5
|
const WithDropZoneComponent = (props) => {
|
|
6
|
+
const driveId = useSelectedDriveId();
|
|
6
7
|
const onDropFile = useOnDropFile(props.editorConfig?.documentTypes);
|
|
7
8
|
const onAddFile = async (file, parent, onProgress, resolveConflict) => {
|
|
8
9
|
return await onDropFile(file, onProgress, resolveConflict);
|
|
9
10
|
};
|
|
10
11
|
if (props.editorConfig?.dragAndDrop?.enabled) {
|
|
11
|
-
return (_jsx(DropZone, { onAddFile: onAddFile, setSelectedNode: setSelectedNode, driveId:
|
|
12
|
+
return (_jsx(DropZone, { onAddFile: onAddFile, setSelectedNode: setSelectedNode, driveId: driveId, useLocalStorage: true, style: { height: "100%" }, children: _jsx(WrappedComponent, { ...props }) }));
|
|
12
13
|
}
|
|
13
14
|
return _jsx(WrappedComponent, { ...props });
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDropZone.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/utils/withDropZone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMxD,OAAO,
|
|
1
|
+
{"version":3,"file":"withDropZone.js","sourceRoot":"","sources":["../../../../editors/vetra-drive-app/utils/withDropZone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMxD,OAAO,EACL,eAAe,EACf,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAGxC,MAAM,UAAU,YAAY,CAC1B,gBAAkC;IAElC,MAAM,qBAAqB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACzC,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;QACrC,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QAEpE,MAAM,SAAS,GAAG,KAAK,EACrB,IAAU,EACV,MAAW,EACX,UAAuC,EACvC,eAAoC,EACpC,EAAE;YACF,OAAO,MAAM,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF,IAAI,KAAK,CAAC,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;YAC7C,OAAO,CACL,KAAC,QAAQ,IACP,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,IAAI,EACrB,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAEzB,KAAC,gBAAgB,OAAK,KAAK,GAAI,GACtB,CACZ,CAAC;QACJ,CAAC;QAED,OAAO,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC;IACzC,CAAC,CAAC;IAEF,qBAAqB,CAAC,WAAW,GAAG,gBAClC,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,IAAI,IAAI,WAC3D,GAAG,CAAC;IAEJ,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type IProps = EditorProps;
|
|
3
|
-
export default function Editor(props: IProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function Editor(): import("react/jsx-runtime").JSX.Element;
|
|
4
2
|
//# sourceMappingURL=editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/vetra-package/editor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/vetra-package/editor.tsx"],"names":[],"mappings":"AAKA,wBAAgB,MAAM,4CAwGrB"}
|
|
@@ -1,67 +1,65 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDocumentById } from "@powerhousedao/reactor-browser";
|
|
3
2
|
import { useCallback } from "react";
|
|
4
3
|
import { actions } from "../../document-models/vetra-package/index.js";
|
|
4
|
+
import { useSelectedVetraPackageDocument } from "../hooks/useVetraDocument.js";
|
|
5
5
|
import { MetaForm } from "./components/MetaForm.js";
|
|
6
|
-
export
|
|
7
|
-
const
|
|
8
|
-
const [document, dispatch] = useDocumentById(initialDocument.header.id);
|
|
9
|
-
const unsafeCastOfDocument = document;
|
|
6
|
+
export function Editor() {
|
|
7
|
+
const [document, dispatch] = useSelectedVetraPackageDocument();
|
|
10
8
|
const onNameChange = useCallback((name) => {
|
|
11
|
-
if (!
|
|
9
|
+
if (!document.state.global.name && !name)
|
|
12
10
|
return;
|
|
13
|
-
if (name ===
|
|
11
|
+
if (name === document.state.global.name)
|
|
14
12
|
return;
|
|
15
13
|
dispatch(actions.setPackageName({ name }));
|
|
16
|
-
}, [
|
|
14
|
+
}, [document.state.global.name]);
|
|
17
15
|
const onDescriptionChange = useCallback((description) => {
|
|
18
|
-
if (!
|
|
16
|
+
if (!document.state.global.description && !description)
|
|
19
17
|
return;
|
|
20
|
-
if (description ===
|
|
18
|
+
if (description === document.state.global.description)
|
|
21
19
|
return;
|
|
22
20
|
dispatch(actions.setPackageDescription({ description }));
|
|
23
|
-
}, [
|
|
21
|
+
}, [document.state.global.description]);
|
|
24
22
|
const onCategoryChange = useCallback((category) => {
|
|
25
|
-
if (!
|
|
23
|
+
if (!document.state.global.category && !category)
|
|
26
24
|
return;
|
|
27
|
-
if (category ===
|
|
25
|
+
if (category === document.state.global.category)
|
|
28
26
|
return;
|
|
29
27
|
dispatch(actions.setPackageCategory({ category }));
|
|
30
|
-
}, [
|
|
28
|
+
}, [document.state.global.category]);
|
|
31
29
|
const onPublisherChange = useCallback((name) => {
|
|
32
|
-
if (!
|
|
30
|
+
if (!document.state.global.author.name && !name)
|
|
33
31
|
return;
|
|
34
|
-
if (name ===
|
|
32
|
+
if (name === document.state.global.author.name)
|
|
35
33
|
return;
|
|
36
34
|
dispatch(actions.setPackageAuthorName({ name }));
|
|
37
|
-
}, [
|
|
35
|
+
}, [document.state.global.author.name]);
|
|
38
36
|
const onPublisherUrlChange = useCallback((website) => {
|
|
39
|
-
if (!
|
|
37
|
+
if (!document.state.global.author.website && !website)
|
|
40
38
|
return;
|
|
41
|
-
if (website ===
|
|
39
|
+
if (website === document.state.global.author.website)
|
|
42
40
|
return;
|
|
43
41
|
dispatch(actions.setPackageAuthorWebsite({ website }));
|
|
44
|
-
}, [
|
|
42
|
+
}, [document.state.global.author.website]);
|
|
45
43
|
const onGithubRepositoryChange = useCallback((url) => {
|
|
46
|
-
if (!
|
|
44
|
+
if (!document.state.global.githubUrl && !url)
|
|
47
45
|
return;
|
|
48
|
-
if (url ===
|
|
46
|
+
if (url === document.state.global.githubUrl)
|
|
49
47
|
return;
|
|
50
48
|
dispatch(actions.setPackageGithubUrl({ url }));
|
|
51
|
-
}, [
|
|
49
|
+
}, [document.state.global.githubUrl]);
|
|
52
50
|
const onNpmPackageChange = useCallback((url) => {
|
|
53
|
-
if (!
|
|
51
|
+
if (!document.state.global.npmUrl && !url)
|
|
54
52
|
return;
|
|
55
|
-
if (url ===
|
|
53
|
+
if (url === document.state.global.npmUrl)
|
|
56
54
|
return;
|
|
57
55
|
dispatch(actions.setPackageNpmUrl({ url }));
|
|
58
|
-
}, [
|
|
56
|
+
}, [document.state.global.npmUrl]);
|
|
59
57
|
const onAddKeyword = useCallback((keyword) => {
|
|
60
58
|
dispatch(actions.addPackageKeyword(keyword));
|
|
61
59
|
}, []);
|
|
62
60
|
const onRemoveKeyword = useCallback((id) => {
|
|
63
61
|
dispatch(actions.removePackageKeyword({ id }));
|
|
64
62
|
}, []);
|
|
65
|
-
return (_jsx("div", { children: _jsx(MetaForm, { name:
|
|
63
|
+
return (_jsx("div", { children: _jsx(MetaForm, { name: document.state.global.name ?? "", description: document.state.global.description ?? "", category: document.state.global.category ?? "", publisher: document.state.global.author.name ?? "", publisherUrl: document.state.global.author.website ?? "", githubRepository: document.state.global.githubUrl ?? "", npmPackage: document.state.global.npmUrl ?? "", keywords: document.state.global.keywords, onNameChange: onNameChange, onDescriptionChange: onDescriptionChange, onCategoryChange: onCategoryChange, onPublisherChange: onPublisherChange, onPublisherUrlChange: onPublisherUrlChange, onGithubRepositoryChange: onGithubRepositoryChange, onNpmPackageChange: onNpmPackageChange, onAddKeyword: onAddKeyword, onRemoveKeyword: onRemoveKeyword }) }));
|
|
66
64
|
}
|
|
67
65
|
//# sourceMappingURL=editor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/vetra-package/editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../../editors/vetra-package/editor.tsx"],"names":[],"mappings":";AAAA,OAAO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AAI,EAAE,EACpD,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,EAC9C,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,EAClD,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,EACxD,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,EACvD,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,EAC9C,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EACxC,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,wBAAwB,EAAE,wBAAwB,EAClD,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/vetra-package/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../editors/vetra-package/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAiB;IAClC,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,CAAC,oBAAoB,CAAC;IACrC,MAAM,EAAE;QACN,EAAE,EAAE,sBAAsB;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,sBAAsB,EAAE,IAAI;QAC5B,mBAAmB,EAAE,IAAI;KAC1B;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import type { DocumentModelModule, EditorModule, Manifest } from "document-model
|
|
|
3
3
|
export declare const manifest: Manifest;
|
|
4
4
|
export declare const documentModels: DocumentModelModule<any>[];
|
|
5
5
|
export declare const editors: (EditorModule | DriveEditorModule)[];
|
|
6
|
+
export * from "./editors/hooks/useVetraDocument.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,QAAQ,EAAE,QAAuB,CAAC;AAC/C,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAEpD,CAAC;AACF,eAAO,MAAM,OAAO,EAAE,CAAC,YAAY,GAAG,iBAAiB,CAAC,EACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,QAAQ,EAAE,QAAuB,CAAC;AAC/C,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAEpD,CAAC;AACF,eAAO,MAAM,OAAO,EAAE,CAAC,YAAY,GAAG,iBAAiB,CAAC,EACzB,CAAC;AAEhC,cAAc,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,5 @@ import manifestJson from "./powerhouse.manifest.json" with { type: "json" };
|
|
|
4
4
|
export const manifest = manifestJson;
|
|
5
5
|
export const documentModels = Object.values(documentModelsExports);
|
|
6
6
|
export const editors = Object.values(editorsExports);
|
|
7
|
+
export * from "./editors/hooks/useVetraDocument.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AACrD,OAAO,YAAY,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E,MAAM,CAAC,MAAM,QAAQ,GAAa,YAAY,CAAC;AAC/C,MAAM,CAAC,MAAM,cAAc,GAA+B,MAAM,CAAC,MAAM,CACrE,qBAAqB,CACtB,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAClB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AACrD,OAAO,YAAY,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E,MAAM,CAAC,MAAM,QAAQ,GAAa,YAAY,CAAC;AAC/C,MAAM,CAAC,MAAM,cAAc,GAA+B,MAAM,CAAC,MAAM,CACrE,qBAAqB,CACtB,CAAC;AACF,MAAM,CAAC,MAAM,OAAO,GAClB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAEhC,cAAc,qCAAqC,CAAC"}
|