@scalar/use-codemirror 0.8.3 → 0.8.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/CHANGELOG.md +7 -0
- package/dist/components/CodeMirror/CodeMirror.vue.d.ts.map +1 -1
- package/dist/index.js +14 -11
- package/dist/style.css +6 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;;
|
|
1
|
+
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeMirror/CodeMirror.vue.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;;aAqGxC,MAAM,GAAG,SAAS;;;;;;;;;;;;aAAlB,MAAM,GAAG,SAAS;;;;;;;;;;;;kBAMZ,OAAO;;AAR1B,wBAeG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26419,7 +26419,7 @@ const variableHighlighterDecoration = new MatchDecorator({
|
|
|
26419
26419
|
regexp: /(\{[^}]+\})/g,
|
|
26420
26420
|
decoration: () => Decoration.mark({
|
|
26421
26421
|
attributes: {
|
|
26422
|
-
class: "
|
|
26422
|
+
class: "api-client-url-variable"
|
|
26423
26423
|
}
|
|
26424
26424
|
})
|
|
26425
26425
|
});
|
|
@@ -26675,12 +26675,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26675
26675
|
emits: ["change"],
|
|
26676
26676
|
setup(__props, { emit }) {
|
|
26677
26677
|
const props = __props;
|
|
26678
|
-
const classes = computed(
|
|
26679
|
-
() => props.readOnly ? [
|
|
26680
|
-
"scalar-api-client__codemirror",
|
|
26681
|
-
"scalar-api-client__codemirror--read-only"
|
|
26682
|
-
] : ["scalar-api-client__codemirror"]
|
|
26683
|
-
);
|
|
26684
26678
|
const codeMirrorRef = ref(null);
|
|
26685
26679
|
useCodeMirror({
|
|
26686
26680
|
content: toRef(() => props.content),
|
|
@@ -26692,20 +26686,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26692
26686
|
disableEnter: toRef(() => props.disableEnter),
|
|
26693
26687
|
onChange: (v) => emit("change", v || ""),
|
|
26694
26688
|
codeMirrorRef,
|
|
26695
|
-
classes
|
|
26689
|
+
classes: ["codemirror"]
|
|
26696
26690
|
});
|
|
26697
26691
|
return (_ctx, _cache) => {
|
|
26698
26692
|
return openBlock(), createElementBlock("div", {
|
|
26699
26693
|
ref_key: "codeMirrorRef",
|
|
26700
26694
|
ref: codeMirrorRef,
|
|
26701
|
-
class: "
|
|
26695
|
+
class: "codemirror-container"
|
|
26702
26696
|
}, null, 512);
|
|
26703
26697
|
};
|
|
26704
26698
|
}
|
|
26705
26699
|
});
|
|
26706
|
-
const
|
|
26700
|
+
const CodeMirror_vue_vue_type_style_index_0_scoped_58ba552a_lang = "";
|
|
26701
|
+
const CodeMirror_vue_vue_type_style_index_1_lang = "";
|
|
26702
|
+
const _export_sfc = (sfc, props) => {
|
|
26703
|
+
const target = sfc.__vccOpts || sfc;
|
|
26704
|
+
for (const [key, val] of props) {
|
|
26705
|
+
target[key] = val;
|
|
26706
|
+
}
|
|
26707
|
+
return target;
|
|
26708
|
+
};
|
|
26709
|
+
const CodeMirror = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58ba552a"]]);
|
|
26707
26710
|
export {
|
|
26708
|
-
|
|
26711
|
+
CodeMirror,
|
|
26709
26712
|
colorPicker,
|
|
26710
26713
|
useCodeMirror,
|
|
26711
26714
|
yCollab
|
package/dist/style.css
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
.scalar-api-client__codemirror__wrapper {
|
|
2
|
+
.codemirror-container[data-v-58ba552a] {
|
|
4
3
|
width: 100%;
|
|
5
4
|
height: 100%;
|
|
6
5
|
padding-top: 4px;
|
|
@@ -10,7 +9,11 @@
|
|
|
10
9
|
display: flex;
|
|
11
10
|
align-items: stretch;
|
|
12
11
|
}
|
|
13
|
-
.
|
|
12
|
+
.copy-to-clipboard-button[data-v-58ba552a] {
|
|
13
|
+
background: red;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.codemirror {
|
|
14
17
|
flex-grow: 1;
|
|
15
18
|
max-width: 100%;
|
|
16
19
|
cursor: text;
|
|
@@ -18,19 +21,6 @@
|
|
|
18
21
|
/* Don't scale wide text on mobile because we let it scroll */
|
|
19
22
|
-webkit-text-size-adjust: 100%;
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
/** URL input */
|
|
23
|
-
.scalar-api-client__url-input {
|
|
24
|
-
font-weight: var(--theme-semibold, var(--default-theme-semibold));
|
|
25
|
-
min-height: auto;
|
|
26
|
-
padding-top: 0;
|
|
27
|
-
}
|
|
28
|
-
.scalar-api-client__url-input .ͼ1 .cm-scroller {
|
|
29
|
-
align-items: center !important;
|
|
30
|
-
}
|
|
31
|
-
.scalar-api-client__variable {
|
|
32
|
-
color: var(--scalar-api-client-color, var(--default-scalar-api-client-color));
|
|
33
|
-
}
|
|
34
24
|
.cm-focused {
|
|
35
25
|
outline: none !important;
|
|
36
26
|
}
|