@scalar/use-codemirror 0.11.5 → 0.11.7

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,17 @@
1
1
  # @scalar/use-codemirror
2
2
 
3
+ ## 0.11.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 694c1d8: Add explicit newline
8
+
9
+ ## 0.11.6
10
+
11
+ ### Patch Changes
12
+
13
+ - 9e3348a: feat: set placeholder usage
14
+
3
15
  ## 0.11.5
4
16
 
5
17
  ### Patch Changes
@@ -15,14 +15,18 @@ type BaseParameters = {
15
15
  classes?: MaybeRefOrGetter<string[] | undefined>;
16
16
  /** Put the editor into read-only mode */
17
17
  readOnly?: MaybeRefOrGetter<boolean | undefined>;
18
+ /** Disable indent with tab */
19
+ disableTabIndent?: MaybeRefOrGetter<boolean | undefined>;
18
20
  /** Option to show line numbers in the editor */
19
21
  lineNumbers?: MaybeRefOrGetter<boolean | undefined>;
20
22
  withVariables?: MaybeRefOrGetter<boolean | undefined>;
21
23
  disableEnter?: MaybeRefOrGetter<boolean | undefined>;
24
+ disableCloseBrackets?: MaybeRefOrGetter<boolean | undefined>;
22
25
  /** Option to lint and show error in the editor */
23
26
  lint?: MaybeRefOrGetter<boolean | undefined>;
24
27
  onBlur?: (v: string) => void;
25
28
  onFocus?: (v: string) => void;
29
+ placeholder?: MaybeRefOrGetter<string | undefined>;
26
30
  };
27
31
  export type UseCodeMirrorParameters = (BaseParameters & {
28
32
  /** Prefill the content. Will be ignored when a provider is given. */
@@ -1 +1 @@
1
- {"version":3,"file":"useCodeMirror.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeMirror.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EACL,UAAU,EAKX,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,GA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C,eAAO,MAAM,aAAa,WAChB,uBAAuB,KAC9B;IACD,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;CAmInC,CAAA"}
@@ -1,135 +1,141 @@
1
- import { autocompletion as C, closeBrackets as w, completionKeymap as H, closeBracketsKeymap as N } from "@codemirror/autocomplete";
2
- import { indentWithTab as j } from "@codemirror/commands";
3
- import { css as O } from "@codemirror/lang-css";
4
- import { html as T } from "@codemirror/lang-html";
1
+ import { autocompletion as H, completionKeymap as j, closeBrackets as B, closeBracketsKeymap as I } from "@codemirror/autocomplete";
2
+ import { indentWithTab as O, insertNewline as K } from "@codemirror/commands";
3
+ import { css as L } from "@codemirror/lang-css";
4
+ import { html as R } from "@codemirror/lang-html";
5
5
  import { json as V } from "@codemirror/lang-json";
6
- import { yaml as K } from "@codemirror/lang-yaml";
7
- import { syntaxHighlighting as L, defaultHighlightStyle as R, indentOnInput as A, bracketMatching as B } from "@codemirror/language";
8
- import { linter as I } from "@codemirror/lint";
9
- import { StateEffect as z } from "@codemirror/state";
10
- import { EditorView as d, highlightSpecialChars as J, keymap as v, lineNumbers as P } from "@codemirror/view";
11
- import { ref as U, watch as m, onBeforeUnmount as W, toValue as r, computed as q } from "vue";
12
- import { customTheme as D } from "../themes/index.js";
13
- import { variables as G } from "./variables.js";
14
- const u = (e) => "provider" in e && !!r(e.provider), Q = {
6
+ import { yaml as A } from "@codemirror/lang-yaml";
7
+ import { syntaxHighlighting as z, defaultHighlightStyle as J, indentOnInput as P, bracketMatching as v } from "@codemirror/language";
8
+ import { linter as U } from "@codemirror/lint";
9
+ import { StateEffect as W } from "@codemirror/state";
10
+ import { EditorView as h, highlightSpecialChars as q, keymap as u, placeholder as D, lineNumbers as G } from "@codemirror/view";
11
+ import { ref as Q, watch as m, onBeforeUnmount as X, toValue as t, computed as Y } from "vue";
12
+ import { customTheme as Z } from "../themes/index.js";
13
+ import { variables as _ } from "./variables.js";
14
+ const d = (e) => "provider" in e && !!t(e.provider), $ = {
15
15
  key: "Mod-a",
16
16
  run: (e) => (e.dispatch({
17
17
  selection: { anchor: 0, head: e.state.doc.length },
18
18
  scrollIntoView: !1
19
19
  }), !0)
20
- }, le = (e) => {
21
- const o = U(null);
20
+ }, he = (e) => {
21
+ const i = Q(null);
22
22
  m(
23
23
  e.codeMirrorRef,
24
24
  () => {
25
- var t;
26
- (t = o.value) == null || t.destroy(), s();
25
+ var o;
26
+ (o = i.value) == null || o.destroy(), s();
27
27
  },
28
28
  { immediate: !0 }
29
- ), W(() => {
30
- var t;
31
- return (t = o.value) == null ? void 0 : t.destroy();
29
+ ), X(() => {
30
+ var o;
31
+ return (o = i.value) == null ? void 0 : o.destroy();
32
32
  });
33
33
  function s() {
34
34
  if (e.codeMirrorRef.value) {
35
- const t = u(e) ? r(e.provider) : null, h = b({
35
+ const o = d(e) ? t(e.provider) : null, a = E({
36
36
  ...l.value,
37
- provider: t
37
+ provider: o
38
38
  });
39
- o.value = new d({
39
+ i.value = new h({
40
40
  parent: e.codeMirrorRef.value,
41
- extensions: h
42
- }), u(e) || n(r(e.content));
41
+ extensions: a
42
+ }), d(e) || n(t(e.content));
43
43
  }
44
44
  }
45
- const l = q(() => ({
45
+ const l = Y(() => ({
46
46
  onChange: e.onChange,
47
47
  onBlur: e.onBlur,
48
48
  onFocus: e.onFocus,
49
- language: r(e.language),
50
- classes: r(e.classes),
51
- readOnly: r(e.readOnly),
52
- lineNumbers: r(e.lineNumbers),
53
- withVariables: r(e.withVariables),
54
- disableEnter: r(e.withVariables),
55
- withoutTheme: r(e.withoutTheme),
56
- lint: r(e.lint),
57
- additionalExtensions: r(e.extensions)
49
+ disableTabIndent: t(e.disableTabIndent),
50
+ language: t(e.language),
51
+ classes: t(e.classes),
52
+ readOnly: t(e.readOnly),
53
+ lineNumbers: t(e.lineNumbers),
54
+ withVariables: t(e.withVariables),
55
+ disableEnter: t(e.disableEnter),
56
+ disableCloseBrackets: t(e.disableCloseBrackets),
57
+ withoutTheme: t(e.withoutTheme),
58
+ lint: t(e.lint),
59
+ additionalExtensions: t(e.extensions),
60
+ placeholder: t(e.placeholder)
58
61
  }));
59
62
  m(
60
- () => u(e) ? r(e.provider) : null,
63
+ () => d(e) ? t(e.provider) : null,
61
64
  () => {
62
- var t;
63
- u(e) && ((t = o.value) == null || t.destroy(), s());
65
+ var o;
66
+ d(e) && ((o = i.value) == null || o.destroy(), s());
64
67
  }
65
68
  ), m(
66
69
  l,
67
70
  () => {
68
- if (o.value) {
69
- const t = u(e) ? r(e.provider) : null, h = b({
71
+ if (i.value) {
72
+ const o = d(e) ? t(e.provider) : null, a = E({
70
73
  ...l.value,
71
- provider: t
74
+ provider: o
72
75
  });
73
- o.value.dispatch({
74
- effects: z.reconfigure.of(h)
76
+ i.value.dispatch({
77
+ effects: W.reconfigure.of(a)
75
78
  });
76
79
  } else
77
80
  return;
78
81
  },
79
82
  { immediate: !0 }
80
83
  );
81
- const n = (t = "") => {
82
- o.value && o.value.state.doc.toString() !== t && o.value.dispatch({
84
+ const n = (o = "") => {
85
+ i.value && i.value.state.doc.toString() !== o && i.value.dispatch({
83
86
  changes: {
84
87
  from: 0,
85
- to: o.value.state.doc.length,
86
- insert: t
88
+ to: i.value.state.doc.length,
89
+ insert: o
87
90
  },
88
91
  selection: {
89
92
  anchor: Math.min(
90
- o.value.state.selection.main.anchor,
91
- t.length
93
+ i.value.state.selection.main.anchor,
94
+ o.length
92
95
  )
93
96
  }
94
97
  });
95
98
  };
96
99
  return m(
97
- () => r(e.content),
100
+ () => t(e.content),
98
101
  () => {
99
- u(e) || n(r(e.content));
102
+ d(e) || n(t(e.content));
100
103
  },
101
104
  { immediate: !0 }
102
105
  ), {
103
106
  /** Replaces the current content with the given value. */
104
107
  setCodeMirrorContent: n,
105
108
  /** Codemirror instance */
106
- codeMirror: o
109
+ codeMirror: i
107
110
  };
108
- }, p = {
109
- html: T,
111
+ }, y = {
112
+ html: R,
110
113
  json: V,
111
- yaml: K,
112
- css: O
114
+ yaml: A,
115
+ css: L
113
116
  };
114
- function b({
117
+ function E({
115
118
  onChange: e,
116
- onBlur: o,
119
+ onBlur: i,
117
120
  onFocus: s,
118
121
  provider: l,
119
122
  language: n,
120
- classes: t = [],
121
- readOnly: h = !1,
122
- lineNumbers: y = !1,
123
+ classes: o = [],
124
+ readOnly: a = !1,
125
+ lineNumbers: k = !1,
123
126
  withVariables: x = !1,
124
- disableEnter: E = !1,
125
- withoutTheme: M = !1,
126
- lint: S = !1,
127
- additionalExtensions: k = []
127
+ disableEnter: C = !1,
128
+ disableCloseBrackets: M = !1,
129
+ disableTabIndent: S = !1,
130
+ withoutTheme: T = !1,
131
+ lint: N = !1,
132
+ additionalExtensions: w = [],
133
+ placeholder: g
128
134
  }) {
129
- const i = [
130
- J(),
131
- L(R, { fallback: !0 }),
132
- d.theme({
135
+ const r = [
136
+ q(),
137
+ z(J, { fallback: !0 }),
138
+ h.theme({
133
139
  ".cm-line": {
134
140
  lineHeight: "20px"
135
141
  },
@@ -149,51 +155,56 @@ function b({
149
155
  }
150
156
  }),
151
157
  // Listen to updates
152
- d.updateListener.of((c) => {
153
- c.docChanged && (e == null || e(c.state.doc.toString()));
158
+ h.updateListener.of((f) => {
159
+ f.docChanged && (e == null || e(f.state.doc.toString()));
154
160
  }),
155
- d.domEventHandlers({
156
- blur: (c, f) => {
157
- o == null || o(f.state.doc.toString());
161
+ h.domEventHandlers({
162
+ blur: (f, c) => {
163
+ i == null || i(c.state.doc.toString());
158
164
  },
159
- focus: (c, f) => {
160
- s == null || s(f.state.doc.toString());
165
+ focus: (f, c) => {
166
+ s == null || s(c.state.doc.toString());
161
167
  }
162
168
  }),
163
169
  // Add Classes
164
- d.editorAttributes.of({ class: t.join(" ") }),
165
- ...k
170
+ h.editorAttributes.of({ class: o.join(" ") }),
171
+ ...w
166
172
  ];
167
- if (l && i.push(l), M || i.push(D), h ? i.push(d.editable.of(!1)) : i.push(
168
- A(),
169
- B(),
170
- C(),
171
- w(),
172
- v.of([
173
- ...H,
174
- ...N,
175
- j,
176
- Q
173
+ if (l && r.push(l), T || r.push(Z), a ? r.push(h.editable.of(!1)) : (r.push(
174
+ P(),
175
+ v(),
176
+ H(),
177
+ u.of([...j, $]),
178
+ v()
179
+ ), M || r.push(B(), u.of([...I])), S ? r.push(
180
+ u.of([
181
+ {
182
+ key: "Tab",
183
+ run: () => !1,
184
+ // Prevent default Tab behavior
185
+ shift: () => !1
186
+ // Prevent default Shift+Tab behavior
187
+ }
177
188
  ])
178
- ), n && p[n] && i.push(p[n]()), S && n === "json") {
179
- const c = I((f) => {
180
- const a = [];
189
+ ) : r.push(u.of([O]))), g && r.push(D(g)), n && y[n] && r.push(y[n]()), N && n === "json") {
190
+ const f = U((c) => {
191
+ const p = [];
181
192
  try {
182
- JSON.parse(f.state.doc.toString());
183
- } catch (g) {
184
- g instanceof Error && a.push({
193
+ JSON.parse(c.state.doc.toString());
194
+ } catch (b) {
195
+ b instanceof Error && p.push({
185
196
  from: 0,
186
- to: f.state.doc.length,
197
+ to: c.state.doc.length,
187
198
  severity: "error",
188
- message: g.message
199
+ message: b.message
189
200
  });
190
201
  }
191
- return a;
202
+ return p;
192
203
  });
193
- i.push(c);
204
+ r.push(f);
194
205
  }
195
- return y && i.push(P()), x && i.push(G()), E && i.push(
196
- v.of([
206
+ return k && r.push(G()), x && r.push(_()), C ? r.push(
207
+ u.of([
197
208
  {
198
209
  key: "Enter",
199
210
  run: () => !0
@@ -208,8 +219,15 @@ function b({
208
219
  run: () => !0
209
220
  }
210
221
  ])
211
- ), i;
222
+ ) : r.push(
223
+ u.of([
224
+ {
225
+ key: "Enter",
226
+ run: K
227
+ }
228
+ ])
229
+ ), r;
212
230
  }
213
231
  export {
214
- le as useCodeMirror
232
+ he as useCodeMirror
215
233
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export { type Extension } from '@codemirror/state';
1
+ export { type Extension, RangeSetBuilder, StateEffect } from '@codemirror/state';
2
2
  export { yCollab } from 'y-codemirror.next';
3
3
  export { colorPicker } from '@replit/codemirror-css-color-picker';
4
+ export { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate, WidgetType, } from '@codemirror/view';
4
5
  export { CodeMirror } from './components/CodeMirror';
5
6
  export * from './hooks';
6
7
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAEjE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EACV,UAAU,EACV,KAAK,UAAU,EACf,UAAU,GACX,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,10 +1,18 @@
1
- import { yCollab as e } from "y-codemirror.next";
2
- import { colorPicker as t } from "@replit/codemirror-css-color-picker";
3
- import { default as m } from "./components/CodeMirror/CodeMirror.vue.js";
4
- import { useCodeMirror as x } from "./hooks/useCodeMirror.js";
1
+ import { RangeSetBuilder as e, StateEffect as t } from "@codemirror/state";
2
+ import { yCollab as f } from "y-codemirror.next";
3
+ import { colorPicker as a } from "@replit/codemirror-css-color-picker";
4
+ import { Decoration as l, EditorView as m, ViewPlugin as x, WidgetType as c } from "@codemirror/view";
5
+ import { default as g } from "./components/CodeMirror/CodeMirror.vue.js";
6
+ import { useCodeMirror as C } from "./hooks/useCodeMirror.js";
5
7
  export {
6
- m as CodeMirror,
7
- t as colorPicker,
8
- x as useCodeMirror,
9
- e as yCollab
8
+ g as CodeMirror,
9
+ l as Decoration,
10
+ m as EditorView,
11
+ e as RangeSetBuilder,
12
+ t as StateEffect,
13
+ x as ViewPlugin,
14
+ c as WidgetType,
15
+ a as colorPicker,
16
+ C as useCodeMirror,
17
+ f as yCollab
10
18
  };
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "vue",
17
17
  "vue3"
18
18
  ],
19
- "version": "0.11.5",
19
+ "version": "0.11.7",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -51,7 +51,7 @@
51
51
  "@replit/codemirror-css-color-picker": "^6.1.0",
52
52
  "@uiw/codemirror-themes": "^4.21.21",
53
53
  "codemirror": "^6.0.0",
54
- "vue": "^3.4.22"
54
+ "vue": "^3.4.29"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@vitejs/plugin-vue": "^5.0.4",
@@ -59,11 +59,11 @@
59
59
  "tsc-alias": "^1.8.8",
60
60
  "vite": "^5.2.10",
61
61
  "vitest": "^1.6.0",
62
- "vue": "^3.4.22",
62
+ "vue": "^3.4.29",
63
63
  "vue-tsc": "^2.0.13",
64
64
  "y-codemirror.next": "^0.3.2",
65
65
  "yjs": "^13.6.0",
66
- "@scalar/build-tooling": "0.1.9"
66
+ "@scalar/build-tooling": "0.1.10"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",