stepzen-graphiql 1.0.4
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 +85 -0
- package/dist/GraphiQLExplorer.d.ts +10 -0
- package/dist/Range-CPFFy5pj.mjs +26 -0
- package/dist/Range-CUfOrqgY.js +1 -0
- package/dist/SchemaReference-94TE3IPs.mjs +146 -0
- package/dist/SchemaReference-DKgkDdcV.js +1 -0
- package/dist/brace-fold-9JQ5QTIN.mjs +122 -0
- package/dist/brace-fold-CUTcWTRf.js +1 -0
- package/dist/closebrackets-BL_z-rKi.mjs +165 -0
- package/dist/closebrackets-DHbhKDzk.js +2 -0
- package/dist/codemirror-CxfyhJc1.mjs +27 -0
- package/dist/codemirror-DMBo1i5w.js +24 -0
- package/dist/codemirror-DgPcZxSc.mjs +6121 -0
- package/dist/codemirror-Kv5dN_jU.js +1 -0
- package/dist/comment-CAsllqoy.js +2 -0
- package/dist/comment-DscvXuhU.mjs +150 -0
- package/dist/components/ExplorerPage/ExplorerHeader.d.ts +3 -0
- package/dist/components/ExplorerPage/ExplorerPage.d.ts +8 -0
- package/dist/components/ExplorerPage/GraphiQLInterface.d.ts +60 -0
- package/dist/components/ExplorerPage/Snippets.d.ts +17 -0
- package/dist/components/ExplorerPage/clearTooltip.d.ts +1 -0
- package/dist/components/exporterPlugin/CodeExporter.d.ts +93 -0
- package/dist/components/exporterPlugin/index.d.ts +7 -0
- package/dist/components/exporterPlugin/snippets/__helpers__/getOptionCombinations.d.ts +2 -0
- package/dist/components/exporterPlugin/snippets/index.d.ts +2 -0
- package/dist/components/exporterPlugin/snippets/javascript/fetch.d.ts +3 -0
- package/dist/components/exporterPlugin/snippets/javascript/reactApollo.d.ts +3 -0
- package/dist/components/exporterPlugin/toposort.d.ts +2 -0
- package/dist/components/exporterPlugin/useExporterPlugin.d.ts +19 -0
- package/dist/components/exporterPlugin/utils/capitalizeFirstLetter.d.ts +1 -0
- package/dist/components/exporterPlugin/utils/index.d.ts +7 -0
- package/dist/components/exporterPlugin/utils/jsCommentsFactory.d.ts +1 -0
- package/dist/contexts/EnvironmentContext.d.ts +37 -0
- package/dist/contexts/endpoint.d.ts +39 -0
- package/dist/dialog-BF69fCJO.js +1 -0
- package/dist/dialog-Ci1bnuc2.mjs +74 -0
- package/dist/dialog-Dh2DOTOu.js +1 -0
- package/dist/dialog-nXZjpybF.mjs +26 -0
- package/dist/foldgutter-DiGsqcNo.mjs +238 -0
- package/dist/foldgutter-Do6XNu8o.js +1 -0
- package/dist/forEachState-DA54msa8.mjs +11 -0
- package/dist/forEachState-DY_pA9Bd.js +1 -0
- package/dist/hint-BNpE1H1l.js +1 -0
- package/dist/hint-BQ9WwQj_.mjs +123 -0
- package/dist/hint-dA98kXsJ.js +1 -0
- package/dist/hint-ptEpgPx0.mjs +24 -0
- package/dist/index-BeOZF5ut.js +650 -0
- package/dist/index-GG9J9CZE.js +1 -0
- package/dist/index-Iqk59VQ1.mjs +89463 -0
- package/dist/index-_X52-Rov.mjs +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +4 -0
- package/dist/info-BhA0aX7P.js +1 -0
- package/dist/info-DavOVk27.mjs +99 -0
- package/dist/info-addon-BppfpWGs.js +1 -0
- package/dist/info-addon-jclzOzZb.mjs +66 -0
- package/dist/javascript-Bk78gZXV.js +1 -0
- package/dist/javascript-HLYdFIhF.mjs +26 -0
- package/dist/javascript-RO_jaPiE.mjs +707 -0
- package/dist/javascript-poxRzxcy.js +1 -0
- package/dist/jsx-C8WdRUVV.mjs +414 -0
- package/dist/jsx-LzpFIybc.js +1 -0
- package/dist/jump-BR4c9I5u.mjs +85 -0
- package/dist/jump-C3iGjDkY.js +1 -0
- package/dist/jump-to-line-BZOuAkwy.js +1 -0
- package/dist/jump-to-line-pXiAP2DT.mjs +61 -0
- package/dist/lib/constants.d.ts +6 -0
- package/dist/lib/graphiql-helpers.d.ts +86 -0
- package/dist/lib/helpers.d.ts +53 -0
- package/dist/lint-Aw1wLmnw.mjs +112 -0
- package/dist/lint-Bf0wS1Ab.js +1 -0
- package/dist/lint-DL7I1P7I.mjs +272 -0
- package/dist/lint-GZ9x3Nii.js +6 -0
- package/dist/lint-L3DNAS-R.mjs +216 -0
- package/dist/lint-azLq6zoS.js +1 -0
- package/dist/matchbrackets-BB4g2Y6d.mjs +87 -0
- package/dist/matchbrackets-DJZ2jVlm.js +1 -0
- package/dist/matchbrackets-DNVziiaa.mjs +26 -0
- package/dist/matchbrackets-DPv_MB7c.js +1 -0
- package/dist/mode-Bad_JbYc.js +1 -0
- package/dist/mode-BuM4vqHx.js +1 -0
- package/dist/mode-C9FNlffS.js +1 -0
- package/dist/mode-CtmJdiWw.mjs +73 -0
- package/dist/mode-CxFmwOoU.mjs +25 -0
- package/dist/mode-DQHzanY6.mjs +64 -0
- package/dist/mode-indent-9VnFlqY-.mjs +8 -0
- package/dist/mode-indent-m3TP74Ia.js +1 -0
- package/dist/search-BUZtJ7Zg.mjs +268 -0
- package/dist/search-DxgAMk6j.js +2 -0
- package/dist/searchcursor-BrHSjZde.mjs +26 -0
- package/dist/searchcursor-Cf1_qqgl.js +1 -0
- package/dist/searchcursor-DHtNMOPb.mjs +239 -0
- package/dist/searchcursor-eGwb3e2h.js +7 -0
- package/dist/show-hint-CYURLLrO.js +1 -0
- package/dist/show-hint-CmHZP7k_.mjs +357 -0
- package/dist/style.css +9 -0
- package/dist/sublime-BKhMEkpg.js +6 -0
- package/dist/sublime-Dmy11GSm.mjs +563 -0
- package/dist/types/config.d.ts +7 -0
- package/package.json +111 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./index-BeOZF5ut.js"),u=require("./codemirror-DMBo1i5w.js");function f(o,c){for(var t=0;t<c.length;t++){const r=c[t];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in o)){const i=Object.getOwnPropertyDescriptor(r,e);i&&Object.defineProperty(o,e,i.get?i:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var n=u.requireCodemirror();const s=d.getDefaultExportFromCjs(n),a=f({__proto__:null,default:s},[n]);exports.CodeMirror=s;exports.codemirror=a;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const G=require("./index-BeOZF5ut.js"),H=require("./codemirror-DMBo1i5w.js");function J(A,I){for(var v=0;v<I.length;v++){const C=I[v];if(typeof C!="string"&&!Array.isArray(C)){for(const s in C)if(s!=="default"&&!(s in A)){const a=Object.getOwnPropertyDescriptor(C,s);a&&Object.defineProperty(A,s,a.get?a:{enumerable:!0,get:()=>C[s]})}}}return Object.freeze(Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}))}var $={exports:{}},z;function K(){return z||(z=1,function(A,I){(function(v){v(H.requireCodemirror())})(function(v){var C={},s=/[^\s\u00a0]/,a=v.Pos,F=v.cmpPos;function P(t){var r=t.search(s);return r==-1?0:r}v.commands.toggleComment=function(t){t.toggleComment()},v.defineExtension("toggleComment",function(t){t||(t=C);for(var r=this,n=1/0,e=this.listSelections(),g=null,m=e.length-1;m>=0;m--){var l=e[m].from(),i=e[m].to();l.line>=n||(i.line>=n&&(i=a(n,0)),n=l.line,g==null?r.uncomment(l,i,t)?g="un":(r.lineComment(l,i,t),g="line"):g=="un"?r.uncomment(l,i,t):r.lineComment(l,i,t))}});function w(t,r,n){return/\bstring\b/.test(t.getTokenTypeAt(a(r.line,0)))&&!/^[\'\"\`]/.test(n)}function _(t,r){var n=t.getMode();return n.useInnerComments===!1||!n.innerMode?n:t.getModeAt(r)}v.defineExtension("lineComment",function(t,r,n){n||(n=C);var e=this,g=_(e,t),m=e.getLine(t.line);if(!(m==null||w(e,t,m))){var l=n.lineComment||g.lineComment;if(!l){(n.blockCommentStart||g.blockCommentStart)&&(n.fullLines=!0,e.blockComment(t,r,n));return}var i=Math.min(r.ch!=0||r.line==t.line?r.line+1:r.line,e.lastLine()+1),k=n.padding==null?" ":n.padding,f=n.commentBlankLines||t.line==r.line;e.operation(function(){if(n.indent){for(var d=null,c=t.line;c<i;++c){var u=e.getLine(c),h=u.search(s)===-1?u:u.slice(0,P(u));(d==null||d.length>h.length)&&(d=h)}for(var c=t.line;c<i;++c){var u=e.getLine(c),o=d.length;!f&&!s.test(u)||(u.slice(0,o)!=d&&(o=P(u)),e.replaceRange(d+l+k,a(c,0),a(c,o)))}}else for(var c=t.line;c<i;++c)(f||s.test(e.getLine(c)))&&e.replaceRange(l+k,a(c,0))})}}),v.defineExtension("blockComment",function(t,r,n){n||(n=C);var e=this,g=_(e,t),m=n.blockCommentStart||g.blockCommentStart,l=n.blockCommentEnd||g.blockCommentEnd;if(!m||!l){(n.lineComment||g.lineComment)&&n.fullLines!=!1&&e.lineComment(t,r,n);return}if(!/\bcomment\b/.test(e.getTokenTypeAt(a(t.line,0)))){var i=Math.min(r.line,e.lastLine());i!=t.line&&r.ch==0&&s.test(e.getLine(i))&&--i;var k=n.padding==null?" ":n.padding;t.line>i||e.operation(function(){if(n.fullLines!=!1){var f=s.test(e.getLine(i));e.replaceRange(k+l,a(i)),e.replaceRange(m+k,a(t.line,0));var d=n.blockCommentLead||g.blockCommentLead;if(d!=null)for(var c=t.line+1;c<=i;++c)(c!=i||f)&&e.replaceRange(d+k,a(c,0))}else{var u=F(e.getCursor("to"),r)==0,h=!e.somethingSelected();e.replaceRange(l,r),u&&e.setSelection(h?r:e.getCursor("from"),r),e.replaceRange(m,t)}})}}),v.defineExtension("uncomment",function(t,r,n){n||(n=C);var e=this,g=_(e,t),m=Math.min(r.ch!=0||r.line==t.line?r.line:r.line-1,e.lastLine()),l=Math.min(t.line,m),i=n.lineComment||g.lineComment,k=[],f=n.padding==null?" ":n.padding,d;e:{if(!i)break e;for(var c=l;c<=m;++c){var u=e.getLine(c),h=u.indexOf(i);if(h>-1&&!/comment/.test(e.getTokenTypeAt(a(c,h+1)))&&(h=-1),h==-1&&s.test(u)||h>-1&&s.test(u.slice(0,h)))break e;k.push(u)}if(e.operation(function(){for(var b=l;b<=m;++b){var x=k[b-l],O=x.indexOf(i),L=O+i.length;O<0||(x.slice(L,L+f.length)==f&&(L+=f.length),d=!0,e.replaceRange("",a(b,O),a(b,L)))}}),d)return!0}var o=n.blockCommentStart||g.blockCommentStart,S=n.blockCommentEnd||g.blockCommentEnd;if(!o||!S)return!1;var M=n.blockCommentLead||g.blockCommentLead,T=e.getLine(l),E=T.indexOf(o);if(E==-1)return!1;var j=m==l?T:e.getLine(m),p=j.indexOf(S,m==l?E+o.length:0),D=a(l,E+1),N=a(m,p+1);if(p==-1||!/comment/.test(e.getTokenTypeAt(D))||!/comment/.test(e.getTokenTypeAt(N))||e.getRange(D,N,`
|
|
2
|
+
`).indexOf(S)>-1)return!1;var y=T.lastIndexOf(o,t.ch),R=y==-1?-1:T.slice(0,t.ch).indexOf(S,y+o.length);if(y!=-1&&R!=-1&&R+S.length!=t.ch)return!1;R=j.indexOf(S,r.ch);var W=j.slice(r.ch).lastIndexOf(o,R-r.ch);return y=R==-1||W==-1?-1:r.ch+W,R!=-1&&y!=-1&&y!=r.ch?!1:(e.operation(function(){e.replaceRange("",a(m,p-(f&&j.slice(p-f.length,p)==f?f.length:0)),a(m,p+S.length));var b=E+o.length;if(f&&T.slice(b,b+f.length)==f&&(b+=f.length),e.replaceRange("",a(l,E),a(l,b)),M)for(var x=l+1;x<=m;++x){var O=e.getLine(x),L=O.indexOf(M);if(!(L==-1||s.test(O.slice(0,L)))){var q=L+M.length;f&&O.slice(q,q+f.length)==f&&(q+=f.length),e.replaceRange("",a(x,L),a(x,q))}}}),!0)})})}()),$.exports}var B=K();const Q=G.getDefaultExportFromCjs(B),U=J({__proto__:null,default:Q},[B]);exports.comment=U;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { g as G } from "./index-Iqk59VQ1.mjs";
|
|
2
|
+
import { r as H } from "./codemirror-DgPcZxSc.mjs";
|
|
3
|
+
function J(A, _) {
|
|
4
|
+
for (var v = 0; v < _.length; v++) {
|
|
5
|
+
const C = _[v];
|
|
6
|
+
if (typeof C != "string" && !Array.isArray(C)) {
|
|
7
|
+
for (const s in C)
|
|
8
|
+
if (s !== "default" && !(s in A)) {
|
|
9
|
+
const a = Object.getOwnPropertyDescriptor(C, s);
|
|
10
|
+
a && Object.defineProperty(A, s, a.get ? a : {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: () => C[s]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze(Object.defineProperty(A, Symbol.toStringTag, { value: "Module" }));
|
|
18
|
+
}
|
|
19
|
+
var $ = { exports: {} }, z;
|
|
20
|
+
function K() {
|
|
21
|
+
return z || (z = 1, function(A, _) {
|
|
22
|
+
(function(v) {
|
|
23
|
+
v(H());
|
|
24
|
+
})(function(v) {
|
|
25
|
+
var C = {}, s = /[^\s\u00a0]/, a = v.Pos, F = v.cmpPos;
|
|
26
|
+
function P(t) {
|
|
27
|
+
var l = t.search(s);
|
|
28
|
+
return l == -1 ? 0 : l;
|
|
29
|
+
}
|
|
30
|
+
v.commands.toggleComment = function(t) {
|
|
31
|
+
t.toggleComment();
|
|
32
|
+
}, v.defineExtension("toggleComment", function(t) {
|
|
33
|
+
t || (t = C);
|
|
34
|
+
for (var l = this, n = 1 / 0, e = this.listSelections(), g = null, m = e.length - 1; m >= 0; m--) {
|
|
35
|
+
var r = e[m].from(), i = e[m].to();
|
|
36
|
+
r.line >= n || (i.line >= n && (i = a(n, 0)), n = r.line, g == null ? l.uncomment(r, i, t) ? g = "un" : (l.lineComment(r, i, t), g = "line") : g == "un" ? l.uncomment(r, i, t) : l.lineComment(r, i, t));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
function w(t, l, n) {
|
|
40
|
+
return /\bstring\b/.test(t.getTokenTypeAt(a(l.line, 0))) && !/^[\'\"\`]/.test(n);
|
|
41
|
+
}
|
|
42
|
+
function q(t, l) {
|
|
43
|
+
var n = t.getMode();
|
|
44
|
+
return n.useInnerComments === !1 || !n.innerMode ? n : t.getModeAt(l);
|
|
45
|
+
}
|
|
46
|
+
v.defineExtension("lineComment", function(t, l, n) {
|
|
47
|
+
n || (n = C);
|
|
48
|
+
var e = this, g = q(e, t), m = e.getLine(t.line);
|
|
49
|
+
if (!(m == null || w(e, t, m))) {
|
|
50
|
+
var r = n.lineComment || g.lineComment;
|
|
51
|
+
if (!r) {
|
|
52
|
+
(n.blockCommentStart || g.blockCommentStart) && (n.fullLines = !0, e.blockComment(t, l, n));
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
var i = Math.min(l.ch != 0 || l.line == t.line ? l.line + 1 : l.line, e.lastLine() + 1), k = n.padding == null ? " " : n.padding, f = n.commentBlankLines || t.line == l.line;
|
|
56
|
+
e.operation(function() {
|
|
57
|
+
if (n.indent) {
|
|
58
|
+
for (var d = null, c = t.line; c < i; ++c) {
|
|
59
|
+
var u = e.getLine(c), h = u.search(s) === -1 ? u : u.slice(0, P(u));
|
|
60
|
+
(d == null || d.length > h.length) && (d = h);
|
|
61
|
+
}
|
|
62
|
+
for (var c = t.line; c < i; ++c) {
|
|
63
|
+
var u = e.getLine(c), o = d.length;
|
|
64
|
+
!f && !s.test(u) || (u.slice(0, o) != d && (o = P(u)), e.replaceRange(d + r + k, a(c, 0), a(c, o)));
|
|
65
|
+
}
|
|
66
|
+
} else
|
|
67
|
+
for (var c = t.line; c < i; ++c)
|
|
68
|
+
(f || s.test(e.getLine(c))) && e.replaceRange(r + k, a(c, 0));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}), v.defineExtension("blockComment", function(t, l, n) {
|
|
72
|
+
n || (n = C);
|
|
73
|
+
var e = this, g = q(e, t), m = n.blockCommentStart || g.blockCommentStart, r = n.blockCommentEnd || g.blockCommentEnd;
|
|
74
|
+
if (!m || !r) {
|
|
75
|
+
(n.lineComment || g.lineComment) && n.fullLines != !1 && e.lineComment(t, l, n);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (!/\bcomment\b/.test(e.getTokenTypeAt(a(t.line, 0)))) {
|
|
79
|
+
var i = Math.min(l.line, e.lastLine());
|
|
80
|
+
i != t.line && l.ch == 0 && s.test(e.getLine(i)) && --i;
|
|
81
|
+
var k = n.padding == null ? " " : n.padding;
|
|
82
|
+
t.line > i || e.operation(function() {
|
|
83
|
+
if (n.fullLines != !1) {
|
|
84
|
+
var f = s.test(e.getLine(i));
|
|
85
|
+
e.replaceRange(k + r, a(i)), e.replaceRange(m + k, a(t.line, 0));
|
|
86
|
+
var d = n.blockCommentLead || g.blockCommentLead;
|
|
87
|
+
if (d != null) for (var c = t.line + 1; c <= i; ++c)
|
|
88
|
+
(c != i || f) && e.replaceRange(d + k, a(c, 0));
|
|
89
|
+
} else {
|
|
90
|
+
var u = F(e.getCursor("to"), l) == 0, h = !e.somethingSelected();
|
|
91
|
+
e.replaceRange(r, l), u && e.setSelection(h ? l : e.getCursor("from"), l), e.replaceRange(m, t);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}), v.defineExtension("uncomment", function(t, l, n) {
|
|
96
|
+
n || (n = C);
|
|
97
|
+
var e = this, g = q(e, t), m = Math.min(l.ch != 0 || l.line == t.line ? l.line : l.line - 1, e.lastLine()), r = Math.min(t.line, m), i = n.lineComment || g.lineComment, k = [], f = n.padding == null ? " " : n.padding, d;
|
|
98
|
+
e: {
|
|
99
|
+
if (!i) break e;
|
|
100
|
+
for (var c = r; c <= m; ++c) {
|
|
101
|
+
var u = e.getLine(c), h = u.indexOf(i);
|
|
102
|
+
if (h > -1 && !/comment/.test(e.getTokenTypeAt(a(c, h + 1))) && (h = -1), h == -1 && s.test(u) || h > -1 && s.test(u.slice(0, h))) break e;
|
|
103
|
+
k.push(u);
|
|
104
|
+
}
|
|
105
|
+
if (e.operation(function() {
|
|
106
|
+
for (var b = r; b <= m; ++b) {
|
|
107
|
+
var x = k[b - r], p = x.indexOf(i), L = p + i.length;
|
|
108
|
+
p < 0 || (x.slice(L, L + f.length) == f && (L += f.length), d = !0, e.replaceRange("", a(b, p), a(b, L)));
|
|
109
|
+
}
|
|
110
|
+
}), d) return !0;
|
|
111
|
+
}
|
|
112
|
+
var o = n.blockCommentStart || g.blockCommentStart, S = n.blockCommentEnd || g.blockCommentEnd;
|
|
113
|
+
if (!o || !S) return !1;
|
|
114
|
+
var M = n.blockCommentLead || g.blockCommentLead, T = e.getLine(r), E = T.indexOf(o);
|
|
115
|
+
if (E == -1) return !1;
|
|
116
|
+
var j = m == r ? T : e.getLine(m), O = j.indexOf(S, m == r ? E + o.length : 0), D = a(r, E + 1), N = a(m, O + 1);
|
|
117
|
+
if (O == -1 || !/comment/.test(e.getTokenTypeAt(D)) || !/comment/.test(e.getTokenTypeAt(N)) || e.getRange(D, N, `
|
|
118
|
+
`).indexOf(S) > -1)
|
|
119
|
+
return !1;
|
|
120
|
+
var y = T.lastIndexOf(o, t.ch), R = y == -1 ? -1 : T.slice(0, t.ch).indexOf(S, y + o.length);
|
|
121
|
+
if (y != -1 && R != -1 && R + S.length != t.ch) return !1;
|
|
122
|
+
R = j.indexOf(S, l.ch);
|
|
123
|
+
var W = j.slice(l.ch).lastIndexOf(o, R - l.ch);
|
|
124
|
+
return y = R == -1 || W == -1 ? -1 : l.ch + W, R != -1 && y != -1 && y != l.ch ? !1 : (e.operation(function() {
|
|
125
|
+
e.replaceRange(
|
|
126
|
+
"",
|
|
127
|
+
a(m, O - (f && j.slice(O - f.length, O) == f ? f.length : 0)),
|
|
128
|
+
a(m, O + S.length)
|
|
129
|
+
);
|
|
130
|
+
var b = E + o.length;
|
|
131
|
+
if (f && T.slice(b, b + f.length) == f && (b += f.length), e.replaceRange("", a(r, E), a(r, b)), M) for (var x = r + 1; x <= m; ++x) {
|
|
132
|
+
var p = e.getLine(x), L = p.indexOf(M);
|
|
133
|
+
if (!(L == -1 || s.test(p.slice(0, L)))) {
|
|
134
|
+
var I = L + M.length;
|
|
135
|
+
f && p.slice(I, I + f.length) == f && (I += f.length), e.replaceRange("", a(x, L), a(x, I));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}), !0);
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}()), $.exports;
|
|
142
|
+
}
|
|
143
|
+
var B = K();
|
|
144
|
+
const Q = /* @__PURE__ */ G(B), X = /* @__PURE__ */ J({
|
|
145
|
+
__proto__: null,
|
|
146
|
+
default: Q
|
|
147
|
+
}, [B]);
|
|
148
|
+
export {
|
|
149
|
+
X as c
|
|
150
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const setGlobalOnFetchResult: (callback?: ((result: any) => void) | undefined) => void;
|
|
3
|
+
interface ExplorerPageProps {
|
|
4
|
+
onEditQuery?: (query: string) => void;
|
|
5
|
+
onFetchResult?: (result: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ExplorerPage: FC<ExplorerPageProps>;
|
|
8
|
+
export default ExplorerPage;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UseHeaderEditorArgs, UseQueryEditorArgs, UseResponseEditorArgs, UseVariableEditorArgs, WriteableEditorProps } from '@graphiql/react';
|
|
2
|
+
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
export type GraphiQLToolbarConfig = {
|
|
4
|
+
/**
|
|
5
|
+
* This content will be rendered after the built-in buttons of the toolbar.
|
|
6
|
+
* Note that this will not apply if you provide a completely custom toolbar
|
|
7
|
+
* (by passing `GraphiQL.Toolbar` as child to the `GraphiQL` component).
|
|
8
|
+
*/
|
|
9
|
+
additionalContent?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* same as above, except a component with access to context
|
|
12
|
+
*/
|
|
13
|
+
additionalComponent?: React.JSXElementConstructor<any>;
|
|
14
|
+
};
|
|
15
|
+
type AddSuffix<Obj extends Record<string, any>, Suffix extends string> = {
|
|
16
|
+
[Key in keyof Obj as `${string & Key}${Suffix}`]: Obj[Key];
|
|
17
|
+
};
|
|
18
|
+
export type GraphiQLInterfaceProps = WriteableEditorProps & AddSuffix<Pick<UseQueryEditorArgs, 'onEdit'>, 'Query'> & Pick<UseQueryEditorArgs, 'onCopyQuery'> & AddSuffix<Pick<UseVariableEditorArgs, 'onEdit'>, 'Variables'> & AddSuffix<Pick<UseHeaderEditorArgs, 'onEdit'>, 'Headers'> & Pick<UseResponseEditorArgs, 'responseTooltip'> & {
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Set the default state for the editor tools.
|
|
22
|
+
* - `false` hides the editor tools
|
|
23
|
+
* - `true` shows the editor tools
|
|
24
|
+
* - `'variables'` specifically shows the variables editor
|
|
25
|
+
* - `'headers'` specifically shows the headers editor
|
|
26
|
+
* By default the editor tools are initially shown when at least one of the
|
|
27
|
+
* editors has contents.
|
|
28
|
+
*/
|
|
29
|
+
defaultEditorToolsVisibility?: boolean | 'variables' | 'headers';
|
|
30
|
+
/**
|
|
31
|
+
* Toggle if the headers editor should be shown inside the editor tools.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
isHeadersEditorEnabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* An object that allows configuration of the toolbar next to the query
|
|
37
|
+
* editor.
|
|
38
|
+
*/
|
|
39
|
+
toolbar?: GraphiQLToolbarConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if settings for persisting headers should appear in the
|
|
42
|
+
* settings modal.
|
|
43
|
+
*/
|
|
44
|
+
showPersistHeadersSettings?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* CSS class to set on the graphiql-container element.
|
|
47
|
+
* @addedBy IBM
|
|
48
|
+
*/
|
|
49
|
+
className?: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function GraphiQLInterface(props: GraphiQLInterfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function GraphiQLToolbar<TProps>(props: PropsWithChildren<TProps>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare namespace GraphiQLToolbar {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function GraphiQLFooter<TProps>(props: PropsWithChildren<TProps>): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare namespace GraphiQLFooter {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const snippets: {
|
|
2
|
+
name: string;
|
|
3
|
+
language: string;
|
|
4
|
+
codeMirrorMode: string;
|
|
5
|
+
codeMirrorImport: () => Promise<any>;
|
|
6
|
+
options: never[];
|
|
7
|
+
generate: (arg: any) => string;
|
|
8
|
+
}[];
|
|
9
|
+
declare const subscriptionSnippets: {
|
|
10
|
+
name: string;
|
|
11
|
+
language: string;
|
|
12
|
+
codeMirrorMode: string;
|
|
13
|
+
codeMirrorImport: () => Promise<any>;
|
|
14
|
+
options: never[];
|
|
15
|
+
generate: (arg: any) => string;
|
|
16
|
+
}[];
|
|
17
|
+
export { snippets, subscriptionSnippets };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ClearTooltip(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Component, ReactNode, MouseEvent } from 'react';
|
|
2
|
+
import { GraphQLSchema, FragmentDefinitionNode, OperationDefinitionNode, OperationTypeNode } from 'graphql';
|
|
3
|
+
export type Variables = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export type Options = Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
initial: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export type OptionValues = {
|
|
12
|
+
[id: string]: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type OperationData = {
|
|
15
|
+
query: string;
|
|
16
|
+
name: string;
|
|
17
|
+
displayName: string;
|
|
18
|
+
type: OperationTypeNode | 'fragment';
|
|
19
|
+
variableName: string;
|
|
20
|
+
variables: Variables;
|
|
21
|
+
operationDefinition: OperationDefinitionNode | FragmentDefinitionNode;
|
|
22
|
+
fragmentDependencies: Array<FragmentDefinitionNode>;
|
|
23
|
+
};
|
|
24
|
+
export type GenerateOptions = {
|
|
25
|
+
serverUrl: string;
|
|
26
|
+
headers: {
|
|
27
|
+
[name: string]: string;
|
|
28
|
+
};
|
|
29
|
+
context: Object;
|
|
30
|
+
operationDataList: Array<OperationData>;
|
|
31
|
+
options: OptionValues;
|
|
32
|
+
schema?: any;
|
|
33
|
+
};
|
|
34
|
+
export type Snippet = {
|
|
35
|
+
options: Options;
|
|
36
|
+
language: string;
|
|
37
|
+
codeMirrorMode: string;
|
|
38
|
+
codeMirrorImport?: () => Promise<void>;
|
|
39
|
+
name: string;
|
|
40
|
+
generate: (options: GenerateOptions) => string;
|
|
41
|
+
};
|
|
42
|
+
export declare const computeOperationDataList: ({ query, variables, }: {
|
|
43
|
+
query: string;
|
|
44
|
+
variables: Variables;
|
|
45
|
+
}) => {
|
|
46
|
+
operationDefinitions: (OperationDefinitionNode | FragmentDefinitionNode)[];
|
|
47
|
+
fragmentDefinitions: FragmentDefinitionNode[];
|
|
48
|
+
rawOperationDataList: OperationData[];
|
|
49
|
+
operationDataList: OperationData[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* ToolbarMenu
|
|
53
|
+
*
|
|
54
|
+
* A menu style button to use within the Toolbar.
|
|
55
|
+
* Copied from GraphiQL: https://github.com/graphql/graphiql/blob/272e2371fc7715217739efd7817ce6343cb4fbec/src/components/ToolbarMenu.js#L16-L80
|
|
56
|
+
*/
|
|
57
|
+
export declare class ToolbarMenu extends Component<{
|
|
58
|
+
title: string;
|
|
59
|
+
label: string;
|
|
60
|
+
children: ReactNode;
|
|
61
|
+
}, {
|
|
62
|
+
visible: boolean;
|
|
63
|
+
}> {
|
|
64
|
+
state: {
|
|
65
|
+
visible: boolean;
|
|
66
|
+
};
|
|
67
|
+
_node: HTMLAnchorElement | null | undefined;
|
|
68
|
+
_listener: ((e: Event) => void) | null | undefined;
|
|
69
|
+
componentWillUnmount(): void;
|
|
70
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
_subscribe(): void;
|
|
72
|
+
_release(): void;
|
|
73
|
+
handleClick(e: Event): void;
|
|
74
|
+
handleOpen: (e: MouseEvent) => void;
|
|
75
|
+
}
|
|
76
|
+
type WrapperProps = {
|
|
77
|
+
query: string;
|
|
78
|
+
serverUrl: string;
|
|
79
|
+
variables: string;
|
|
80
|
+
context?: Object;
|
|
81
|
+
headers?: {
|
|
82
|
+
[name: string]: string;
|
|
83
|
+
};
|
|
84
|
+
snippets: Array<Snippet>;
|
|
85
|
+
snippet?: Snippet;
|
|
86
|
+
codeMirrorTheme: string;
|
|
87
|
+
onSelectSnippet?: (snippet: Snippet) => void;
|
|
88
|
+
onSetOptionValue?: (snippet: Snippet, option: string, value: boolean) => void;
|
|
89
|
+
optionValues?: OptionValues;
|
|
90
|
+
schema?: GraphQLSchema;
|
|
91
|
+
};
|
|
92
|
+
export default function CodeExporterWrapper({ query, serverUrl, variables, context, headers, snippets, snippet, codeMirrorTheme, onSelectSnippet, onSetOptionValue, optionValues, schema, }: WrapperProps): import('react').ReactPortal;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as CodeExporter, computeOperationDataList } from './CodeExporter';
|
|
2
|
+
import { useExporterPlugin } from './useExporterPlugin';
|
|
3
|
+
import { default as capitalizeFirstLetter } from './utils/capitalizeFirstLetter';
|
|
4
|
+
import { default as jsCommentsFactory } from './utils/jsCommentsFactory';
|
|
5
|
+
import { default as snippets } from './snippets/index';
|
|
6
|
+
export type { Snippet, GenerateOptions, OperationData, Options, OptionValues, Variables, } from './CodeExporter';
|
|
7
|
+
export { capitalizeFirstLetter, CodeExporter, computeOperationDataList, jsCommentsFactory, snippets, useExporterPlugin, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
type GraphiQLPlugin = {
|
|
3
|
+
/**
|
|
4
|
+
* A component that renders content into the plugin pane.
|
|
5
|
+
*/
|
|
6
|
+
content: ComponentType;
|
|
7
|
+
/**
|
|
8
|
+
* A component that renders an icon that will be shown inside a button that
|
|
9
|
+
* toggles the plugin visibility.
|
|
10
|
+
*/
|
|
11
|
+
icon: ComponentType;
|
|
12
|
+
/**
|
|
13
|
+
* The unique title of the plugin. If two plugins are present with the same
|
|
14
|
+
* title the provider component will throw an error.
|
|
15
|
+
*/
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
declare function useExporterPlugin(props: any): GraphiQLPlugin;
|
|
19
|
+
export { useExporterPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function capitalizeFirstLetter(string: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OperationData } from '../CodeExporter';
|
|
2
|
+
declare function distinct<T>(array: Array<T>): Array<T>;
|
|
3
|
+
declare function isOperationNamed(operationData: OperationData): boolean;
|
|
4
|
+
declare const findFirstNamedOperation: (operations: Array<OperationData>) => OperationData | undefined;
|
|
5
|
+
declare function addLeftWhitespace(s: string, padding: number): string;
|
|
6
|
+
declare function collapseExtraNewlines(s: string): string;
|
|
7
|
+
export { distinct, findFirstNamedOperation, isOperationNamed, addLeftWhitespace, collapseExtraNewlines, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function commentFactory(commentsEnabled: boolean, comments: Record<string, any>): (id: string) => string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type Environment = {
|
|
3
|
+
instance: string;
|
|
4
|
+
domain: string;
|
|
5
|
+
environment: string;
|
|
6
|
+
};
|
|
7
|
+
type EnvironmentContextProps = {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
environments: Environment[];
|
|
10
|
+
environment?: Environment;
|
|
11
|
+
keys?: {
|
|
12
|
+
isLoading: true;
|
|
13
|
+
data?: never;
|
|
14
|
+
error?: never;
|
|
15
|
+
} | {
|
|
16
|
+
isLoading: false;
|
|
17
|
+
data: {
|
|
18
|
+
apikey: string;
|
|
19
|
+
adminkey: string;
|
|
20
|
+
};
|
|
21
|
+
error?: never;
|
|
22
|
+
} | {
|
|
23
|
+
isLoading: false;
|
|
24
|
+
data?: never;
|
|
25
|
+
error: {
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
setEnvironment: Dispatch<SetStateAction<Environment | undefined>>;
|
|
30
|
+
};
|
|
31
|
+
declare const EnvironmentContext: import('react').Context<EnvironmentContextProps>;
|
|
32
|
+
export declare const envToString: (env?: Environment) => string;
|
|
33
|
+
export declare const isEnvSame: (envA?: Environment, envB?: Environment) => boolean;
|
|
34
|
+
export declare const isEnvListSame: (listA: readonly Environment[], listB: readonly Environment[]) => boolean;
|
|
35
|
+
declare const useEnvironmentUnsafe: () => EnvironmentContextProps;
|
|
36
|
+
declare const useEnvironment: () => Required<EnvironmentContextProps>;
|
|
37
|
+
export { EnvironmentContext, useEnvironment, useEnvironmentUnsafe, type Environment };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StepZenEndpointV2 } from '@stepzen/sdk';
|
|
2
|
+
import { Dispatch, FC, PropsWithChildren, SetStateAction } from 'react';
|
|
3
|
+
import { GraphiQLConfig } from '../types/config';
|
|
4
|
+
export type Endpoint = StepZenEndpointV2 & {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
type EndpointContextProps = {
|
|
8
|
+
endpoint: string;
|
|
9
|
+
endpoints: {
|
|
10
|
+
isLoading: true;
|
|
11
|
+
data?: never;
|
|
12
|
+
isValidating?: never;
|
|
13
|
+
error?: never;
|
|
14
|
+
} | {
|
|
15
|
+
isLoading: false;
|
|
16
|
+
data: Endpoint[];
|
|
17
|
+
isValidating: boolean;
|
|
18
|
+
error?: never;
|
|
19
|
+
} | {
|
|
20
|
+
isLoading: false;
|
|
21
|
+
data?: never;
|
|
22
|
+
isValidating?: never;
|
|
23
|
+
error: {
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
revalidate: () => void;
|
|
28
|
+
setEndpoint: Dispatch<SetStateAction<string>>;
|
|
29
|
+
endpointUrl: string;
|
|
30
|
+
isPublicEndpoint: boolean;
|
|
31
|
+
graphiqlConfig: GraphiQLConfig;
|
|
32
|
+
setGraphiqlConfig: Dispatch<SetStateAction<GraphiQLConfig>>;
|
|
33
|
+
};
|
|
34
|
+
declare const EndpointContext: import('react').Context<EndpointContextProps>;
|
|
35
|
+
declare const EndpointProvider: FC<PropsWithChildren<{
|
|
36
|
+
config: GraphiQLConfig;
|
|
37
|
+
}>>;
|
|
38
|
+
declare const useEndpoint: () => EndpointContextProps;
|
|
39
|
+
export { EndpointContext, EndpointProvider, useEndpoint };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("./index-BeOZF5ut.js"),s=require("./dialog-Dh2DOTOu.js");function c(t,n){for(var o=0;o<n.length;o++){const e=n[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(e,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var a=s.requireDialog();const g=l.getDefaultExportFromCjs(a),u=c({__proto__:null,default:g},[a]);exports.dialog=u;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { r as h } from "./codemirror-DgPcZxSc.mjs";
|
|
2
|
+
var m = { exports: {} }, p;
|
|
3
|
+
function T() {
|
|
4
|
+
return p || (p = 1, function(y, b) {
|
|
5
|
+
(function(n) {
|
|
6
|
+
n(h());
|
|
7
|
+
})(function(n) {
|
|
8
|
+
function r(o, f, e) {
|
|
9
|
+
var u = o.getWrapperElement(), l;
|
|
10
|
+
return l = u.appendChild(document.createElement("div")), e ? l.className = "CodeMirror-dialog CodeMirror-dialog-bottom" : l.className = "CodeMirror-dialog CodeMirror-dialog-top", typeof f == "string" ? l.innerHTML = f : l.appendChild(f), n.addClass(u, "dialog-opened"), l;
|
|
11
|
+
}
|
|
12
|
+
function d(o, f) {
|
|
13
|
+
o.state.currentNotificationClose && o.state.currentNotificationClose(), o.state.currentNotificationClose = f;
|
|
14
|
+
}
|
|
15
|
+
n.defineExtension("openDialog", function(o, f, e) {
|
|
16
|
+
e || (e = {}), d(this, null);
|
|
17
|
+
var u = r(this, o, e.bottom), l = !1, c = this;
|
|
18
|
+
function i(t) {
|
|
19
|
+
if (typeof t == "string")
|
|
20
|
+
a.value = t;
|
|
21
|
+
else {
|
|
22
|
+
if (l) return;
|
|
23
|
+
l = !0, n.rmClass(u.parentNode, "dialog-opened"), u.parentNode.removeChild(u), c.focus(), e.onClose && e.onClose(u);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var a = u.getElementsByTagName("input")[0], s;
|
|
27
|
+
return a ? (a.focus(), e.value && (a.value = e.value, e.selectValueOnOpen !== !1 && a.select()), e.onInput && n.on(a, "input", function(t) {
|
|
28
|
+
e.onInput(t, a.value, i);
|
|
29
|
+
}), e.onKeyUp && n.on(a, "keyup", function(t) {
|
|
30
|
+
e.onKeyUp(t, a.value, i);
|
|
31
|
+
}), n.on(a, "keydown", function(t) {
|
|
32
|
+
e && e.onKeyDown && e.onKeyDown(t, a.value, i) || ((t.keyCode == 27 || e.closeOnEnter !== !1 && t.keyCode == 13) && (a.blur(), n.e_stop(t), i()), t.keyCode == 13 && f(a.value, t));
|
|
33
|
+
}), e.closeOnBlur !== !1 && n.on(u, "focusout", function(t) {
|
|
34
|
+
t.relatedTarget !== null && i();
|
|
35
|
+
})) : (s = u.getElementsByTagName("button")[0]) && (n.on(s, "click", function() {
|
|
36
|
+
i(), c.focus();
|
|
37
|
+
}), e.closeOnBlur !== !1 && n.on(s, "blur", i), s.focus()), i;
|
|
38
|
+
}), n.defineExtension("openConfirm", function(o, f, e) {
|
|
39
|
+
d(this, null);
|
|
40
|
+
var u = r(this, o, e && e.bottom), l = u.getElementsByTagName("button"), c = !1, i = this, a = 1;
|
|
41
|
+
function s() {
|
|
42
|
+
c || (c = !0, n.rmClass(u.parentNode, "dialog-opened"), u.parentNode.removeChild(u), i.focus());
|
|
43
|
+
}
|
|
44
|
+
l[0].focus();
|
|
45
|
+
for (var t = 0; t < l.length; ++t) {
|
|
46
|
+
var v = l[t];
|
|
47
|
+
(function(g) {
|
|
48
|
+
n.on(v, "click", function(N) {
|
|
49
|
+
n.e_preventDefault(N), s(), g && g(i);
|
|
50
|
+
});
|
|
51
|
+
})(f[t]), n.on(v, "blur", function() {
|
|
52
|
+
--a, setTimeout(function() {
|
|
53
|
+
a <= 0 && s();
|
|
54
|
+
}, 200);
|
|
55
|
+
}), n.on(v, "focus", function() {
|
|
56
|
+
++a;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}), n.defineExtension("openNotification", function(o, f) {
|
|
60
|
+
d(this, i);
|
|
61
|
+
var e = r(this, o, f && f.bottom), u = !1, l, c = f && typeof f.duration < "u" ? f.duration : 5e3;
|
|
62
|
+
function i() {
|
|
63
|
+
u || (u = !0, clearTimeout(l), n.rmClass(e.parentNode, "dialog-opened"), e.parentNode.removeChild(e));
|
|
64
|
+
}
|
|
65
|
+
return n.on(e, "click", function(a) {
|
|
66
|
+
n.e_preventDefault(a), i();
|
|
67
|
+
}), c && (l = setTimeout(i, c)), i;
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}()), m.exports;
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
T as r
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("./codemirror-DMBo1i5w.js");var m={exports:{}},p;function y(){return p||(p=1,function(b,D){(function(n){n(h.requireCodemirror())})(function(n){function r(f,o,e){var i=f.getWrapperElement(),a;return a=i.appendChild(document.createElement("div")),e?a.className="CodeMirror-dialog CodeMirror-dialog-bottom":a.className="CodeMirror-dialog CodeMirror-dialog-top",typeof o=="string"?a.innerHTML=o:a.appendChild(o),n.addClass(i,"dialog-opened"),a}function d(f,o){f.state.currentNotificationClose&&f.state.currentNotificationClose(),f.state.currentNotificationClose=o}n.defineExtension("openDialog",function(f,o,e){e||(e={}),d(this,null);var i=r(this,f,e.bottom),a=!1,c=this;function l(t){if(typeof t=="string")u.value=t;else{if(a)return;a=!0,n.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),c.focus(),e.onClose&&e.onClose(i)}}var u=i.getElementsByTagName("input")[0],s;return u?(u.focus(),e.value&&(u.value=e.value,e.selectValueOnOpen!==!1&&u.select()),e.onInput&&n.on(u,"input",function(t){e.onInput(t,u.value,l)}),e.onKeyUp&&n.on(u,"keyup",function(t){e.onKeyUp(t,u.value,l)}),n.on(u,"keydown",function(t){e&&e.onKeyDown&&e.onKeyDown(t,u.value,l)||((t.keyCode==27||e.closeOnEnter!==!1&&t.keyCode==13)&&(u.blur(),n.e_stop(t),l()),t.keyCode==13&&o(u.value,t))}),e.closeOnBlur!==!1&&n.on(i,"focusout",function(t){t.relatedTarget!==null&&l()})):(s=i.getElementsByTagName("button")[0])&&(n.on(s,"click",function(){l(),c.focus()}),e.closeOnBlur!==!1&&n.on(s,"blur",l),s.focus()),l}),n.defineExtension("openConfirm",function(f,o,e){d(this,null);var i=r(this,f,e&&e.bottom),a=i.getElementsByTagName("button"),c=!1,l=this,u=1;function s(){c||(c=!0,n.rmClass(i.parentNode,"dialog-opened"),i.parentNode.removeChild(i),l.focus())}a[0].focus();for(var t=0;t<a.length;++t){var g=a[t];(function(v){n.on(g,"click",function(N){n.e_preventDefault(N),s(),v&&v(l)})})(o[t]),n.on(g,"blur",function(){--u,setTimeout(function(){u<=0&&s()},200)}),n.on(g,"focus",function(){++u})}}),n.defineExtension("openNotification",function(f,o){d(this,l);var e=r(this,f,o&&o.bottom),i=!1,a,c=o&&typeof o.duration<"u"?o.duration:5e3;function l(){i||(i=!0,clearTimeout(a),n.rmClass(e.parentNode,"dialog-opened"),e.parentNode.removeChild(e))}return n.on(e,"click",function(u){n.e_preventDefault(u),l()}),c&&(a=setTimeout(l,c)),l})})}()),m.exports}exports.requireDialog=y;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { g as f } from "./index-Iqk59VQ1.mjs";
|
|
2
|
+
import { r as s } from "./dialog-Ci1bnuc2.mjs";
|
|
3
|
+
function g(t, i) {
|
|
4
|
+
for (var o = 0; o < i.length; o++) {
|
|
5
|
+
const e = i[o];
|
|
6
|
+
if (typeof e != "string" && !Array.isArray(e)) {
|
|
7
|
+
for (const r in e)
|
|
8
|
+
if (r !== "default" && !(r in t)) {
|
|
9
|
+
const a = Object.getOwnPropertyDescriptor(e, r);
|
|
10
|
+
a && Object.defineProperty(t, r, a.get ? a : {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: () => e[r]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
18
|
+
}
|
|
19
|
+
var n = s();
|
|
20
|
+
const l = /* @__PURE__ */ f(n), u = /* @__PURE__ */ g({
|
|
21
|
+
__proto__: null,
|
|
22
|
+
default: l
|
|
23
|
+
}, [n]);
|
|
24
|
+
export {
|
|
25
|
+
u as d
|
|
26
|
+
};
|