@graphiql/plugin-query-builder 0.0.0 → 1.0.0-beta.1
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/README.md +34 -0
- package/dist/components/arg-input/arg-input-by-type.d.ts +21 -0
- package/dist/components/arg-input/arg-input-by-type.js +459 -0
- package/dist/components/arg-input/arg-input-by-type.js.map +1 -0
- package/dist/components/arg-input/enum-arg-control.d.ts +9 -0
- package/dist/components/arg-input/enum-arg-control.js +56 -0
- package/dist/components/arg-input/enum-arg-control.js.map +1 -0
- package/dist/components/arg-input/index.d.ts +29 -0
- package/dist/components/arg-input/index.js +38 -0
- package/dist/components/arg-input/index.js.map +1 -0
- package/dist/components/arg-input/scalar-arg-control.d.ts +16 -0
- package/dist/components/arg-input/scalar-arg-control.js +66 -0
- package/dist/components/arg-input/scalar-arg-control.js.map +1 -0
- package/dist/components/field-row.d.ts +34 -0
- package/dist/components/field-row.js +199 -0
- package/dist/components/field-row.js.map +1 -0
- package/dist/components/field-tree-context.d.ts +32 -0
- package/dist/components/field-tree-context.js +33 -0
- package/dist/components/field-tree-context.js.map +1 -0
- package/dist/components/field-tree-node.d.ts +9 -0
- package/dist/components/field-tree-node.js +118 -0
- package/dist/components/field-tree-node.js.map +1 -0
- package/dist/components/field-tree.d.ts +30 -0
- package/dist/components/field-tree.js +204 -0
- package/dist/components/field-tree.js.map +1 -0
- package/dist/components/fragment-editor.d.ts +28 -0
- package/dist/components/fragment-editor.js +154 -0
- package/dist/components/fragment-editor.js.map +1 -0
- package/dist/components/fragment-section.d.ts +23 -0
- package/dist/components/fragment-section.js +207 -0
- package/dist/components/fragment-section.js.map +1 -0
- package/dist/components/query-builder.d.ts +2 -0
- package/dist/components/query-builder.js +193 -0
- package/dist/components/query-builder.js.map +1 -0
- package/dist/components/type-condition-selector.d.ts +18 -0
- package/dist/components/type-condition-selector.js +472 -0
- package/dist/components/type-condition-selector.js.map +1 -0
- package/dist/components/use-cursor-path.d.ts +16 -0
- package/dist/components/use-cursor-path.js +79 -0
- package/dist/components/use-cursor-path.js.map +1 -0
- package/dist/components/use-cursor-reveal.d.ts +15 -0
- package/dist/components/use-cursor-reveal.js +92 -0
- package/dist/components/use-cursor-reveal.js.map +1 -0
- package/dist/components/use-working-document.d.ts +31 -0
- package/dist/components/use-working-document.js +548 -0
- package/dist/components/use-working-document.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/arg-value.d.ts +42 -0
- package/dist/lib/arg-value.js +147 -0
- package/dist/lib/arg-value.js.map +1 -0
- package/dist/lib/arguments.d.ts +28 -0
- package/dist/lib/arguments.js +62 -0
- package/dist/lib/arguments.js.map +1 -0
- package/dist/lib/ast-path.d.ts +109 -0
- package/dist/lib/ast-path.js +330 -0
- package/dist/lib/ast-path.js.map +1 -0
- package/dist/lib/document-mutator.d.ts +8 -0
- package/dist/lib/field-list-view.d.ts +30 -0
- package/dist/lib/field-list-view.js +47 -0
- package/dist/lib/field-list-view.js.map +1 -0
- package/dist/lib/field-selection.d.ts +26 -0
- package/dist/lib/field-selection.js +76 -0
- package/dist/lib/field-selection.js.map +1 -0
- package/dist/lib/fragments.d.ts +63 -0
- package/dist/lib/fragments.js +165 -0
- package/dist/lib/fragments.js.map +1 -0
- package/dist/lib/inline-fragments.d.ts +26 -0
- package/dist/lib/inline-fragments.js +71 -0
- package/dist/lib/inline-fragments.js.map +1 -0
- package/dist/lib/schema-walk.d.ts +47 -0
- package/dist/lib/schema-walk.js +177 -0
- package/dist/lib/schema-walk.js.map +1 -0
- package/dist/lib/variables.d.ts +33 -0
- package/dist/lib/variables.js +100 -0
- package/dist/lib/variables.js.map +1 -0
- package/dist/stories/query-builder.stories.d.ts +43 -0
- package/dist/style.css +957 -0
- package/package.json +67 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { useRef, useState, useEffect } from "react";
|
|
3
|
+
import { segmentsEqual } from "../lib/ast-path.js";
|
|
4
|
+
function useCursorReveal(fullPath, cursorPath, setExpanded) {
|
|
5
|
+
const $ = c(18);
|
|
6
|
+
let t0;
|
|
7
|
+
if ($[0] !== cursorPath || $[1] !== fullPath) {
|
|
8
|
+
t0 = cursorPath !== void 0 && cursorPath.length >= fullPath.length && fullPath.every((seg, i) => segmentsEqual(cursorPath[i], seg));
|
|
9
|
+
$[0] = cursorPath;
|
|
10
|
+
$[1] = fullPath;
|
|
11
|
+
$[2] = t0;
|
|
12
|
+
} else {
|
|
13
|
+
t0 = $[2];
|
|
14
|
+
}
|
|
15
|
+
const onCursorPath = t0;
|
|
16
|
+
const isAncestor = onCursorPath && cursorPath.length > fullPath.length;
|
|
17
|
+
const isTarget = onCursorPath && cursorPath.length === fullPath.length;
|
|
18
|
+
const nodeRef = useRef(null);
|
|
19
|
+
const [flash, setFlash] = useState(false);
|
|
20
|
+
let t1;
|
|
21
|
+
if ($[3] !== isAncestor || $[4] !== setExpanded) {
|
|
22
|
+
t1 = () => {
|
|
23
|
+
if (isAncestor) {
|
|
24
|
+
setExpanded(true);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
$[3] = isAncestor;
|
|
28
|
+
$[4] = setExpanded;
|
|
29
|
+
$[5] = t1;
|
|
30
|
+
} else {
|
|
31
|
+
t1 = $[5];
|
|
32
|
+
}
|
|
33
|
+
let t2;
|
|
34
|
+
if ($[6] !== cursorPath || $[7] !== isAncestor || $[8] !== setExpanded) {
|
|
35
|
+
t2 = [cursorPath, isAncestor, setExpanded];
|
|
36
|
+
$[6] = cursorPath;
|
|
37
|
+
$[7] = isAncestor;
|
|
38
|
+
$[8] = setExpanded;
|
|
39
|
+
$[9] = t2;
|
|
40
|
+
} else {
|
|
41
|
+
t2 = $[9];
|
|
42
|
+
}
|
|
43
|
+
useEffect(t1, t2);
|
|
44
|
+
let t3;
|
|
45
|
+
if ($[10] !== isTarget) {
|
|
46
|
+
t3 = () => {
|
|
47
|
+
var _a;
|
|
48
|
+
if (!isTarget) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
setFlash(true);
|
|
52
|
+
const row = ((_a = nodeRef.current) == null ? void 0 : _a.firstElementChild) ?? nodeRef.current;
|
|
53
|
+
row == null ? void 0 : row.scrollIntoView({
|
|
54
|
+
block: "center"
|
|
55
|
+
});
|
|
56
|
+
const timer = setTimeout(() => setFlash(false), 700);
|
|
57
|
+
return () => clearTimeout(timer);
|
|
58
|
+
};
|
|
59
|
+
$[10] = isTarget;
|
|
60
|
+
$[11] = t3;
|
|
61
|
+
} else {
|
|
62
|
+
t3 = $[11];
|
|
63
|
+
}
|
|
64
|
+
let t4;
|
|
65
|
+
if ($[12] !== cursorPath || $[13] !== isTarget) {
|
|
66
|
+
t4 = [cursorPath, isTarget];
|
|
67
|
+
$[12] = cursorPath;
|
|
68
|
+
$[13] = isTarget;
|
|
69
|
+
$[14] = t4;
|
|
70
|
+
} else {
|
|
71
|
+
t4 = $[14];
|
|
72
|
+
}
|
|
73
|
+
useEffect(t3, t4);
|
|
74
|
+
let t5;
|
|
75
|
+
if ($[15] !== flash || $[16] !== isTarget) {
|
|
76
|
+
t5 = {
|
|
77
|
+
flash,
|
|
78
|
+
current: isTarget,
|
|
79
|
+
nodeRef
|
|
80
|
+
};
|
|
81
|
+
$[15] = flash;
|
|
82
|
+
$[16] = isTarget;
|
|
83
|
+
$[17] = t5;
|
|
84
|
+
} else {
|
|
85
|
+
t5 = $[17];
|
|
86
|
+
}
|
|
87
|
+
return t5;
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
useCursorReveal
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=use-cursor-reveal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-cursor-reveal.js","sources":["../../src/components/use-cursor-reveal.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { segmentsEqual, type PathSegment } from '../lib/ast-path';\n\n/**\n * Reveals a tree node as the editor cursor moves onto it or a descendant:\n * auto-expands it when it's an ancestor of the cursor's field, and (only when\n * the cursor lands exactly on it) flashes it, scrolls it into view, and marks it\n * as the current node so the row can show a persistent highlight. Ancestors\n * expand but neither flash nor highlight, to keep the \"you are here\" signal on\n * the one field the cursor sits in. Shared by field rows and inline-fragment\n * rows so both react to the cursor.\n */\nexport function useCursorReveal(\n fullPath: PathSegment[],\n cursorPath: PathSegment[] | undefined,\n setExpanded: (value: boolean) => void,\n) {\n const onCursorPath =\n cursorPath !== undefined &&\n cursorPath.length >= fullPath.length &&\n fullPath.every((seg, i) => segmentsEqual(cursorPath[i]!, seg));\n const isAncestor = onCursorPath && cursorPath.length > fullPath.length;\n const isTarget = onCursorPath && cursorPath.length === fullPath.length;\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const [flash, setFlash] = useState(false);\n\n // Re-assert on every cursor move (depend on the `cursorPath` array identity,\n // not just `isAncestor`): otherwise a node that's already an ancestor when it\n // gets collapsed never re-expands as the cursor moves deeper, since\n // `isAncestor` stays true and the effect wouldn't re-run.\n useEffect(() => {\n if (isAncestor) {\n setExpanded(true);\n }\n }, [cursorPath, isAncestor, setExpanded]);\n\n // Depend on the `cursorPath` array identity, not its contents: the editor\n // hands us a fresh array on every cursor event, so re-placing the cursor on\n // the same field re-flashes it (handy for getting your bearings).\n useEffect(() => {\n if (!isTarget) {\n return;\n }\n setFlash(true);\n // Scroll the header row into view, not the whole node. For a composite field\n // the node also wraps its expanded children, so centering the node would\n // center that tall subtree and leave the field's own row off-center. The\n // first child is the row (the children, if any, follow it). Centered\n // vertically so it doesn't land under the sticky operation header.\n const row = nodeRef.current?.firstElementChild ?? nodeRef.current;\n row?.scrollIntoView({ block: 'center' });\n const timer = setTimeout(() => setFlash(false), 700);\n return () => clearTimeout(timer);\n }, [cursorPath, isTarget]);\n\n return { flash, current: isTarget, nodeRef };\n}\n"],"names":["useCursorReveal","fullPath","cursorPath","setExpanded","$","_c","t0","undefined","length","every","seg","i","segmentsEqual","onCursorPath","isAncestor","isTarget","nodeRef","useRef","flash","setFlash","useState","t1","t2","useEffect","t3","row","current","firstElementChild","scrollIntoView","block","timer","setTimeout","clearTimeout","t4","t5"],"mappings":";;;AAYOA,SAAAA,gBAAAC,UAAAC,YAAAC,aAAA;AAAAC,QAAAA,IAAAC,EAAA,EAAA;AAAAC,MAAAA;AAAA,MAAAF,EAAAF,CAAAA,MAAAA,cAAAE,SAAAH,UAAA;AAMHK,SAAAJ,eAAUK,UACVL,WAAUM,UAAWP,SAAQO,UAC7BP,SAAQQ,MAAAC,CAAAA,KAAAC,MAAmBC,cAAcV,WAAWS,CAAC,GAAID,GAAG,CAAC;AAACN,WAAAF;AAAAE,WAAAH;AAAAG,WAAAE;AAAAA,EAAAA,OAAA;AAAAA,SAAAF,EAAA,CAAA;AAAA,EAAA;AAHhE,QAAAS,eACEP;AAGF,QAAAQ,aAAmBD,gBAAgBX,WAAUM,SAAUP,SAAQO;AAC/D,QAAAO,WAAiBF,gBAAgBX,WAAUM,WAAYP,SAAQO;AAE/DQ,QAAAA,UAAgBC,OAAA,IAA2B;AAC3C,QAAA,CAAAC,OAAAC,QAAA,IAA0BC,cAAc;AAAEC,MAAAA;AAAA,MAAAjB,EAAAU,CAAAA,MAAAA,cAAAV,SAAAD,aAAA;AAMhCkB,SAAAA,MAAA;AAAA,UACJP,YAAU;AACZX,wBAAgB;AAAA,MAAA;AAAA,IAAC;AAEpBC,WAAAU;AAAAV,WAAAD;AAAAC,WAAAiB;AAAAA,EAAAA,OAAA;AAAAA,SAAAjB,EAAA,CAAA;AAAA,EAAA;AAAAkB,MAAAA;AAAAlB,MAAAA,EAAAF,CAAAA,MAAAA,cAAAE,SAAAU,cAAAV,EAAA,CAAA,MAAAD,aAAA;AAAGD,SAAAA,CAAAA,YAAYY,YAAYX,WAAW;AAACC,WAAAF;AAAAE,WAAAU;AAAAV,WAAAD;AAAAC,WAAAkB;AAAAA,EAAAA,OAAA;AAAAA,SAAAlB,EAAA,CAAA;AAAA,EAAA;AAJxCmB,YAAUF,IAIPC,EAAqC;AAACE,MAAAA;AAAApB,MAAAA,UAAAW,UAAA;AAK/BS,SAAAA,MAAA;;AAAA,UAAA,CACHT,UAAQ;AAAA;AAAA,MAAA;AAGbI,mBAAa;AAMb,YAAAM,QAAYT,aAAOU,YAAPV,mBAAOW,sBAA+BX,QAAOU;AACzDD,iCAAGG,eAAA;AAAA,QAAAC,OAA0B;AAAA,MAAA;AAC7B,YAAAC,QAAcC,WAAA,MAAiBZ,SAAc,KAAA,MAAM;AACtCa,aAAAA,MAAAA,aAAaF,KAAK;AAAA,IAAC;AACjC1B,YAAAW;AAAAX,YAAAoB;AAAAA,EAAAA,OAAA;AAAAA,SAAApB,EAAA,EAAA;AAAA,EAAA;AAAA6B,MAAAA;AAAA,MAAA7B,EAAAF,EAAAA,MAAAA,cAAAE,UAAAW,UAAA;AAAE,SAAA,CAACb,YAAYa,QAAQ;AAACX,YAAAF;AAAAE,YAAAW;AAAAX,YAAA6B;AAAAA,EAAAA,OAAA;AAAAA,SAAA7B,EAAA,EAAA;AAAA,EAAA;AAdzBmB,YAAUC,IAcPS,EAAsB;AAACC,MAAAA;AAAA,MAAA9B,EAAAc,EAAAA,MAAAA,SAAAd,UAAAW,UAAA;AAEnB,SAAA;AAAA,MAAAG;AAAAA,MAAAQ,SAAkBX;AAAAA,MAAQC;AAAAA,IAAA;AAAWZ,YAAAc;AAAAd,YAAAW;AAAAX,YAAA8B;AAAAA,EAAAA,OAAA;AAAAA,SAAA9B,EAAA,EAAA;AAAA,EAAA;AAArC8B,SAAAA;AAAqC;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OperationTypeNode, DocumentNode } from 'graphql';
|
|
2
|
+
import { ArgValue, DefinitionTarget } from '../lib/document-mutator';
|
|
3
|
+
import { PathSegment } from '../lib/ast-path';
|
|
4
|
+
export interface UseWorkingDocumentResult {
|
|
5
|
+
workingDoc: DocumentNode;
|
|
6
|
+
activeOpKind: OperationTypeNode | undefined;
|
|
7
|
+
/** The definition the tree currently reads and mutates (operation or fragment). */
|
|
8
|
+
target: DefinitionTarget;
|
|
9
|
+
/** Field path under the editor cursor, when it belongs to `target`. */
|
|
10
|
+
cursorPath: PathSegment[] | undefined;
|
|
11
|
+
/** Switch the active target to a named fragment (from a click). */
|
|
12
|
+
handleFocusFragment: (fragmentName: string) => void;
|
|
13
|
+
/** Return the active target to the operation (from a click). */
|
|
14
|
+
handleBackToQuery: () => void;
|
|
15
|
+
handleToggle: (path: PathSegment[]) => void;
|
|
16
|
+
handleSetArg: (path: PathSegment[], argName: string, value: ArgValue) => void;
|
|
17
|
+
handlePromoteArg: (path: PathSegment[], argName: string, suggestedName: string) => void;
|
|
18
|
+
handleDemoteArg: (path: PathSegment[], argName: string, varName: string) => void;
|
|
19
|
+
handleAddInlineFragment: (path: PathSegment[], typeName: string) => void;
|
|
20
|
+
handleRemoveInlineFragment: (path: PathSegment[], typeName: string) => void;
|
|
21
|
+
handleRemoveFragmentSpread: (path: PathSegment[], fragmentName: string) => void;
|
|
22
|
+
handleExtractFragment: (path: PathSegment[], typeName: string) => void;
|
|
23
|
+
handleRenameFragment: (oldName: string, newName: string) => void;
|
|
24
|
+
/** Deletes a fragment, inlining its selections at every spread site. */
|
|
25
|
+
handleDeleteFragment: (fragmentName: string) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Owns the working document: its state, editor write-back, echo-suppression,
|
|
29
|
+
* external-edit sync, and all document-mutation handlers.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useWorkingDocument(): UseWorkingDocumentResult;
|
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
import { c } from "react-compiler-runtime";
|
|
2
|
+
import { useGraphiQL, useGraphiQLActions } from "@graphiql/react";
|
|
3
|
+
import { parse, print, Kind, getNamedType, valueFromASTUntyped, parseValue } from "graphql";
|
|
4
|
+
import { useState, useRef, useEffect } from "react";
|
|
5
|
+
import { findOperation, definitionSelectionOffset, findDefinition } from "../lib/ast-path.js";
|
|
6
|
+
import { readVariables, resolveSchemaArg, resolveSchemaArgFromRoot, extractRawArgValue } from "../lib/schema-walk.js";
|
|
7
|
+
import { useCursorContext } from "./use-cursor-path.js";
|
|
8
|
+
import { toggleFieldSelection } from "../lib/field-selection.js";
|
|
9
|
+
import { argValueToValueNode } from "../lib/arg-value.js";
|
|
10
|
+
import { setFieldArgument } from "../lib/arguments.js";
|
|
11
|
+
import { suggestVarName, promoteArgToVariable, demoteVariable } from "../lib/variables.js";
|
|
12
|
+
import { addInlineFragment, removeInlineFragment } from "../lib/inline-fragments.js";
|
|
13
|
+
import { removeFragmentSpread, listFragments, createFragmentFromSelection, renameFragment, inlineFragment } from "../lib/fragments.js";
|
|
14
|
+
function tryParse(text) {
|
|
15
|
+
const src = text == null ? void 0 : text.trim();
|
|
16
|
+
if (!src) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return parse(src);
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function emptyDoc() {
|
|
26
|
+
return parse("{ __typename }");
|
|
27
|
+
}
|
|
28
|
+
function useWorkingDocument() {
|
|
29
|
+
var _a, _b, _c, _d, _e;
|
|
30
|
+
const $ = c(105);
|
|
31
|
+
const schema = useGraphiQL(_temp);
|
|
32
|
+
const queryEditor = useGraphiQL(_temp2);
|
|
33
|
+
const variableEditor = useGraphiQL(_temp3);
|
|
34
|
+
const operationName = useGraphiQL(_temp4);
|
|
35
|
+
const {
|
|
36
|
+
updateActiveTabValues
|
|
37
|
+
} = useGraphiQLActions();
|
|
38
|
+
const activeTabIndex = useGraphiQL(_temp5);
|
|
39
|
+
const tabs = useGraphiQL(_temp6);
|
|
40
|
+
const queryText = (_a = tabs[activeTabIndex]) == null ? void 0 : _a.query;
|
|
41
|
+
const variablesText = (_b = tabs[activeTabIndex]) == null ? void 0 : _b.variables;
|
|
42
|
+
let t0;
|
|
43
|
+
if ($[0] !== queryText) {
|
|
44
|
+
t0 = () => tryParse(queryText) ?? emptyDoc();
|
|
45
|
+
$[0] = queryText;
|
|
46
|
+
$[1] = t0;
|
|
47
|
+
} else {
|
|
48
|
+
t0 = $[1];
|
|
49
|
+
}
|
|
50
|
+
const [workingDoc, setWorkingDoc] = useState(t0);
|
|
51
|
+
const lastSyncedRef = useRef(queryText ?? null);
|
|
52
|
+
let t1;
|
|
53
|
+
if ($[2] !== queryEditor || $[3] !== updateActiveTabValues) {
|
|
54
|
+
t1 = (printed) => {
|
|
55
|
+
if (queryEditor) {
|
|
56
|
+
const position = queryEditor.getPosition();
|
|
57
|
+
queryEditor.setValue(printed);
|
|
58
|
+
if (position) {
|
|
59
|
+
queryEditor.setPosition(position);
|
|
60
|
+
}
|
|
61
|
+
lastSyncedRef.current = queryEditor.getValue();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
lastSyncedRef.current = printed;
|
|
65
|
+
updateActiveTabValues({
|
|
66
|
+
query: printed
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
$[2] = queryEditor;
|
|
70
|
+
$[3] = updateActiveTabValues;
|
|
71
|
+
$[4] = t1;
|
|
72
|
+
} else {
|
|
73
|
+
t1 = $[4];
|
|
74
|
+
}
|
|
75
|
+
const writeToEditor = t1;
|
|
76
|
+
let t2;
|
|
77
|
+
let t3;
|
|
78
|
+
if ($[5] !== queryText) {
|
|
79
|
+
t2 = () => {
|
|
80
|
+
if (queryText === lastSyncedRef.current) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
lastSyncedRef.current = queryText ?? null;
|
|
84
|
+
const parsed = tryParse(queryText);
|
|
85
|
+
if (parsed) {
|
|
86
|
+
setWorkingDoc(parsed);
|
|
87
|
+
} else {
|
|
88
|
+
if (!(queryText == null ? void 0 : queryText.trim())) {
|
|
89
|
+
setWorkingDoc(emptyDoc());
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
t3 = [queryText];
|
|
94
|
+
$[5] = queryText;
|
|
95
|
+
$[6] = t2;
|
|
96
|
+
$[7] = t3;
|
|
97
|
+
} else {
|
|
98
|
+
t2 = $[6];
|
|
99
|
+
t3 = $[7];
|
|
100
|
+
}
|
|
101
|
+
useEffect(t2, t3);
|
|
102
|
+
let t4;
|
|
103
|
+
if ($[8] !== operationName || $[9] !== workingDoc) {
|
|
104
|
+
t4 = (_c = findOperation(workingDoc, operationName)) == null ? void 0 : _c.operation;
|
|
105
|
+
$[8] = operationName;
|
|
106
|
+
$[9] = workingDoc;
|
|
107
|
+
$[10] = t4;
|
|
108
|
+
} else {
|
|
109
|
+
t4 = $[10];
|
|
110
|
+
}
|
|
111
|
+
const activeOpKind = t4;
|
|
112
|
+
const cursor = useCursorContext();
|
|
113
|
+
const [activeFragment, setActiveFragment] = useState(null);
|
|
114
|
+
const cursorFragment = ((_d = cursor.target) == null ? void 0 : _d.kind) === "fragment" ? cursor.target.name : ((_e = cursor.target) == null ? void 0 : _e.kind) === "operation" ? null : void 0;
|
|
115
|
+
let t5;
|
|
116
|
+
let t6;
|
|
117
|
+
if ($[11] !== cursorFragment) {
|
|
118
|
+
t5 = () => {
|
|
119
|
+
if (cursorFragment !== void 0) {
|
|
120
|
+
setActiveFragment(cursorFragment);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
t6 = [cursorFragment];
|
|
124
|
+
$[11] = cursorFragment;
|
|
125
|
+
$[12] = t5;
|
|
126
|
+
$[13] = t6;
|
|
127
|
+
} else {
|
|
128
|
+
t5 = $[12];
|
|
129
|
+
t6 = $[13];
|
|
130
|
+
}
|
|
131
|
+
useEffect(t5, t6);
|
|
132
|
+
let t7;
|
|
133
|
+
if ($[14] !== activeFragment || $[15] !== operationName) {
|
|
134
|
+
t7 = activeFragment != null ? {
|
|
135
|
+
kind: "fragment",
|
|
136
|
+
name: activeFragment
|
|
137
|
+
} : {
|
|
138
|
+
kind: "operation",
|
|
139
|
+
name: operationName
|
|
140
|
+
};
|
|
141
|
+
$[14] = activeFragment;
|
|
142
|
+
$[15] = operationName;
|
|
143
|
+
$[16] = t7;
|
|
144
|
+
} else {
|
|
145
|
+
t7 = $[16];
|
|
146
|
+
}
|
|
147
|
+
const target = t7;
|
|
148
|
+
const cursorInTarget = cursor.target != null && (activeFragment != null ? cursor.target.kind === "fragment" && cursor.target.name === activeFragment : cursor.target.kind === "operation");
|
|
149
|
+
const cursorPath = cursorInTarget ? cursor.path : void 0;
|
|
150
|
+
let t8;
|
|
151
|
+
if ($[17] !== queryEditor) {
|
|
152
|
+
t8 = function moveCursorToTarget2(next) {
|
|
153
|
+
setActiveFragment(next.kind === "fragment" ? next.name : null);
|
|
154
|
+
if (!queryEditor) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const model = queryEditor.getModel();
|
|
158
|
+
if (!model) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
let offset;
|
|
162
|
+
try {
|
|
163
|
+
offset = definitionSelectionOffset(parse(model.getValue()), next);
|
|
164
|
+
} catch {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (offset != null) {
|
|
168
|
+
queryEditor.setPosition(model.getPositionAt(offset));
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
$[17] = queryEditor;
|
|
172
|
+
$[18] = t8;
|
|
173
|
+
} else {
|
|
174
|
+
t8 = $[18];
|
|
175
|
+
}
|
|
176
|
+
const moveCursorToTarget = t8;
|
|
177
|
+
let t9;
|
|
178
|
+
if ($[19] !== moveCursorToTarget) {
|
|
179
|
+
t9 = function handleFocusFragment2(fragmentName) {
|
|
180
|
+
moveCursorToTarget({
|
|
181
|
+
kind: "fragment",
|
|
182
|
+
name: fragmentName
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
$[19] = moveCursorToTarget;
|
|
186
|
+
$[20] = t9;
|
|
187
|
+
} else {
|
|
188
|
+
t9 = $[20];
|
|
189
|
+
}
|
|
190
|
+
const handleFocusFragment = t9;
|
|
191
|
+
let t10;
|
|
192
|
+
if ($[21] !== moveCursorToTarget || $[22] !== operationName) {
|
|
193
|
+
t10 = function handleBackToQuery2() {
|
|
194
|
+
moveCursorToTarget({
|
|
195
|
+
kind: "operation",
|
|
196
|
+
name: operationName
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
$[21] = moveCursorToTarget;
|
|
200
|
+
$[22] = operationName;
|
|
201
|
+
$[23] = t10;
|
|
202
|
+
} else {
|
|
203
|
+
t10 = $[23];
|
|
204
|
+
}
|
|
205
|
+
const handleBackToQuery = t10;
|
|
206
|
+
let t11;
|
|
207
|
+
if ($[24] !== writeToEditor) {
|
|
208
|
+
t11 = function applyDoc2(next_0) {
|
|
209
|
+
setWorkingDoc(next_0);
|
|
210
|
+
writeToEditor(print(next_0));
|
|
211
|
+
};
|
|
212
|
+
$[24] = writeToEditor;
|
|
213
|
+
$[25] = t11;
|
|
214
|
+
} else {
|
|
215
|
+
t11 = $[25];
|
|
216
|
+
}
|
|
217
|
+
const applyDoc = t11;
|
|
218
|
+
let t12;
|
|
219
|
+
if ($[26] !== updateActiveTabValues || $[27] !== variableEditor) {
|
|
220
|
+
t12 = function applyVariables2(next_1) {
|
|
221
|
+
const serialized = Object.keys(next_1).length ? JSON.stringify(next_1, null, 2) : "";
|
|
222
|
+
if (variableEditor) {
|
|
223
|
+
variableEditor.setValue(serialized);
|
|
224
|
+
} else {
|
|
225
|
+
updateActiveTabValues({
|
|
226
|
+
variables: serialized
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
$[26] = updateActiveTabValues;
|
|
231
|
+
$[27] = variableEditor;
|
|
232
|
+
$[28] = t12;
|
|
233
|
+
} else {
|
|
234
|
+
t12 = $[28];
|
|
235
|
+
}
|
|
236
|
+
const applyVariables = t12;
|
|
237
|
+
let t13;
|
|
238
|
+
if ($[29] !== applyVariables || $[30] !== variablesText) {
|
|
239
|
+
t13 = function reconcileVariablesJson2(next_2) {
|
|
240
|
+
const definedVars = /* @__PURE__ */ new Set();
|
|
241
|
+
for (const def of next_2.definitions) {
|
|
242
|
+
if (def.kind === Kind.OPERATION_DEFINITION) {
|
|
243
|
+
for (const vd of def.variableDefinitions ?? []) {
|
|
244
|
+
definedVars.add(vd.variable.name.value);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const vars = readVariables(variablesText);
|
|
249
|
+
if (Object.keys(vars).some((name_0) => !definedVars.has(name_0))) {
|
|
250
|
+
const reconciled = {};
|
|
251
|
+
for (const [name, value] of Object.entries(vars)) {
|
|
252
|
+
if (definedVars.has(name)) {
|
|
253
|
+
reconciled[name] = value;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
applyVariables(reconciled);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
$[29] = applyVariables;
|
|
260
|
+
$[30] = variablesText;
|
|
261
|
+
$[31] = t13;
|
|
262
|
+
} else {
|
|
263
|
+
t13 = $[31];
|
|
264
|
+
}
|
|
265
|
+
const reconcileVariablesJson = t13;
|
|
266
|
+
let t14;
|
|
267
|
+
if ($[32] !== applyDoc || $[33] !== reconcileVariablesJson || $[34] !== target || $[35] !== workingDoc) {
|
|
268
|
+
t14 = function handleToggle2(path) {
|
|
269
|
+
const next_3 = toggleFieldSelection(workingDoc, path, target);
|
|
270
|
+
applyDoc(next_3);
|
|
271
|
+
reconcileVariablesJson(next_3);
|
|
272
|
+
};
|
|
273
|
+
$[32] = applyDoc;
|
|
274
|
+
$[33] = reconcileVariablesJson;
|
|
275
|
+
$[34] = target;
|
|
276
|
+
$[35] = workingDoc;
|
|
277
|
+
$[36] = t14;
|
|
278
|
+
} else {
|
|
279
|
+
t14 = $[36];
|
|
280
|
+
}
|
|
281
|
+
const handleToggle = t14;
|
|
282
|
+
let t15;
|
|
283
|
+
if ($[37] !== activeOpKind || $[38] !== schema || $[39] !== target || $[40] !== workingDoc) {
|
|
284
|
+
t15 = function schemaArgFor2(path_0, argName) {
|
|
285
|
+
if (!schema) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (target.kind === "operation") {
|
|
289
|
+
return resolveSchemaArg(schema, activeOpKind, path_0, argName);
|
|
290
|
+
}
|
|
291
|
+
const def_0 = findDefinition(workingDoc, target);
|
|
292
|
+
const rootTypeName = (def_0 == null ? void 0 : def_0.kind) === Kind.FRAGMENT_DEFINITION ? def_0.typeCondition.name.value : void 0;
|
|
293
|
+
const rootType = rootTypeName ? schema.getType(rootTypeName) ?? void 0 : void 0;
|
|
294
|
+
return resolveSchemaArgFromRoot(schema, rootType, path_0, argName);
|
|
295
|
+
};
|
|
296
|
+
$[37] = activeOpKind;
|
|
297
|
+
$[38] = schema;
|
|
298
|
+
$[39] = target;
|
|
299
|
+
$[40] = workingDoc;
|
|
300
|
+
$[41] = t15;
|
|
301
|
+
} else {
|
|
302
|
+
t15 = $[41];
|
|
303
|
+
}
|
|
304
|
+
const schemaArgFor = t15;
|
|
305
|
+
let t16;
|
|
306
|
+
if ($[42] !== applyDoc || $[43] !== schemaArgFor || $[44] !== target || $[45] !== workingDoc) {
|
|
307
|
+
t16 = function handleSetArg2(path_1, argName_0, value_0) {
|
|
308
|
+
const schemaArg = schemaArgFor(path_1, argName_0);
|
|
309
|
+
if (!schemaArg) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const valueNode = argValueToValueNode(schemaArg.type, value_0);
|
|
313
|
+
applyDoc(setFieldArgument(workingDoc, path_1, argName_0, valueNode, target));
|
|
314
|
+
};
|
|
315
|
+
$[42] = applyDoc;
|
|
316
|
+
$[43] = schemaArgFor;
|
|
317
|
+
$[44] = target;
|
|
318
|
+
$[45] = workingDoc;
|
|
319
|
+
$[46] = t16;
|
|
320
|
+
} else {
|
|
321
|
+
t16 = $[46];
|
|
322
|
+
}
|
|
323
|
+
const handleSetArg = t16;
|
|
324
|
+
let t17;
|
|
325
|
+
if ($[47] !== applyDoc || $[48] !== applyVariables || $[49] !== operationName || $[50] !== schemaArgFor || $[51] !== variablesText || $[52] !== workingDoc) {
|
|
326
|
+
t17 = function handlePromoteArg2(path_2, argName_1, suggestedName) {
|
|
327
|
+
const schemaArg_0 = schemaArgFor(path_2, argName_1);
|
|
328
|
+
if (!schemaArg_0) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const namedType = getNamedType(schemaArg_0.type);
|
|
332
|
+
if (!namedType) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
const varName = suggestVarName(workingDoc, suggestedName);
|
|
336
|
+
const raw = extractRawArgValue(workingDoc, path_2, argName_1, operationName);
|
|
337
|
+
applyDoc(promoteArgToVariable(workingDoc, path_2, argName_1, varName, namedType.name, "", operationName));
|
|
338
|
+
if (raw) {
|
|
339
|
+
try {
|
|
340
|
+
const jsValue = valueFromASTUntyped(parseValue(raw));
|
|
341
|
+
applyVariables({
|
|
342
|
+
...readVariables(variablesText),
|
|
343
|
+
[varName]: jsValue
|
|
344
|
+
});
|
|
345
|
+
} catch {
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
$[47] = applyDoc;
|
|
350
|
+
$[48] = applyVariables;
|
|
351
|
+
$[49] = operationName;
|
|
352
|
+
$[50] = schemaArgFor;
|
|
353
|
+
$[51] = variablesText;
|
|
354
|
+
$[52] = workingDoc;
|
|
355
|
+
$[53] = t17;
|
|
356
|
+
} else {
|
|
357
|
+
t17 = $[53];
|
|
358
|
+
}
|
|
359
|
+
const handlePromoteArg = t17;
|
|
360
|
+
let t18;
|
|
361
|
+
if ($[54] !== applyDoc || $[55] !== applyVariables || $[56] !== operationName || $[57] !== schemaArgFor || $[58] !== variablesText || $[59] !== workingDoc) {
|
|
362
|
+
t18 = function handleDemoteArg2(path_3, argName_2, varName_0) {
|
|
363
|
+
const vars_0 = readVariables(variablesText);
|
|
364
|
+
const jsValue_0 = vars_0[varName_0];
|
|
365
|
+
const schemaArg_1 = schemaArgFor(path_3, argName_2);
|
|
366
|
+
let inlineValue;
|
|
367
|
+
if (schemaArg_1 && jsValue_0 !== void 0) {
|
|
368
|
+
inlineValue = argValueToValueNode(schemaArg_1.type, String(jsValue_0));
|
|
369
|
+
}
|
|
370
|
+
applyDoc(demoteVariable(workingDoc, varName_0, operationName, inlineValue));
|
|
371
|
+
const rest = {
|
|
372
|
+
...vars_0
|
|
373
|
+
};
|
|
374
|
+
delete rest[varName_0];
|
|
375
|
+
applyVariables(rest);
|
|
376
|
+
};
|
|
377
|
+
$[54] = applyDoc;
|
|
378
|
+
$[55] = applyVariables;
|
|
379
|
+
$[56] = operationName;
|
|
380
|
+
$[57] = schemaArgFor;
|
|
381
|
+
$[58] = variablesText;
|
|
382
|
+
$[59] = workingDoc;
|
|
383
|
+
$[60] = t18;
|
|
384
|
+
} else {
|
|
385
|
+
t18 = $[60];
|
|
386
|
+
}
|
|
387
|
+
const handleDemoteArg = t18;
|
|
388
|
+
let t19;
|
|
389
|
+
if ($[61] !== applyDoc || $[62] !== target || $[63] !== workingDoc) {
|
|
390
|
+
t19 = function handleAddInlineFragment2(path_4, typeName) {
|
|
391
|
+
applyDoc(addInlineFragment(workingDoc, path_4, typeName, target));
|
|
392
|
+
};
|
|
393
|
+
$[61] = applyDoc;
|
|
394
|
+
$[62] = target;
|
|
395
|
+
$[63] = workingDoc;
|
|
396
|
+
$[64] = t19;
|
|
397
|
+
} else {
|
|
398
|
+
t19 = $[64];
|
|
399
|
+
}
|
|
400
|
+
const handleAddInlineFragment = t19;
|
|
401
|
+
let t20;
|
|
402
|
+
if ($[65] !== applyDoc || $[66] !== reconcileVariablesJson || $[67] !== target || $[68] !== workingDoc) {
|
|
403
|
+
t20 = function handleRemoveInlineFragment2(path_5, typeName_0) {
|
|
404
|
+
const next_4 = removeInlineFragment(workingDoc, path_5, typeName_0, target);
|
|
405
|
+
applyDoc(next_4);
|
|
406
|
+
reconcileVariablesJson(next_4);
|
|
407
|
+
};
|
|
408
|
+
$[65] = applyDoc;
|
|
409
|
+
$[66] = reconcileVariablesJson;
|
|
410
|
+
$[67] = target;
|
|
411
|
+
$[68] = workingDoc;
|
|
412
|
+
$[69] = t20;
|
|
413
|
+
} else {
|
|
414
|
+
t20 = $[69];
|
|
415
|
+
}
|
|
416
|
+
const handleRemoveInlineFragment = t20;
|
|
417
|
+
let t21;
|
|
418
|
+
if ($[70] !== applyDoc || $[71] !== reconcileVariablesJson || $[72] !== target || $[73] !== workingDoc) {
|
|
419
|
+
t21 = function handleRemoveFragmentSpread2(path_6, fragmentName_0) {
|
|
420
|
+
const next_5 = removeFragmentSpread(workingDoc, path_6, fragmentName_0, target);
|
|
421
|
+
applyDoc(next_5);
|
|
422
|
+
reconcileVariablesJson(next_5);
|
|
423
|
+
};
|
|
424
|
+
$[70] = applyDoc;
|
|
425
|
+
$[71] = reconcileVariablesJson;
|
|
426
|
+
$[72] = target;
|
|
427
|
+
$[73] = workingDoc;
|
|
428
|
+
$[74] = t21;
|
|
429
|
+
} else {
|
|
430
|
+
t21 = $[74];
|
|
431
|
+
}
|
|
432
|
+
const handleRemoveFragmentSpread = t21;
|
|
433
|
+
let t22;
|
|
434
|
+
if ($[75] !== applyDoc || $[76] !== target || $[77] !== workingDoc) {
|
|
435
|
+
t22 = function handleExtractFragment2(path_7, typeName_1) {
|
|
436
|
+
const base = `${typeName_1}Fields`;
|
|
437
|
+
const existing = new Set(listFragments(workingDoc));
|
|
438
|
+
let name_1 = base;
|
|
439
|
+
for (let n = 2; existing.has(name_1); n++) {
|
|
440
|
+
name_1 = `${base}_${n}`;
|
|
441
|
+
}
|
|
442
|
+
applyDoc(createFragmentFromSelection(workingDoc, path_7, name_1, typeName_1, target));
|
|
443
|
+
};
|
|
444
|
+
$[75] = applyDoc;
|
|
445
|
+
$[76] = target;
|
|
446
|
+
$[77] = workingDoc;
|
|
447
|
+
$[78] = t22;
|
|
448
|
+
} else {
|
|
449
|
+
t22 = $[78];
|
|
450
|
+
}
|
|
451
|
+
const handleExtractFragment = t22;
|
|
452
|
+
let t23;
|
|
453
|
+
if ($[79] !== applyDoc || $[80] !== workingDoc) {
|
|
454
|
+
t23 = function handleRenameFragment2(oldName, newName) {
|
|
455
|
+
applyDoc(renameFragment(workingDoc, oldName, newName));
|
|
456
|
+
};
|
|
457
|
+
$[79] = applyDoc;
|
|
458
|
+
$[80] = workingDoc;
|
|
459
|
+
$[81] = t23;
|
|
460
|
+
} else {
|
|
461
|
+
t23 = $[81];
|
|
462
|
+
}
|
|
463
|
+
const handleRenameFragment = t23;
|
|
464
|
+
let t24;
|
|
465
|
+
if ($[82] !== activeFragment || $[83] !== applyDoc || $[84] !== moveCursorToTarget || $[85] !== operationName || $[86] !== workingDoc) {
|
|
466
|
+
t24 = function handleDeleteFragment2(fragmentName_1) {
|
|
467
|
+
applyDoc(inlineFragment(workingDoc, fragmentName_1));
|
|
468
|
+
if (activeFragment === fragmentName_1) {
|
|
469
|
+
moveCursorToTarget({
|
|
470
|
+
kind: "operation",
|
|
471
|
+
name: operationName
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
$[82] = activeFragment;
|
|
476
|
+
$[83] = applyDoc;
|
|
477
|
+
$[84] = moveCursorToTarget;
|
|
478
|
+
$[85] = operationName;
|
|
479
|
+
$[86] = workingDoc;
|
|
480
|
+
$[87] = t24;
|
|
481
|
+
} else {
|
|
482
|
+
t24 = $[87];
|
|
483
|
+
}
|
|
484
|
+
const handleDeleteFragment = t24;
|
|
485
|
+
let t25;
|
|
486
|
+
if ($[88] !== activeOpKind || $[89] !== cursorPath || $[90] !== handleAddInlineFragment || $[91] !== handleBackToQuery || $[92] !== handleDeleteFragment || $[93] !== handleDemoteArg || $[94] !== handleExtractFragment || $[95] !== handleFocusFragment || $[96] !== handlePromoteArg || $[97] !== handleRemoveFragmentSpread || $[98] !== handleRemoveInlineFragment || $[99] !== handleRenameFragment || $[100] !== handleSetArg || $[101] !== handleToggle || $[102] !== target || $[103] !== workingDoc) {
|
|
487
|
+
t25 = {
|
|
488
|
+
workingDoc,
|
|
489
|
+
activeOpKind,
|
|
490
|
+
target,
|
|
491
|
+
cursorPath,
|
|
492
|
+
handleFocusFragment,
|
|
493
|
+
handleBackToQuery,
|
|
494
|
+
handleToggle,
|
|
495
|
+
handleSetArg,
|
|
496
|
+
handlePromoteArg,
|
|
497
|
+
handleDemoteArg,
|
|
498
|
+
handleAddInlineFragment,
|
|
499
|
+
handleRemoveInlineFragment,
|
|
500
|
+
handleRemoveFragmentSpread,
|
|
501
|
+
handleExtractFragment,
|
|
502
|
+
handleRenameFragment,
|
|
503
|
+
handleDeleteFragment
|
|
504
|
+
};
|
|
505
|
+
$[88] = activeOpKind;
|
|
506
|
+
$[89] = cursorPath;
|
|
507
|
+
$[90] = handleAddInlineFragment;
|
|
508
|
+
$[91] = handleBackToQuery;
|
|
509
|
+
$[92] = handleDeleteFragment;
|
|
510
|
+
$[93] = handleDemoteArg;
|
|
511
|
+
$[94] = handleExtractFragment;
|
|
512
|
+
$[95] = handleFocusFragment;
|
|
513
|
+
$[96] = handlePromoteArg;
|
|
514
|
+
$[97] = handleRemoveFragmentSpread;
|
|
515
|
+
$[98] = handleRemoveInlineFragment;
|
|
516
|
+
$[99] = handleRenameFragment;
|
|
517
|
+
$[100] = handleSetArg;
|
|
518
|
+
$[101] = handleToggle;
|
|
519
|
+
$[102] = target;
|
|
520
|
+
$[103] = workingDoc;
|
|
521
|
+
$[104] = t25;
|
|
522
|
+
} else {
|
|
523
|
+
t25 = $[104];
|
|
524
|
+
}
|
|
525
|
+
return t25;
|
|
526
|
+
}
|
|
527
|
+
function _temp6(state_4) {
|
|
528
|
+
return state_4.tabs;
|
|
529
|
+
}
|
|
530
|
+
function _temp5(state_3) {
|
|
531
|
+
return state_3.activeTabIndex;
|
|
532
|
+
}
|
|
533
|
+
function _temp4(state_2) {
|
|
534
|
+
return state_2.operationName;
|
|
535
|
+
}
|
|
536
|
+
function _temp3(state_1) {
|
|
537
|
+
return state_1.variableEditor;
|
|
538
|
+
}
|
|
539
|
+
function _temp2(state_0) {
|
|
540
|
+
return state_0.queryEditor;
|
|
541
|
+
}
|
|
542
|
+
function _temp(state) {
|
|
543
|
+
return state.schema;
|
|
544
|
+
}
|
|
545
|
+
export {
|
|
546
|
+
useWorkingDocument
|
|
547
|
+
};
|
|
548
|
+
//# sourceMappingURL=use-working-document.js.map
|