@scalar/use-codemirror 0.8.3 → 0.8.5

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @scalar/use-codemirror
2
2
 
3
+ ## 0.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - c6b95ca: chore: upgrade from Vite 4 to Vite 5
8
+
9
+ ## 0.8.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 92a8b9f: chore: update dependencies
14
+ - abfb086: chore: remove unused CodeMirror CSS
15
+
3
16
  ## 0.8.3
4
17
 
5
18
  ### Patch Changes
@@ -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;;aA2GxC,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,CA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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: "scalar-api-client__variable"
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,27 @@ 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: "scalar-api-client__codemirror__wrapper"
26695
+ class: "codemirror-container"
26702
26696
  }, null, 512);
26703
26697
  };
26704
26698
  }
26705
26699
  });
26706
- const CodeMirror_vue_vue_type_style_index_0_lang = "";
26700
+ const _export_sfc = (sfc, props) => {
26701
+ const target = sfc.__vccOpts || sfc;
26702
+ for (const [key, val] of props) {
26703
+ target[key] = val;
26704
+ }
26705
+ return target;
26706
+ };
26707
+ const CodeMirror = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58ba552a"]]);
26707
26708
  export {
26708
- _sfc_main as CodeMirror,
26709
+ CodeMirror,
26709
26710
  colorPicker,
26710
26711
  useCodeMirror,
26711
26712
  yCollab
package/dist/style.css CHANGED
@@ -1,6 +1,5 @@
1
1
 
2
- /** Basics */
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
- .scalar-api-client__codemirror {
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
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "vue",
12
12
  "vue3"
13
13
  ],
14
- "version": "0.8.3",
14
+ "version": "0.8.5",
15
15
  "engines": {
16
16
  "node": ">=18"
17
17
  },
@@ -52,11 +52,11 @@
52
52
  "y-codemirror.next": "^0.3.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@vitejs/plugin-vue": "^4.4.0",
56
- "@vitest/coverage-v8": "^0.34.4",
55
+ "@vitejs/plugin-vue": "^5.0.4",
56
+ "@vitest/coverage-v8": "^1.2.2",
57
57
  "tsc-alias": "^1.8.8",
58
- "vite": "^4.5.2",
59
- "vitest": "^0.34.4",
58
+ "vite": "^5.1.1",
59
+ "vitest": "^1.2.2",
60
60
  "vue": "^3.3.0",
61
61
  "vue-tsc": "^1.8.19"
62
62
  },