@taufik-nurrohman/text-editor.source 2.2.0 → 2.2.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright © 2021 Taufik Nurrohman <https://github.com/taufik-nurrohman>
3
+ Copyright © 2022 Taufik Nurrohman <https://github.com/taufik-nurrohman>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the “Software”), to deal
package/README.md CHANGED
File without changes
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  *
3
3
  * The MIT License (MIT)
4
4
  *
5
- * Copyright © 2021 Taufik Nurrohman <https://github.com/taufik-nurrohman>
5
+ * Copyright © 2022 Taufik Nurrohman <https://github.com/taufik-nurrohman>
6
6
  *
7
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  * of this software and associated documentation files (the “Software”), to deal
@@ -262,11 +262,11 @@
262
262
 
263
263
  function canKeyDownDent(map, that) {
264
264
  let charIndent = that.state.source.tab || that.state.tab || '\t',
265
- keyValue = map + ""; // Indent with `⌘+]`
265
+ keyValue = map + ""; // Indent with `⎈]`
266
266
  if (CTRL_PREFIX + ']' === keyValue) {
267
267
  that.push(charIndent).record();
268
268
  return false;
269
- } // Outdent with `⌘+[`
269
+ } // Outdent with `⎈[`
270
270
  if (CTRL_PREFIX + '[' === keyValue) {
271
271
  that.pull(charIndent).record();
272
272
  return false;
@@ -293,9 +293,9 @@
293
293
  lineMatchIndent = lineMatch && lineMatch[1] || "";
294
294
  if (before || after) {
295
295
  if (queue.Shift) {
296
- // Insert line over with `⌘+⇧+↵`
296
+ // Insert line over with `⎈⇧↵`
297
297
  return that.select(start - toCount(lineBefore)).wrap(lineMatchIndent, '\n').insert(value).record(), false;
298
- } // Insert line below with `⌘+↵`
298
+ } // Insert line below with `⎈↵`
299
299
  return that.select(end + toCount(lineAfter)).wrap('\n' + lineMatchIndent, "").insert(value).record(), false;
300
300
  }
301
301
  }
@@ -303,10 +303,10 @@
303
303
  }
304
304
 
305
305
  function canKeyDownHistory(map, that) {
306
- let keyValue = map + ""; // Redo with `⌘+y`
306
+ let keyValue = map + ""; // Redo with `⎈y`
307
307
  if (CTRL_PREFIX + 'y' === keyValue) {
308
308
  return that.redo(), false;
309
- } // Undo with `⌘+z`
309
+ } // Undo with `⎈z`
310
310
  if (CTRL_PREFIX + 'z' === keyValue) {
311
311
  return that.undo(), false;
312
312
  }
package/index.min.js CHANGED
@@ -2,7 +2,7 @@
2
2
  *
3
3
  * The MIT License (MIT)
4
4
  *
5
- * Copyright © 2021 Taufik Nurrohman <https://github.com/taufik-nurrohman>
5
+ * Copyright © 2022 Taufik Nurrohman <https://github.com/taufik-nurrohman>
6
6
  *
7
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  * of this software and associated documentation files (the “Software”), to deal
package/index.mjs CHANGED
@@ -188,12 +188,12 @@ export function canKeyDownDent(map, that) {
188
188
  let charIndent = that.state.source.tab || that.state.tab || '\t',
189
189
  {key, queue} = map,
190
190
  keyValue = map + "";
191
- // Indent with `⌘+]`
191
+ // Indent with `⎈]`
192
192
  if (CTRL_PREFIX + ']' === keyValue) {
193
193
  that.push(charIndent).record();
194
194
  return false;
195
195
  }
196
- // Outdent with `⌘+[`
196
+ // Outdent with `⎈[`
197
197
  if (CTRL_PREFIX + '[' === keyValue) {
198
198
  that.pull(charIndent).record();
199
199
  return false;
@@ -211,10 +211,10 @@ export function canKeyDownEnter(map, that) {
211
211
  lineMatchIndent = lineMatch && lineMatch[1] || "";
212
212
  if (before || after) {
213
213
  if (queue.Shift) {
214
- // Insert line over with `⌘+⇧+↵`
214
+ // Insert line over with `⎈⇧↵`
215
215
  return that.select(start - toCount(lineBefore)).wrap(lineMatchIndent, '\n').insert(value).record(), false;
216
216
  }
217
- // Insert line below with `⌘+↵`
217
+ // Insert line below with `⎈↵`
218
218
  return that.select(end + toCount(lineAfter)).wrap('\n' + lineMatchIndent, "").insert(value).record(), false;
219
219
  }
220
220
  }
@@ -223,11 +223,11 @@ export function canKeyDownEnter(map, that) {
223
223
 
224
224
  export function canKeyDownHistory(map, that) {
225
225
  let keyValue = map + "";
226
- // Redo with `⌘+y`
226
+ // Redo with `⎈y`
227
227
  if (CTRL_PREFIX + 'y' === keyValue) {
228
228
  return that.redo(), false;
229
229
  }
230
- // Undo with `⌘+z`
230
+ // Undo with `⎈z`
231
231
  if (CTRL_PREFIX + 'z' === keyValue) {
232
232
  return that.undo(), false;
233
233
  }
package/package.json CHANGED
@@ -3,17 +3,17 @@
3
3
  "browser": "index.min.js",
4
4
  "bugs": "https://github.com/taufik-nurrohman/text-editor.source/issues",
5
5
  "dependencies": {
6
- "@taufik-nurrohman/has": "^0.0.3",
7
- "@taufik-nurrohman/key": "^2.0.4",
8
- "@taufik-nurrohman/pattern": "^0.1.7",
9
- "@taufik-nurrohman/text-editor": "^3.3.9",
10
- "@taufik-nurrohman/text-editor.history": "^2.1.11",
11
- "@taufik-nurrohman/tick": "^0.0.2",
12
- "@taufik-nurrohman/to": "^0.0.18"
6
+ "@taufik-nurrohman/has": "*",
7
+ "@taufik-nurrohman/key": "*",
8
+ "@taufik-nurrohman/pattern": "*",
9
+ "@taufik-nurrohman/text-editor": "*",
10
+ "@taufik-nurrohman/text-editor.history": "*",
11
+ "@taufik-nurrohman/tick": "*",
12
+ "@taufik-nurrohman/to": "*"
13
13
  },
14
14
  "description": "Provides a set of key strokes to generate responses like in a typical source code editor.",
15
15
  "devDependencies": {
16
- "@taufik-nurrohman/factory": "^0.1.20"
16
+ "@taufik-nurrohman/factory": "*"
17
17
  },
18
18
  "exports": {
19
19
  "import": "./index.mjs",
@@ -47,8 +47,8 @@
47
47
  "url": "git+https://github.com/taufik-nurrohman/text-editor.source.git"
48
48
  },
49
49
  "scripts": {
50
- "pack": "pack --clean=false --from=.github/source --js-format=umd --js-name=TE.Source --js-top='%(js.license)' --mjs=true --to=."
50
+ "pack": "pack --clean=false --from=.github/factory --js-format=umd --js-name=TE.Source --js-top='%(js.license)' --mjs=true --to=."
51
51
  },
52
52
  "type": "module",
53
- "version": "2.2.0"
54
- }
53
+ "version": "2.2.3"
54
+ }