codemirror-foldable-indentation-guides 1.0.2 → 1.0.3

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 CHANGED
@@ -13,7 +13,7 @@ Utilizes [@replit/codemirror-indentation-markers](https://github.com/replit/code
13
13
  import { basicSetup } from 'codemirror';
14
14
  import { EditorState } from '@codemirror/state';
15
15
  import { EditorView } from '@codemirror/view';
16
- import { indentationMarkers } from '@replit/codemirror-indentation-markers';
16
+ import { foldableIndentationGuides } from 'codemirror-foldable-indentation-guides';
17
17
 
18
18
  const doc = `
19
19
  def max(a, b):
@@ -26,7 +26,7 @@ def max(a, b):
26
26
  new EditorView({
27
27
  state: EditorState.create({
28
28
  doc,
29
- extensions: [basicSetup, indentationMarkers()],
29
+ extensions: [basicSetup, foldableIndentationGuides()],
30
30
  }),
31
31
  parent: document.querySelector('#editor'),
32
32
  });
@@ -34,7 +34,7 @@ new EditorView({
34
34
 
35
35
  ### Options
36
36
 
37
- You can provide an options object to `indentationMarkers()` with the following
37
+ You can provide an options object to `foldableIndentationGuides()` with the following
38
38
  optional properties:
39
39
 
40
40
  - `highlightActiveMarker`
@@ -141,7 +141,7 @@ new EditorView({
141
141
  doc,
142
142
  extensions: [
143
143
  basicSetup,
144
- indentationMarkers({
144
+ foldableIndentationGuides({
145
145
  highlightActiveBlock: false,
146
146
  hideFirstIndent: true,
147
147
  markerType: 'codeOnly',
package/dev/index.ts CHANGED
@@ -180,14 +180,14 @@ const indentConf = new Compartment();
180
180
 
181
181
  const view = new EditorView({
182
182
  state: EditorState.create({
183
- doc: cppDoc,
183
+ doc: jsDoc,
184
184
  extensions: [
185
185
  basicSetup,
186
- cpp(),
186
+ // cpp(),
187
187
  // css(),
188
188
  // html(),
189
189
  // python(),
190
- // javascript(),
190
+ javascript(),
191
191
  indentConf.of(indentUnit.of(' ')),
192
192
  foldableIndentationGuides({
193
193
  additionalPadding: 4,
@@ -196,10 +196,11 @@ const view = new EditorView({
196
196
  highlightHoveredBlockBackground: true,
197
197
  highlightHoveredMarker: true,
198
198
  colors: {
199
- activeLight: 'red',
200
- light: '#4385c780',
199
+ activeLight: '#7f7f7f',
200
+ light: '#d0d0d0',
201
+ hoverLight: '#7f7f7f',
201
202
  backgroundLight: '#4385c720',
202
- backgroundHoverLight: '#ce701180',
203
+ backgroundHoverLight: '#43adc720',
203
204
  },
204
205
  }),
205
206
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codemirror-foldable-indentation-guides",
3
3
  "description": "Render foldable indentation guides in CodeMirror",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "keywords": [
6
6
  "codemirror",
7
7
  "codemirror6",
Binary file