@powerhousedao/builder-tools 4.1.0-dev.109 → 4.1.0-dev.110

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.
Files changed (55) hide show
  1. package/dist/connect-utils/vite-config.d.ts.map +1 -1
  2. package/dist/connect-utils/vite-config.js +6 -1
  3. package/dist/connect-utils/vite-config.js.map +1 -1
  4. package/dist/connect-utils/vite-plugins/ph-external-packages.d.ts.map +1 -1
  5. package/dist/connect-utils/vite-plugins/ph-external-packages.js +39 -12
  6. package/dist/connect-utils/vite-plugins/ph-external-packages.js.map +1 -1
  7. package/dist/document-model-editor/components/code-editors/constants.d.ts +3 -0
  8. package/dist/document-model-editor/components/code-editors/constants.d.ts.map +1 -0
  9. package/dist/document-model-editor/components/code-editors/constants.js +38 -0
  10. package/dist/document-model-editor/components/code-editors/constants.js.map +1 -0
  11. package/dist/document-model-editor/components/code-editors/factories.d.ts +4 -0
  12. package/dist/document-model-editor/components/code-editors/factories.d.ts.map +1 -0
  13. package/dist/document-model-editor/components/code-editors/factories.js +47 -0
  14. package/dist/document-model-editor/components/code-editors/factories.js.map +1 -0
  15. package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts +2 -2
  16. package/dist/document-model-editor/components/code-editors/graphql-editor.d.ts.map +1 -1
  17. package/dist/document-model-editor/components/code-editors/graphql-editor.js +6 -2
  18. package/dist/document-model-editor/components/code-editors/graphql-editor.js.map +1 -1
  19. package/dist/document-model-editor/components/code-editors/hooks.d.ts +23 -0
  20. package/dist/document-model-editor/components/code-editors/hooks.d.ts.map +1 -0
  21. package/dist/document-model-editor/components/code-editors/hooks.js +59 -0
  22. package/dist/document-model-editor/components/code-editors/hooks.js.map +1 -0
  23. package/dist/document-model-editor/components/code-editors/json-editor.d.ts +2 -2
  24. package/dist/document-model-editor/components/code-editors/json-editor.d.ts.map +1 -1
  25. package/dist/document-model-editor/components/code-editors/json-editor.js +7 -4
  26. package/dist/document-model-editor/components/code-editors/json-editor.js.map +1 -1
  27. package/dist/document-model-editor/components/code-editors/linting.d.ts +6 -0
  28. package/dist/document-model-editor/components/code-editors/linting.d.ts.map +1 -0
  29. package/dist/document-model-editor/components/code-editors/linting.js +59 -0
  30. package/dist/document-model-editor/components/code-editors/linting.js.map +1 -0
  31. package/dist/document-model-editor/components/divider.js +1 -1
  32. package/dist/document-model-editor/components/divider.js.map +1 -1
  33. package/dist/document-model-editor/components/model-metadata-form.d.ts +1 -1
  34. package/dist/document-model-editor/components/model-metadata-form.d.ts.map +1 -1
  35. package/dist/document-model-editor/components/model-metadata-form.js +1 -1
  36. package/dist/document-model-editor/components/model-metadata-form.js.map +1 -1
  37. package/dist/document-model-editor/components/modules.d.ts +1 -1
  38. package/dist/document-model-editor/components/modules.d.ts.map +1 -1
  39. package/dist/document-model-editor/components/modules.js +1 -1
  40. package/dist/document-model-editor/components/modules.js.map +1 -1
  41. package/dist/document-model-editor/components/operation.d.ts.map +1 -1
  42. package/dist/document-model-editor/components/operation.js +2 -2
  43. package/dist/document-model-editor/components/operation.js.map +1 -1
  44. package/dist/document-model-editor/components/state-schemas.d.ts +1 -1
  45. package/dist/document-model-editor/components/state-schemas.d.ts.map +1 -1
  46. package/dist/document-model-editor/components/state-schemas.js +5 -5
  47. package/dist/document-model-editor/components/state-schemas.js.map +1 -1
  48. package/dist/document-model-editor/editor.js +4 -4
  49. package/dist/document-model-editor/editor.js.map +1 -1
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +9 -5
  52. package/dist/document-model-editor/components/code-editors/utils.d.ts +0 -33
  53. package/dist/document-model-editor/components/code-editors/utils.d.ts.map +0 -1
  54. package/dist/document-model-editor/components/code-editors/utils.js +0 -193
  55. package/dist/document-model-editor/components/code-editors/utils.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerhousedao/builder-tools",
3
- "version": "4.1.0-dev.109",
3
+ "version": "4.1.0-dev.110",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "publishConfig": {
@@ -22,6 +22,10 @@
22
22
  "import": "./dist/document-model-editor/module.js",
23
23
  "types": "./dist/document-model-editor/module.d.ts"
24
24
  },
25
+ "./editor-component": {
26
+ "import": "./dist/document-model-editor/editor.js",
27
+ "types": "./dist/document-model-editor/editor.d.ts"
28
+ },
25
29
  "./document-model-editor/hooks": {
26
30
  "import": "./dist/document-model-editor/hooks/index.js",
27
31
  "types": "./dist/document-model-editor/hooks/index.d.ts"
@@ -119,10 +123,10 @@
119
123
  "vite-envs": "^4.6.0",
120
124
  "vite-plugin-node-polyfills": "^0.24.0",
121
125
  "zod": "^3.24.3",
122
- "@powerhousedao/config": "4.1.0-dev.109",
123
- "document-model": "4.1.0-dev.109",
124
- "@powerhousedao/design-system": "4.1.0-dev.109",
125
- "@powerhousedao/reactor-browser": "4.1.0-dev.109"
126
+ "@powerhousedao/config": "4.1.0-dev.110",
127
+ "document-model": "4.1.0-dev.110",
128
+ "@powerhousedao/design-system": "4.1.0-dev.110",
129
+ "@powerhousedao/reactor-browser": "4.1.0-dev.110"
126
130
  },
127
131
  "peerDependencies": {
128
132
  "react": "^19.2.0",
@@ -1,33 +0,0 @@
1
- import type { Diagnostic } from "@codemirror/lint";
2
- import { Compartment } from "@codemirror/state";
3
- import { EditorView } from "@codemirror/view";
4
- import type { GraphQLSchema } from "graphql";
5
- import { GraphQLError } from "graphql";
6
- export declare function convertGraphQLErrorToDiagnostic(error: GraphQLError): Diagnostic;
7
- export declare function makeLinter(schema: GraphQLSchema, customLinter?: (doc: string) => Diagnostic[]): import("@codemirror/state").Extension;
8
- export declare function makeUpdateHandler(readonly: boolean | undefined, timeoutRef: React.MutableRefObject<NodeJS.Timeout | null>, updateDocumentInModel?: (newDoc: string) => void): import("@codemirror/state").Extension;
9
- export declare function makeFocusHandler(readonly: boolean | undefined, timeoutRef: React.MutableRefObject<NodeJS.Timeout | null>, updateDocumentInModel?: (newDoc: string) => void): import("@codemirror/state").Extension;
10
- export declare function makePasteHandler(readonly: boolean | undefined, timeoutRef: React.MutableRefObject<NodeJS.Timeout | null>, updateDocumentInModel?: (newDoc: string) => void): import("@codemirror/state").Extension;
11
- export type EditorConfig = {
12
- doc: string;
13
- readonly?: boolean;
14
- updateDocumentInModel?: (newDoc: string) => void;
15
- };
16
- export declare function useEditorRefs(): {
17
- editorRef: import("react").RefObject<HTMLDivElement | null>;
18
- viewRef: import("react").RefObject<EditorView | null>;
19
- updateListenerCompartment: import("react").RefObject<Compartment>;
20
- focusHandlerCompartment: import("react").RefObject<Compartment>;
21
- pasteHandlerCompartment: import("react").RefObject<Compartment>;
22
- timeoutRef: import("react").RefObject<NodeJS.Timeout | null>;
23
- };
24
- export declare function useEditorCleanup(viewRef: React.MutableRefObject<EditorView | null>): void;
25
- export declare function useHandlerReconfiguration(view: EditorView | null, readonly: boolean | undefined, timeoutRef: React.MutableRefObject<NodeJS.Timeout | null>, updateDocumentInModel: ((newDoc: string) => void) | undefined, compartments: {
26
- updateListener: Compartment;
27
- focusHandler: Compartment;
28
- pasteHandler: Compartment;
29
- }): void;
30
- export declare function useDocumentSync(view: EditorView | null, doc: string): void;
31
- export declare const baseEditorExtensions: import("@codemirror/state").Extension[];
32
- export declare const baseKeymap: import("@codemirror/view").KeyBinding[];
33
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-model-editor/components/code-editors/utils.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,WAAW,EAA4B,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAIL,UAAU,EAMX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AASrD,wBAAgB,+BAA+B,CAC7C,KAA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BAAgB,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,EACzD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC7D,YAAY,EAAE;IACZ,cAAc,EAAE,WAAW,CAAC;IAC5B,YAAY,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,WAAW,CAAC;CAC3B,QAmBF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,QAYnE;AAED,eAAO,MAAM,oBAAoB,yCAmBhC,CAAC;AAEF,eAAO,MAAM,UAAU,yCAStB,CAAC"}
@@ -1,193 +0,0 @@
1
- import { autocompletion, closeBrackets, closeBracketsKeymap, completionKeymap, } from "@codemirror/autocomplete";
2
- import { defaultKeymap, history, historyKeymap, indentWithTab, } from "@codemirror/commands";
3
- import { bracketMatching, defaultHighlightStyle, foldGutter, foldKeymap, indentOnInput, syntaxHighlighting, } from "@codemirror/language";
4
- import { forceLinting, linter, lintKeymap } from "@codemirror/lint";
5
- import { highlightSelectionMatches, searchKeymap } from "@codemirror/search";
6
- import { Compartment, EditorState, Transaction } from "@codemirror/state";
7
- import { crosshairCursor, drawSelection, dropCursor, EditorView, highlightActiveLine, highlightActiveLineGutter, highlightSpecialChars, lineNumbers, rectangularSelection, } from "@codemirror/view";
8
- import { filterSchema } from "@graphql-tools/utils";
9
- import { GraphQLError, locatedError } from "graphql";
10
- import { validateSDL } from "graphql/validation/validate.js";
11
- import { useEffect, useRef } from "react";
12
- import { updateTimeout } from "../../constants/documents.js";
13
- import { safeParseSdl } from "../../context/schema-context.js";
14
- /* Converts a GraphQLError to a Diagnostic
15
- GraphQLError uses a zero-indexed line and column, but the editor uses a one-indexed line and column
16
- */
17
- export function convertGraphQLErrorToDiagnostic(error) {
18
- return {
19
- from: error.locations?.[0] ? (error.positions?.[0] ?? 0) : 0,
20
- to: error.locations?.[0] ? (error.positions?.[0] ?? 0) + 1 : 1,
21
- severity: "error",
22
- message: error.message,
23
- };
24
- }
25
- /* Creates a linter that checks the document for errors
26
- This works in combination with the built-in linting provided by the graphql extension
27
- We need to recreate this linter when the schema changes or if a custom linter is provided
28
- It first checks the document for linting errors
29
- Then it checks if the document is a valid document string
30
- Then it checks if the document is valid against the schema
31
- */
32
- export function makeLinter(schema, customLinter) {
33
- return linter((view) => {
34
- const doc = view.state.doc.toString();
35
- let diagnostics = [];
36
- if (customLinter) {
37
- diagnostics = diagnostics.concat(customLinter(doc));
38
- }
39
- const newDocNode = safeParseSdl(doc);
40
- if (newDocNode) {
41
- try {
42
- const currentTypeNames = new Set(newDocNode.definitions
43
- .filter((def) => "name" in def && def.name)
44
- .map((def) => def.name.value));
45
- // we need to filter out the existing types in the document from the schema to prevent duplicate type errors in the validation
46
- const filteredSchema = filterSchema({
47
- schema,
48
- typeFilter: (typeName) => !currentTypeNames.has(typeName),
49
- });
50
- const errors = validateSDL(newDocNode, filteredSchema)
51
- .map((error) => locatedError(error, newDocNode))
52
- .filter((error, index, self) => index ===
53
- self.findIndex((e) => e.message === error.message &&
54
- e.locations?.[0]?.line === error.locations?.[0]?.line &&
55
- e.locations?.[0]?.column === error.locations?.[0]?.column));
56
- diagnostics = diagnostics.concat(errors.map(convertGraphQLErrorToDiagnostic));
57
- }
58
- catch (error) {
59
- if (error instanceof GraphQLError) {
60
- diagnostics.push(convertGraphQLErrorToDiagnostic(error));
61
- }
62
- }
63
- }
64
- return diagnostics;
65
- });
66
- }
67
- export function makeUpdateHandler(readonly, timeoutRef, updateDocumentInModel) {
68
- return EditorView.updateListener.of((update) => {
69
- if (!!readonly || !update.docChanged)
70
- return;
71
- if (update.transactions.some((tr) => tr.annotation(Transaction.userEvent) === "external"))
72
- return;
73
- const newDoc = update.state.doc.toString();
74
- if (timeoutRef.current) {
75
- clearTimeout(timeoutRef.current);
76
- }
77
- timeoutRef.current = setTimeout(() => {
78
- updateDocumentInModel?.(newDoc);
79
- }, updateTimeout);
80
- });
81
- }
82
- export function makeFocusHandler(readonly, timeoutRef, updateDocumentInModel) {
83
- return EditorView.focusChangeEffect.of((state, focusing) => {
84
- if (!!readonly || focusing)
85
- return null;
86
- if (timeoutRef.current) {
87
- clearTimeout(timeoutRef.current);
88
- }
89
- const newDoc = state.doc.toString();
90
- updateDocumentInModel?.(newDoc);
91
- return null;
92
- });
93
- }
94
- export function makePasteHandler(readonly, timeoutRef, updateDocumentInModel) {
95
- return EditorView.domEventHandlers({
96
- paste: (event, view) => {
97
- if (readonly)
98
- return false;
99
- const newDoc = view.state.doc.toString();
100
- if (timeoutRef.current) {
101
- clearTimeout(timeoutRef.current);
102
- }
103
- updateDocumentInModel?.(newDoc);
104
- forceLinting(view);
105
- return false;
106
- },
107
- });
108
- }
109
- export function useEditorRefs() {
110
- const editorRef = useRef(null);
111
- const viewRef = useRef(null);
112
- const updateListenerCompartment = useRef(new Compartment());
113
- const focusHandlerCompartment = useRef(new Compartment());
114
- const pasteHandlerCompartment = useRef(new Compartment());
115
- const timeoutRef = useRef(null);
116
- return {
117
- editorRef,
118
- viewRef,
119
- updateListenerCompartment,
120
- focusHandlerCompartment,
121
- pasteHandlerCompartment,
122
- timeoutRef,
123
- };
124
- }
125
- export function useEditorCleanup(viewRef) {
126
- useEffect(() => {
127
- return () => {
128
- if (viewRef.current) {
129
- viewRef.current.destroy();
130
- viewRef.current = null;
131
- }
132
- };
133
- }, []);
134
- }
135
- export function useHandlerReconfiguration(view, readonly, timeoutRef, updateDocumentInModel, compartments) {
136
- useEffect(() => {
137
- if (!view)
138
- return;
139
- view.dispatch({
140
- effects: [
141
- compartments.updateListener.reconfigure(makeUpdateHandler(readonly, timeoutRef, updateDocumentInModel)),
142
- compartments.focusHandler.reconfigure(makeFocusHandler(readonly, timeoutRef, updateDocumentInModel)),
143
- compartments.pasteHandler.reconfigure(makePasteHandler(readonly, timeoutRef, updateDocumentInModel)),
144
- ],
145
- });
146
- forceLinting(view);
147
- }, [readonly, updateDocumentInModel]);
148
- }
149
- export function useDocumentSync(view, doc) {
150
- useEffect(() => {
151
- if (!view)
152
- return;
153
- const currentDoc = view.state.doc.toString();
154
- if (currentDoc !== doc) {
155
- view.dispatch({
156
- changes: { from: 0, to: currentDoc.length, insert: doc },
157
- annotations: [Transaction.userEvent.of("external")],
158
- });
159
- forceLinting(view);
160
- }
161
- }, [doc]);
162
- }
163
- export const baseEditorExtensions = [
164
- lineNumbers(),
165
- highlightActiveLineGutter(),
166
- highlightSpecialChars(),
167
- history(),
168
- foldGutter(),
169
- drawSelection(),
170
- dropCursor(),
171
- EditorState.allowMultipleSelections.of(true),
172
- indentOnInput(),
173
- syntaxHighlighting(defaultHighlightStyle, { fallback: true }),
174
- bracketMatching(),
175
- closeBrackets(),
176
- autocompletion(),
177
- rectangularSelection(),
178
- crosshairCursor(),
179
- highlightActiveLine(),
180
- highlightSelectionMatches(),
181
- EditorView.lineWrapping,
182
- ];
183
- export const baseKeymap = [
184
- ...closeBracketsKeymap,
185
- ...defaultKeymap,
186
- ...searchKeymap,
187
- ...historyKeymap,
188
- ...foldKeymap,
189
- ...completionKeymap,
190
- ...lintKeymap,
191
- indentWithTab,
192
- ];
193
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../document-model-editor/components/code-editors/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,OAAO,EACP,aAAa,EACb,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,yBAAy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