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,11 @@
|
|
|
1
|
+
import { C as a, G as t, M as r, T as C, c as T, p as g, s as i, v as o } from "./index-Iqk59VQ1.mjs";
|
|
2
|
+
export {
|
|
3
|
+
a as CloseCode,
|
|
4
|
+
t as GRAPHQL_TRANSPORT_WS_PROTOCOL,
|
|
5
|
+
r as MessageType,
|
|
6
|
+
C as TerminatedCloseEvent,
|
|
7
|
+
T as createClient,
|
|
8
|
+
g as parseMessage,
|
|
9
|
+
i as stringifyMessage,
|
|
10
|
+
o as validateMessage
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BeOZF5ut.js");exports.GraphiQLExplorer=e.GraphiQLExplorer;
|
package/dist/index.d.ts
ADDED
package/dist/index.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./codemirror-Kv5dN_jU.js"),m=require("./SchemaReference-DKgkDdcV.js");require("./info-addon-BppfpWGs.js");const s=require("./index-BeOZF5ut.js");p.CodeMirror.registerHelper("info","graphql",(r,n)=>{var c;if(!n.schema||!r.state)return;const{kind:e,step:a}=r.state,i=m.getTypeInfo(n.schema,r.state);if(e==="Field"&&a===0&&i.fieldDef||e==="AliasedField"&&a===2&&i.fieldDef||e==="ObjectField"&&a===0&&i.fieldDef){const d=document.createElement("div");d.className="CodeMirror-info-header",v(d,i,n);const t=document.createElement("div");return t.append(d),u(t,n,i.fieldDef),t}if(e==="Directive"&&a===1&&i.directiveDef){const d=document.createElement("div");d.className="CodeMirror-info-header",E(d,i,n);const t=document.createElement("div");return t.append(d),u(t,n,i.directiveDef),t}if(e==="Argument"&&a===0&&i.argDef){const d=document.createElement("div");d.className="CodeMirror-info-header",N(d,i,n);const t=document.createElement("div");return t.append(d),u(t,n,i.argDef),t}if(e==="EnumValue"&&(!((c=i.enumValue)===null||c===void 0)&&c.description)){const d=document.createElement("div");d.className="CodeMirror-info-header",h(d,i,n);const t=document.createElement("div");return t.append(d),u(t,n,i.enumValue),t}if(e==="NamedType"&&i.type&&i.type.description){const d=document.createElement("div");d.className="CodeMirror-info-header",o(d,i,n,i.type);const t=document.createElement("div");return t.append(d),u(t,n,i.type),t}});function v(r,n,c){D(r,n,c),f(r,n,c,n.type)}function D(r,n,c){var e;const a=((e=n.fieldDef)===null||e===void 0?void 0:e.name)||"";l(r,a,"field-name",c,m.getFieldReference(n))}function E(r,n,c){var e;const a="@"+(((e=n.directiveDef)===null||e===void 0?void 0:e.name)||"");l(r,a,"directive-name",c,m.getDirectiveReference(n))}function N(r,n,c){var e;const a=((e=n.argDef)===null||e===void 0?void 0:e.name)||"";l(r,a,"arg-name",c,m.getArgumentReference(n)),f(r,n,c,n.inputType)}function h(r,n,c){var e;const a=((e=n.enumValue)===null||e===void 0?void 0:e.name)||"";o(r,n,c,n.inputType),l(r,"."),l(r,a,"enum-value",c,m.getEnumValueReference(n))}function f(r,n,c,e){const a=document.createElement("span");a.className="type-name-pill",e instanceof s.GraphQLNonNull?(o(a,n,c,e.ofType),l(a,"!")):e instanceof s.GraphQLList?(l(a,"["),o(a,n,c,e.ofType),l(a,"]")):l(a,(e==null?void 0:e.name)||"","type-name",c,m.getTypeReference(n,e)),r.append(a)}function o(r,n,c,e){e instanceof s.GraphQLNonNull?(o(r,n,c,e.ofType),l(r,"!")):e instanceof s.GraphQLList?(l(r,"["),o(r,n,c,e.ofType),l(r,"]")):l(r,(e==null?void 0:e.name)||"","type-name",c,m.getTypeReference(n,e))}function u(r,n,c){const{description:e}=c;if(e){const a=document.createElement("div");a.className="info-description",n.renderDescription?a.innerHTML=n.renderDescription(e):a.append(document.createTextNode(e)),r.append(a)}T(r,n,c)}function T(r,n,c){const e=c.deprecationReason;if(e){const a=document.createElement("div");a.className="info-deprecation",r.append(a);const i=document.createElement("span");i.className="info-deprecation-label",i.append(document.createTextNode("Deprecated")),a.append(i);const d=document.createElement("div");d.className="info-deprecation-reason",n.renderDescription?d.innerHTML=n.renderDescription(e):d.append(document.createTextNode(e)),a.append(d)}}function l(r,n,c="",e={onClick:null},a=null){if(c){const{onClick:i}=e;let d;i?(d=document.createElement("a"),d.href="javascript:void 0",d.addEventListener("click",t=>{t.preventDefault(),i(a,t)})):d=document.createElement("span"),d.className=c,d.append(document.createTextNode(n)),r.append(d)}else r.append(document.createTextNode(n))}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { C as v } from "./codemirror-CxfyhJc1.mjs";
|
|
2
|
+
import { g as D, a as E, b as N, c as T, d as s, e as g } from "./SchemaReference-94TE3IPs.mjs";
|
|
3
|
+
import "./info-addon-jclzOzZb.mjs";
|
|
4
|
+
import { b as u, d as f } from "./index-Iqk59VQ1.mjs";
|
|
5
|
+
v.registerHelper("info", "graphql", (a, n) => {
|
|
6
|
+
var d;
|
|
7
|
+
if (!n.schema || !a.state)
|
|
8
|
+
return;
|
|
9
|
+
const { kind: e, step: r } = a.state, i = D(n.schema, a.state);
|
|
10
|
+
if (e === "Field" && r === 0 && i.fieldDef || e === "AliasedField" && r === 2 && i.fieldDef || e === "ObjectField" && r === 0 && i.fieldDef) {
|
|
11
|
+
const c = document.createElement("div");
|
|
12
|
+
c.className = "CodeMirror-info-header", h(c, i, n);
|
|
13
|
+
const t = document.createElement("div");
|
|
14
|
+
return t.append(c), o(t, n, i.fieldDef), t;
|
|
15
|
+
}
|
|
16
|
+
if (e === "Directive" && r === 1 && i.directiveDef) {
|
|
17
|
+
const c = document.createElement("div");
|
|
18
|
+
c.className = "CodeMirror-info-header", M(c, i, n);
|
|
19
|
+
const t = document.createElement("div");
|
|
20
|
+
return t.append(c), o(t, n, i.directiveDef), t;
|
|
21
|
+
}
|
|
22
|
+
if (e === "Argument" && r === 0 && i.argDef) {
|
|
23
|
+
const c = document.createElement("div");
|
|
24
|
+
c.className = "CodeMirror-info-header", y(c, i, n);
|
|
25
|
+
const t = document.createElement("div");
|
|
26
|
+
return t.append(c), o(t, n, i.argDef), t;
|
|
27
|
+
}
|
|
28
|
+
if (e === "EnumValue" && (!((d = i.enumValue) === null || d === void 0) && d.description)) {
|
|
29
|
+
const c = document.createElement("div");
|
|
30
|
+
c.className = "CodeMirror-info-header", x(c, i, n);
|
|
31
|
+
const t = document.createElement("div");
|
|
32
|
+
return t.append(c), o(t, n, i.enumValue), t;
|
|
33
|
+
}
|
|
34
|
+
if (e === "NamedType" && i.type && i.type.description) {
|
|
35
|
+
const c = document.createElement("div");
|
|
36
|
+
c.className = "CodeMirror-info-header", m(c, i, n, i.type);
|
|
37
|
+
const t = document.createElement("div");
|
|
38
|
+
return t.append(c), o(t, n, i.type), t;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
function h(a, n, d) {
|
|
42
|
+
C(a, n, d), p(a, n, d, n.type);
|
|
43
|
+
}
|
|
44
|
+
function C(a, n, d) {
|
|
45
|
+
var e;
|
|
46
|
+
const r = ((e = n.fieldDef) === null || e === void 0 ? void 0 : e.name) || "";
|
|
47
|
+
l(a, r, "field-name", d, E(n));
|
|
48
|
+
}
|
|
49
|
+
function M(a, n, d) {
|
|
50
|
+
var e;
|
|
51
|
+
const r = "@" + (((e = n.directiveDef) === null || e === void 0 ? void 0 : e.name) || "");
|
|
52
|
+
l(a, r, "directive-name", d, g(n));
|
|
53
|
+
}
|
|
54
|
+
function y(a, n, d) {
|
|
55
|
+
var e;
|
|
56
|
+
const r = ((e = n.argDef) === null || e === void 0 ? void 0 : e.name) || "";
|
|
57
|
+
l(a, r, "arg-name", d, N(n)), p(a, n, d, n.inputType);
|
|
58
|
+
}
|
|
59
|
+
function x(a, n, d) {
|
|
60
|
+
var e;
|
|
61
|
+
const r = ((e = n.enumValue) === null || e === void 0 ? void 0 : e.name) || "";
|
|
62
|
+
m(a, n, d, n.inputType), l(a, "."), l(a, r, "enum-value", d, T(n));
|
|
63
|
+
}
|
|
64
|
+
function p(a, n, d, e) {
|
|
65
|
+
const r = document.createElement("span");
|
|
66
|
+
r.className = "type-name-pill", e instanceof u ? (m(r, n, d, e.ofType), l(r, "!")) : e instanceof f ? (l(r, "["), m(r, n, d, e.ofType), l(r, "]")) : l(r, (e == null ? void 0 : e.name) || "", "type-name", d, s(n, e)), a.append(r);
|
|
67
|
+
}
|
|
68
|
+
function m(a, n, d, e) {
|
|
69
|
+
e instanceof u ? (m(a, n, d, e.ofType), l(a, "!")) : e instanceof f ? (l(a, "["), m(a, n, d, e.ofType), l(a, "]")) : l(a, (e == null ? void 0 : e.name) || "", "type-name", d, s(n, e));
|
|
70
|
+
}
|
|
71
|
+
function o(a, n, d) {
|
|
72
|
+
const { description: e } = d;
|
|
73
|
+
if (e) {
|
|
74
|
+
const r = document.createElement("div");
|
|
75
|
+
r.className = "info-description", n.renderDescription ? r.innerHTML = n.renderDescription(e) : r.append(document.createTextNode(e)), a.append(r);
|
|
76
|
+
}
|
|
77
|
+
F(a, n, d);
|
|
78
|
+
}
|
|
79
|
+
function F(a, n, d) {
|
|
80
|
+
const e = d.deprecationReason;
|
|
81
|
+
if (e) {
|
|
82
|
+
const r = document.createElement("div");
|
|
83
|
+
r.className = "info-deprecation", a.append(r);
|
|
84
|
+
const i = document.createElement("span");
|
|
85
|
+
i.className = "info-deprecation-label", i.append(document.createTextNode("Deprecated")), r.append(i);
|
|
86
|
+
const c = document.createElement("div");
|
|
87
|
+
c.className = "info-deprecation-reason", n.renderDescription ? c.innerHTML = n.renderDescription(e) : c.append(document.createTextNode(e)), r.append(c);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function l(a, n, d = "", e = { onClick: null }, r = null) {
|
|
91
|
+
if (d) {
|
|
92
|
+
const { onClick: i } = e;
|
|
93
|
+
let c;
|
|
94
|
+
i ? (c = document.createElement("a"), c.href = "javascript:void 0", c.addEventListener("click", (t) => {
|
|
95
|
+
t.preventDefault(), i(r, t);
|
|
96
|
+
})) : c = document.createElement("span"), c.className = d, c.append(document.createTextNode(n)), a.append(c);
|
|
97
|
+
} else
|
|
98
|
+
a.append(document.createTextNode(n));
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./codemirror-Kv5dN_jU.js");r.CodeMirror.defineOption("info",!1,(e,t,n)=>{if(n&&n!==r.CodeMirror.Init){const o=e.state.info.onMouseOver;r.CodeMirror.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=g.bind(null,e),r.CodeMirror.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}function M(e){const{options:t}=e.state.info;return(t==null?void 0:t.hoverTime)||500}function g(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const u=o.getBoundingClientRect(),i=function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,p)},s=function(){r.CodeMirror.off(document,"mousemove",i),r.CodeMirror.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},f=function(){r.CodeMirror.off(document,"mousemove",i),r.CodeMirror.off(e.getWrapperElement(),"mouseout",s),n.hoverTimeout=void 0,T(e,u)},p=M(e);n.hoverTimeout=setTimeout(f,p),r.CodeMirror.on(document,"mousemove",i),r.CodeMirror.on(e.getWrapperElement(),"mouseout",s)}function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2},"window"),o=e.state.info,{options:u}=o,i=u.render||e.getHelper(n,"info");if(i){const s=e.getTokenAt(n,!0);if(s){const f=i(s,u,e,n);f&&h(e,t,f)}}}function h(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.append(n),document.body.append(o);const u=o.getBoundingClientRect(),i=window.getComputedStyle(o),s=u.right-u.left+parseFloat(i.marginLeft)+parseFloat(i.marginRight),f=u.bottom-u.top+parseFloat(i.marginTop)+parseFloat(i.marginBottom);let p=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(p=t.top-f),p<0&&(p=t.bottom);let a=Math.max(0,window.innerWidth-s-15);a>t.left&&(a=t.left),o.style.opacity="1",o.style.top=p+"px",o.style.left=a+"px";let m;const l=function(){clearTimeout(m)},d=function(){clearTimeout(m),m=setTimeout(c,200)},c=function(){r.CodeMirror.off(o,"mouseover",l),r.CodeMirror.off(o,"mouseout",d),r.CodeMirror.off(e.getWrapperElement(),"mouseout",d),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.remove()},600)):o.parentNode&&o.remove()};r.CodeMirror.on(o,"mouseover",l),r.CodeMirror.on(o,"mouseout",d),r.CodeMirror.on(e.getWrapperElement(),"mouseout",d)}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { C as i } from "./codemirror-CxfyhJc1.mjs";
|
|
2
|
+
i.defineOption("info", !1, (e, t, n) => {
|
|
3
|
+
if (n && n !== i.Init) {
|
|
4
|
+
const o = e.state.info.onMouseOver;
|
|
5
|
+
i.off(e.getWrapperElement(), "mouseover", o), clearTimeout(e.state.info.hoverTimeout), delete e.state.info;
|
|
6
|
+
}
|
|
7
|
+
if (t) {
|
|
8
|
+
const o = e.state.info = v(t);
|
|
9
|
+
o.onMouseOver = T.bind(null, e), i.on(e.getWrapperElement(), "mouseover", o.onMouseOver);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
function v(e) {
|
|
13
|
+
return {
|
|
14
|
+
options: e instanceof Function ? { render: e } : e === !0 ? {} : e
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function g(e) {
|
|
18
|
+
const { options: t } = e.state.info;
|
|
19
|
+
return (t == null ? void 0 : t.hoverTime) || 500;
|
|
20
|
+
}
|
|
21
|
+
function T(e, t) {
|
|
22
|
+
const n = e.state.info, o = t.target || t.srcElement;
|
|
23
|
+
if (!(o instanceof HTMLElement) || o.nodeName !== "SPAN" || n.hoverTimeout !== void 0)
|
|
24
|
+
return;
|
|
25
|
+
const u = o.getBoundingClientRect(), r = function() {
|
|
26
|
+
clearTimeout(n.hoverTimeout), n.hoverTimeout = setTimeout(f, p);
|
|
27
|
+
}, s = function() {
|
|
28
|
+
i.off(document, "mousemove", r), i.off(e.getWrapperElement(), "mouseout", s), clearTimeout(n.hoverTimeout), n.hoverTimeout = void 0;
|
|
29
|
+
}, f = function() {
|
|
30
|
+
i.off(document, "mousemove", r), i.off(e.getWrapperElement(), "mouseout", s), n.hoverTimeout = void 0, h(e, u);
|
|
31
|
+
}, p = g(e);
|
|
32
|
+
n.hoverTimeout = setTimeout(f, p), i.on(document, "mousemove", r), i.on(e.getWrapperElement(), "mouseout", s);
|
|
33
|
+
}
|
|
34
|
+
function h(e, t) {
|
|
35
|
+
const n = e.coordsChar({
|
|
36
|
+
left: (t.left + t.right) / 2,
|
|
37
|
+
top: (t.top + t.bottom) / 2
|
|
38
|
+
}, "window"), o = e.state.info, { options: u } = o, r = u.render || e.getHelper(n, "info");
|
|
39
|
+
if (r) {
|
|
40
|
+
const s = e.getTokenAt(n, !0);
|
|
41
|
+
if (s) {
|
|
42
|
+
const f = r(s, u, e, n);
|
|
43
|
+
f && M(e, t, f);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function M(e, t, n) {
|
|
48
|
+
const o = document.createElement("div");
|
|
49
|
+
o.className = "CodeMirror-info", o.append(n), document.body.append(o);
|
|
50
|
+
const u = o.getBoundingClientRect(), r = window.getComputedStyle(o), s = u.right - u.left + parseFloat(r.marginLeft) + parseFloat(r.marginRight), f = u.bottom - u.top + parseFloat(r.marginTop) + parseFloat(r.marginBottom);
|
|
51
|
+
let p = t.bottom;
|
|
52
|
+
f > window.innerHeight - t.bottom - 15 && t.top > window.innerHeight - t.bottom && (p = t.top - f), p < 0 && (p = t.bottom);
|
|
53
|
+
let m = Math.max(0, window.innerWidth - s - 15);
|
|
54
|
+
m > t.left && (m = t.left), o.style.opacity = "1", o.style.top = p + "px", o.style.left = m + "px";
|
|
55
|
+
let l;
|
|
56
|
+
const c = function() {
|
|
57
|
+
clearTimeout(l);
|
|
58
|
+
}, a = function() {
|
|
59
|
+
clearTimeout(l), l = setTimeout(d, 200);
|
|
60
|
+
}, d = function() {
|
|
61
|
+
i.off(o, "mouseover", c), i.off(o, "mouseout", a), i.off(e.getWrapperElement(), "mouseout", a), o.style.opacity ? (o.style.opacity = "0", setTimeout(() => {
|
|
62
|
+
o.parentNode && o.remove();
|
|
63
|
+
}, 600)) : o.parentNode && o.remove();
|
|
64
|
+
};
|
|
65
|
+
i.on(o, "mouseover", c), i.on(o, "mouseout", a), i.on(e.getWrapperElement(), "mouseout", a);
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./index-BeOZF5ut.js"),n=require("./javascript-poxRzxcy.js");function p(t,s){for(var a=0;a<s.length;a++){const e=s[a];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const o=Object.getOwnPropertyDescriptor(e,r);o&&Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=n.requireJavascript();const u=i.getDefaultExportFromCjs(c),f=p({__proto__:null,default:u},[c]);exports.javascript=f;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { g as c } from "./index-Iqk59VQ1.mjs";
|
|
2
|
+
import { r as n } from "./javascript-RO_jaPiE.mjs";
|
|
3
|
+
function p(t, s) {
|
|
4
|
+
for (var o = 0; o < s.length; o++) {
|
|
5
|
+
const r = s[o];
|
|
6
|
+
if (typeof r != "string" && !Array.isArray(r)) {
|
|
7
|
+
for (const e in r)
|
|
8
|
+
if (e !== "default" && !(e in t)) {
|
|
9
|
+
const a = Object.getOwnPropertyDescriptor(r, e);
|
|
10
|
+
a && Object.defineProperty(t, e, a.get ? a : {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: () => r[e]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
18
|
+
}
|
|
19
|
+
var i = n();
|
|
20
|
+
const f = /* @__PURE__ */ c(i), l = /* @__PURE__ */ p({
|
|
21
|
+
__proto__: null,
|
|
22
|
+
default: f
|
|
23
|
+
}, [i]);
|
|
24
|
+
export {
|
|
25
|
+
l as j
|
|
26
|
+
};
|