@noldova/code.editor 0.0.0-stage → 0.0.1

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.
Files changed (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -2
  3. package/api/index.d.ts +6288 -0
  4. package/api/index.js +80 -0
  5. package/api/index.js.map +1 -0
  6. package/enums/edit-kind.js +14 -0
  7. package/enums/edit-kind.js.map +1 -0
  8. package/enums/key-dispatch-result.js +15 -0
  9. package/enums/key-dispatch-result.js.map +1 -0
  10. package/enums/worker-job-answer.js +14 -0
  11. package/enums/worker-job-answer.js.map +1 -0
  12. package/exceptions/condition-syntax.exception.js +20 -0
  13. package/exceptions/condition-syntax.exception.js.map +1 -0
  14. package/exceptions/edits-overlap.exception.js +20 -0
  15. package/exceptions/edits-overlap.exception.js.map +1 -0
  16. package/exceptions/key-syntax.exception.js +18 -0
  17. package/exceptions/key-syntax.exception.js.map +1 -0
  18. package/exceptions/registration-exists.exception.js +20 -0
  19. package/exceptions/registration-exists.exception.js.map +1 -0
  20. package/exceptions/registration-missing.exception.js +20 -0
  21. package/exceptions/registration-missing.exception.js.map +1 -0
  22. package/exceptions/search-pattern.exception.js +18 -0
  23. package/exceptions/search-pattern.exception.js.map +1 -0
  24. package/exceptions/value-missing.exception.js +16 -0
  25. package/exceptions/value-missing.exception.js.map +1 -0
  26. package/interfaces/background/i-background-job.js +9 -0
  27. package/interfaces/background/i-background-job.js.map +1 -0
  28. package/interfaces/background/i-background-runner.js +9 -0
  29. package/interfaces/background/i-background-runner.js.map +1 -0
  30. package/interfaces/background/i-message-post-options.js +9 -0
  31. package/interfaces/background/i-message-post-options.js.map +1 -0
  32. package/interfaces/background/i-message-scope.js +9 -0
  33. package/interfaces/background/i-message-scope.js.map +1 -0
  34. package/interfaces/background/i-worker-job-failure.js +9 -0
  35. package/interfaces/background/i-worker-job-failure.js.map +1 -0
  36. package/interfaces/background/i-worker-job-message.js +9 -0
  37. package/interfaces/background/i-worker-job-message.js.map +1 -0
  38. package/interfaces/background/i-worker-job-missing.js +9 -0
  39. package/interfaces/background/i-worker-job-missing.js.map +1 -0
  40. package/interfaces/background/i-worker-job-output.js +9 -0
  41. package/interfaces/background/i-worker-job-output.js.map +1 -0
  42. package/interfaces/background/i-worker-job-request.js +9 -0
  43. package/interfaces/background/i-worker-job-request.js.map +1 -0
  44. package/interfaces/i-command.js +9 -0
  45. package/interfaces/i-command.js.map +1 -0
  46. package/interfaces/i-condition-node.js +9 -0
  47. package/interfaces/i-condition-node.js.map +1 -0
  48. package/interfaces/i-diff-algorithm.js +9 -0
  49. package/interfaces/i-diff-algorithm.js.map +1 -0
  50. package/interfaces/i-editor-contribution.js +9 -0
  51. package/interfaces/i-editor-contribution.js.map +1 -0
  52. package/interfaces/i-key-binding-rule.js +9 -0
  53. package/interfaces/i-key-binding-rule.js.map +1 -0
  54. package/interfaces/i-language-definition.js +9 -0
  55. package/interfaces/i-language-definition.js.map +1 -0
  56. package/interfaces/i-move-command.js +9 -0
  57. package/interfaces/i-move-command.js.map +1 -0
  58. package/interfaces/i-plural-phrase.js +9 -0
  59. package/interfaces/i-plural-phrase.js.map +1 -0
  60. package/interfaces/tokens/i-highlighter.js +9 -0
  61. package/interfaces/tokens/i-highlighter.js.map +1 -0
  62. package/interfaces/tokens/i-line-tokenizer.js +9 -0
  63. package/interfaces/tokens/i-line-tokenizer.js.map +1 -0
  64. package/interfaces/tokens/i-token-modifier-definition.js +9 -0
  65. package/interfaces/tokens/i-token-modifier-definition.js.map +1 -0
  66. package/interfaces/tokens/i-token-type-definition.js +9 -0
  67. package/interfaces/tokens/i-token-type-definition.js.map +1 -0
  68. package/interfaces/tokens/i-tokenizer-state.js +9 -0
  69. package/interfaces/tokens/i-tokenizer-state.js.map +1 -0
  70. package/models/commands/command-context.js +30 -0
  71. package/models/commands/command-context.js.map +1 -0
  72. package/models/commands/session-command.js +22 -0
  73. package/models/commands/session-command.js.map +1 -0
  74. package/models/commands/session-move-command.js +17 -0
  75. package/models/commands/session-move-command.js.map +1 -0
  76. package/models/conditions/condition-and.js +20 -0
  77. package/models/conditions/condition-and.js.map +1 -0
  78. package/models/conditions/condition-equals.js +21 -0
  79. package/models/conditions/condition-equals.js.map +1 -0
  80. package/models/conditions/condition-key.js +18 -0
  81. package/models/conditions/condition-key.js.map +1 -0
  82. package/models/conditions/condition-literal.js +17 -0
  83. package/models/conditions/condition-literal.js.map +1 -0
  84. package/models/conditions/condition-name.js +17 -0
  85. package/models/conditions/condition-name.js.map +1 -0
  86. package/models/conditions/condition-not.js +18 -0
  87. package/models/conditions/condition-not.js.map +1 -0
  88. package/models/conditions/condition-or.js +20 -0
  89. package/models/conditions/condition-or.js.map +1 -0
  90. package/models/conditions/condition-token.js +18 -0
  91. package/models/conditions/condition-token.js.map +1 -0
  92. package/models/conditions/condition-truth.js +18 -0
  93. package/models/conditions/condition-truth.js.map +1 -0
  94. package/models/conditions/condition-value.js +9 -0
  95. package/models/conditions/condition-value.js.map +1 -0
  96. package/models/conditions/condition.js +44 -0
  97. package/models/conditions/condition.js.map +1 -0
  98. package/models/diff-span.js +20 -0
  99. package/models/diff-span.js.map +1 -0
  100. package/models/editing/applied-edit.js +22 -0
  101. package/models/editing/applied-edit.js.map +1 -0
  102. package/models/editing/edit-transaction.js +22 -0
  103. package/models/editing/edit-transaction.js.map +1 -0
  104. package/models/editing/undo-step.js +24 -0
  105. package/models/editing/undo-step.js.map +1 -0
  106. package/models/editor-feature-set.js +18 -0
  107. package/models/editor-feature-set.js.map +1 -0
  108. package/models/editor-feature.js +24 -0
  109. package/models/editor-feature.js.map +1 -0
  110. package/models/keys/key-binding-entry.js +57 -0
  111. package/models/keys/key-binding-entry.js.map +1 -0
  112. package/models/keys/key-binding-rule.js +20 -0
  113. package/models/keys/key-binding-rule.js.map +1 -0
  114. package/models/keys/key-binding-source.js +16 -0
  115. package/models/keys/key-binding-source.js.map +1 -0
  116. package/models/keys/key-chord.js +74 -0
  117. package/models/keys/key-chord.js.map +1 -0
  118. package/models/keys/key-dispatcher.js +42 -0
  119. package/models/keys/key-dispatcher.js.map +1 -0
  120. package/models/keys/key-press.js +24 -0
  121. package/models/keys/key-press.js.map +1 -0
  122. package/models/keys/key-sequence.js +37 -0
  123. package/models/keys/key-sequence.js.map +1 -0
  124. package/models/languages/block-comment.js +16 -0
  125. package/models/languages/block-comment.js.map +1 -0
  126. package/models/languages/bracket-pair.js +16 -0
  127. package/models/languages/bracket-pair.js.map +1 -0
  128. package/models/languages/language-definition.js +32 -0
  129. package/models/languages/language-definition.js.map +1 -0
  130. package/models/languages/language-file.js +29 -0
  131. package/models/languages/language-file.js.map +1 -0
  132. package/models/phrase-set.js +16 -0
  133. package/models/phrase-set.js.map +1 -0
  134. package/models/phrase-text.js +9 -0
  135. package/models/phrase-text.js.map +1 -0
  136. package/models/plural-phrase.js +24 -0
  137. package/models/plural-phrase.js.map +1 -0
  138. package/models/registration.js +21 -0
  139. package/models/registration.js.map +1 -0
  140. package/models/search-query.js +20 -0
  141. package/models/search-query.js.map +1 -0
  142. package/models/setting.js +39 -0
  143. package/models/setting.js.map +1 -0
  144. package/models/text/line-chunk.js +115 -0
  145. package/models/text/line-chunk.js.map +1 -0
  146. package/models/text/line-segment.js +22 -0
  147. package/models/text/line-segment.js.map +1 -0
  148. package/models/text/line-split.js +32 -0
  149. package/models/text/line-split.js.map +1 -0
  150. package/models/text/text-change.js +20 -0
  151. package/models/text/text-change.js.map +1 -0
  152. package/models/text/text-document.js +265 -0
  153. package/models/text/text-document.js.map +1 -0
  154. package/models/text/text-edit.js +16 -0
  155. package/models/text/text-edit.js.map +1 -0
  156. package/models/text/text-position.js +30 -0
  157. package/models/text/text-position.js.map +1 -0
  158. package/models/text/text-range.js +30 -0
  159. package/models/text/text-range.js.map +1 -0
  160. package/models/text/text-selection.js +22 -0
  161. package/models/text/text-selection.js.map +1 -0
  162. package/models/tokens/highlighter-assignment.js +16 -0
  163. package/models/tokens/highlighter-assignment.js.map +1 -0
  164. package/models/tokens/line-token.js +22 -0
  165. package/models/tokens/line-token.js.map +1 -0
  166. package/models/tokens/line-tokens.js +16 -0
  167. package/models/tokens/line-tokens.js.map +1 -0
  168. package/models/tokens/stale-state.js +13 -0
  169. package/models/tokens/stale-state.js.map +1 -0
  170. package/models/tokens/token-modifier-definition.js +16 -0
  171. package/models/tokens/token-modifier-definition.js.map +1 -0
  172. package/models/tokens/token-type-definition.js +18 -0
  173. package/models/tokens/token-type-definition.js.map +1 -0
  174. package/models/worker-job-response.js +9 -0
  175. package/models/worker-job-response.js.map +1 -0
  176. package/package.json +27 -4
  177. package/resources.js +384 -0
  178. package/resources.js.map +1 -0
  179. package/services/background/background-job-registry.js +29 -0
  180. package/services/background/background-job-registry.js.map +1 -0
  181. package/services/background/sliced-runner.js +35 -0
  182. package/services/background/sliced-runner.js.map +1 -0
  183. package/services/background/worker-job-host.js +46 -0
  184. package/services/background/worker-job-host.js.map +1 -0
  185. package/services/commands/command-registry.js +31 -0
  186. package/services/commands/command-registry.js.map +1 -0
  187. package/services/commands/core-commands.js +55 -0
  188. package/services/commands/core-commands.js.map +1 -0
  189. package/services/commands/selection-moves.js +126 -0
  190. package/services/commands/selection-moves.js.map +1 -0
  191. package/services/conditions/condition-parser.js +105 -0
  192. package/services/conditions/condition-parser.js.map +1 -0
  193. package/services/conditions/condition-registry.js +25 -0
  194. package/services/conditions/condition-registry.js.map +1 -0
  195. package/services/conditions/condition-values.js +23 -0
  196. package/services/conditions/condition-values.js.map +1 -0
  197. package/services/conditions/core-conditions.js +24 -0
  198. package/services/conditions/core-conditions.js.map +1 -0
  199. package/services/core-contribution.js +27 -0
  200. package/services/core-contribution.js.map +1 -0
  201. package/services/core-key-bindings.js +70 -0
  202. package/services/core-key-bindings.js.map +1 -0
  203. package/services/core-settings.js +18 -0
  204. package/services/core-settings.js.map +1 -0
  205. package/services/diff-algorithm-registry.js +38 -0
  206. package/services/diff-algorithm-registry.js.map +1 -0
  207. package/services/editing/editor-session.js +165 -0
  208. package/services/editing/editor-session.js.map +1 -0
  209. package/services/editing/position-mapper.js +38 -0
  210. package/services/editing/position-mapper.js.map +1 -0
  211. package/services/editing/text-editing.js +120 -0
  212. package/services/editing/text-editing.js.map +1 -0
  213. package/services/editing/undo-history.js +85 -0
  214. package/services/editing/undo-history.js.map +1 -0
  215. package/services/editor-features.js +13 -0
  216. package/services/editor-features.js.map +1 -0
  217. package/services/editor-registries.js +56 -0
  218. package/services/editor-registries.js.map +1 -0
  219. package/services/key-binding-registry.js +76 -0
  220. package/services/key-binding-registry.js.map +1 -0
  221. package/services/language-registry.js +56 -0
  222. package/services/language-registry.js.map +1 -0
  223. package/services/phrase-registry.js +82 -0
  224. package/services/phrase-registry.js.map +1 -0
  225. package/services/platforms.js +16 -0
  226. package/services/platforms.js.map +1 -0
  227. package/services/registry-entries.js +45 -0
  228. package/services/registry-entries.js.map +1 -0
  229. package/services/required.js +25 -0
  230. package/services/required.js.map +1 -0
  231. package/services/search-results.js +128 -0
  232. package/services/search-results.js.map +1 -0
  233. package/services/setting-registry.js +105 -0
  234. package/services/setting-registry.js.map +1 -0
  235. package/services/text-search.js +66 -0
  236. package/services/text-search.js.map +1 -0
  237. package/services/tokens/built-in-token-types.js +41 -0
  238. package/services/tokens/built-in-token-types.js.map +1 -0
  239. package/services/tokens/highlighter-registry.js +55 -0
  240. package/services/tokens/highlighter-registry.js.map +1 -0
  241. package/services/tokens/token-cache.js +118 -0
  242. package/services/tokens/token-cache.js.map +1 -0
  243. package/services/tokens/token-segments.js +29 -0
  244. package/services/tokens/token-segments.js.map +1 -0
  245. package/services/tokens/token-styles.js +41 -0
  246. package/services/tokens/token-styles.js.map +1 -0
  247. package/services/tokens/token-type-registry.js +63 -0
  248. package/services/tokens/token-type-registry.js.map +1 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-token-type-definition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-token-type-definition.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/interfaces/tokens/i-token-type-definition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=i-tokenizer-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-tokenizer-state.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/interfaces/tokens/i-tokenizer-state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class CommandContext {
9
+ registries;
10
+ conditions;
11
+ features;
12
+ languageId;
13
+ time;
14
+ pageLines;
15
+ constructor(registries, conditions, features, languageId, time, pageLines) {
16
+ this.registries = registries;
17
+ this.conditions = conditions;
18
+ this.features = features;
19
+ this.languageId = languageId;
20
+ this.time = time;
21
+ this.pageLines = pageLines;
22
+ }
23
+ feature(feature) {
24
+ return this.features.get(feature);
25
+ }
26
+ setting(setting) {
27
+ return this.registries.settings.get(setting, this.languageId);
28
+ }
29
+ }
30
+ //# sourceMappingURL=command-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-context.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/commands/command-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,OAAO,cAAc;IACT,UAAU,CAAmB;IAC7B,UAAU,CAAkB;IAC5B,QAAQ,CAAmB;IAC3B,UAAU,CAAgB;IAC1B,IAAI,CAAS;IACb,SAAS,CAAS;IAElC,YAAmB,UAA4B,EAAE,UAA2B,EAAE,QAA0B,EAAE,UAAyB,EAAE,IAAY,EAAE,SAAiB;QAClK,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEM,OAAO,CAAI,OAAyB;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAEM,OAAO,CAAI,OAAmB;QACnC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import "@noldova/context.core";
9
+ import { EditorFeatures } from "../../services/editor-features.js";
10
+ export class SessionCommand {
11
+ id;
12
+ action;
13
+ constructor(id, action) {
14
+ this.id = id;
15
+ this.action = action;
16
+ }
17
+ run(context) {
18
+ const session = context.feature(EditorFeatures.session);
19
+ return !Object.isNull(session) && this.action(session, context);
20
+ }
21
+ }
22
+ //# sourceMappingURL=session-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-command.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/commands/session-command.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAInE,MAAM,OAAO,cAAc;IACT,EAAE,CAAS;IACV,MAAM,CAA+D;IAEtF,YAAmB,EAAU,EAAE,MAAoE;QACjG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,GAAG,CAAC,OAAuB;QAChC,MAAM,OAAO,GAAyB,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAE9E,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../../resources.js";
9
+ import { SessionCommand } from "./session-command.js";
10
+ export class SessionMoveCommand extends SessionCommand {
11
+ select;
12
+ constructor(id, move) {
13
+ super(id, (s, c) => move(s, false, c));
14
+ this.select = new SessionCommand(id + Resources.selectCommandSuffix, (s, c) => move(s, true, c));
15
+ }
16
+ }
17
+ //# sourceMappingURL=session-move-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-move-command.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/commands/session-move-command.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpC,MAAM,CAAiB;IAEvC,YAAmB,EAAU,EAAE,IAAmF;QAChH,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,CAAC,EAAE,GAAG,SAAS,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ConditionTruth } from "./condition-truth.js";
9
+ export class ConditionAnd {
10
+ left;
11
+ right;
12
+ constructor(left, right) {
13
+ this.left = left;
14
+ this.right = right;
15
+ }
16
+ valueIn(values) {
17
+ return ConditionTruth.of(this.left.valueIn(values)) && ConditionTruth.of(this.right.valueIn(values));
18
+ }
19
+ }
20
+ //# sourceMappingURL=condition-and.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-and.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-and.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,OAAO,YAAY;IACN,IAAI,CAAiB;IACrB,KAAK,CAAiB;IAEvC,YAAmB,IAAoB,EAAE,KAAqB;QAC5D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,OAAO,CAAC,MAAuB;QACpC,OAAO,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACvG,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class ConditionEquals {
9
+ left;
10
+ right;
11
+ negated;
12
+ constructor(left, right, negated) {
13
+ this.left = left;
14
+ this.right = right;
15
+ this.negated = negated;
16
+ }
17
+ valueIn(values) {
18
+ return (this.left.valueIn(values) === this.right.valueIn(values)) !== this.negated;
19
+ }
20
+ }
21
+ //# sourceMappingURL=condition-equals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-equals.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-equals.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,eAAe;IACT,IAAI,CAAiB;IACrB,KAAK,CAAiB;IACtB,OAAO,CAAU;IAElC,YAAmB,IAAoB,EAAE,KAAqB,EAAE,OAAgB;QAC9E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,OAAO,CAAC,MAAuB;QACpC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC;IACrF,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class ConditionKey {
9
+ name;
10
+ defaultValue;
11
+ description;
12
+ constructor(name, defaultValue, description) {
13
+ this.name = name;
14
+ this.defaultValue = defaultValue;
15
+ this.description = description;
16
+ }
17
+ }
18
+ //# sourceMappingURL=condition-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-key.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,YAAY;IACP,IAAI,CAAS;IACb,YAAY,CAAI;IAChB,WAAW,CAAS;IAEpC,YAAmB,IAAY,EAAE,YAAe,EAAE,WAAmB;QACnE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class ConditionLiteral {
9
+ value;
10
+ constructor(value) {
11
+ this.value = value;
12
+ }
13
+ valueIn() {
14
+ return this.value;
15
+ }
16
+ }
17
+ //# sourceMappingURL=condition-literal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-literal.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-literal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,OAAO,gBAAgB;IACV,KAAK,CAAiB;IAEvC,YAAmB,KAAqB;QACtC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class ConditionName {
9
+ name;
10
+ constructor(name) {
11
+ this.name = name;
12
+ }
13
+ valueIn(values) {
14
+ return values.get(this.name);
15
+ }
16
+ }
17
+ //# sourceMappingURL=condition-name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-name.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-name.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,aAAa;IACP,IAAI,CAAS;IAE9B,YAAmB,IAAY;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,OAAO,CAAC,MAAuB;QACpC,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ConditionTruth } from "./condition-truth.js";
9
+ export class ConditionNot {
10
+ operand;
11
+ constructor(operand) {
12
+ this.operand = operand;
13
+ }
14
+ valueIn(values) {
15
+ return !ConditionTruth.of(this.operand.valueIn(values));
16
+ }
17
+ }
18
+ //# sourceMappingURL=condition-not.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-not.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-not.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,OAAO,YAAY;IACN,OAAO,CAAiB;IAEzC,YAAmB,OAAuB;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,OAAO,CAAC,MAAuB;QACpC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { ConditionTruth } from "./condition-truth.js";
9
+ export class ConditionOr {
10
+ left;
11
+ right;
12
+ constructor(left, right) {
13
+ this.left = left;
14
+ this.right = right;
15
+ }
16
+ valueIn(values) {
17
+ return ConditionTruth.of(this.left.valueIn(values)) || ConditionTruth.of(this.right.valueIn(values));
18
+ }
19
+ }
20
+ //# sourceMappingURL=condition-or.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-or.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-or.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,OAAO,WAAW;IACL,IAAI,CAAiB;IACrB,KAAK,CAAiB;IAEvC,YAAmB,IAAoB,EAAE,KAAqB;QAC5D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,OAAO,CAAC,MAAuB;QACpC,OAAO,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACvG,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class ConditionToken {
9
+ text;
10
+ offset;
11
+ quoted;
12
+ constructor(text, offset, quoted) {
13
+ this.text = text;
14
+ this.offset = offset;
15
+ this.quoted = quoted;
16
+ }
17
+ }
18
+ //# sourceMappingURL=condition-token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-token.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-token.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,cAAc;IACT,IAAI,CAAS;IACb,MAAM,CAAS;IACf,MAAM,CAAU;IAEhC,YAAmB,IAAY,EAAE,MAAc,EAAE,MAAe;QAC9D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import "@noldova/context.core";
9
+ export class ConditionTruth {
10
+ static of(value) {
11
+ if (Object.isString(value))
12
+ return !String.isNullOrEmpty(value);
13
+ if (Object.isNumber(value))
14
+ return value !== 0 && !Number.isNaN(value);
15
+ return value;
16
+ }
17
+ }
18
+ //# sourceMappingURL=condition-truth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-truth.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-truth.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAI/B,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,EAAE,CAAC,KAAqB;QACpC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YACxB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YACxB,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE7C,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=condition-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition-value.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition-value.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import "@noldova/context.core";
9
+ import { ConditionParser } from "../../services/conditions/condition-parser.js";
10
+ import { Resources } from "../../resources.js";
11
+ import { ConditionEquals } from "./condition-equals.js";
12
+ import { ConditionLiteral } from "./condition-literal.js";
13
+ import { ConditionName } from "./condition-name.js";
14
+ import { ConditionTruth } from "./condition-truth.js";
15
+ export class Condition {
16
+ static always = Condition.parse(String.empty);
17
+ text;
18
+ root;
19
+ constructor(text, root) {
20
+ this.text = text;
21
+ this.root = root;
22
+ }
23
+ static parse(text) {
24
+ return new Condition(text, ConditionParser.parse(text));
25
+ }
26
+ static has(key) {
27
+ return new Condition(key.name, new ConditionName(key.name));
28
+ }
29
+ static equals(key, value) {
30
+ return Condition.comparing(key, value, false);
31
+ }
32
+ static notEquals(key, value) {
33
+ return Condition.comparing(key, value, true);
34
+ }
35
+ holds(values) {
36
+ return ConditionTruth.of(this.root.valueIn(values));
37
+ }
38
+ static comparing(key, value, negated) {
39
+ const operand = Object.isString(value) ? Resources.conditionQuote + value + Resources.conditionQuote : String(value);
40
+ const operator = negated ? Resources.conditionNotEquals : Resources.conditionEquals;
41
+ return new Condition([key.name, operator, operand].join(Resources.space), new ConditionEquals(new ConditionName(key.name), new ConditionLiteral(value), negated));
42
+ }
43
+ }
44
+ //# sourceMappingURL=condition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/conditions/condition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAEhF,OAAO,EAAE,SAAS,E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EO,MAAM,CAAC,SAAS,CAAC,GAAiC,EAAE,KAAqB,EAAE,OAAgB;QACjG,MAAM,OAAO,GAAW,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,GAAG,KAAK,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7H,MAAM,QAAQ,GAAW,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC;QAE5F,OAAO,IAAI,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,eAAe,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACpK,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class DiffSpan {
9
+ originalStart;
10
+ originalEnd;
11
+ modifiedStart;
12
+ modifiedEnd;
13
+ constructor(originalStart, originalEnd, modifiedStart, modifiedEnd) {
14
+ this.originalStart = originalStart;
15
+ this.originalEnd = originalEnd;
16
+ this.modifiedStart = modifiedStart;
17
+ this.modifiedEnd = modifiedEnd;
18
+ }
19
+ }
20
+ //# sourceMappingURL=diff-span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-span.js","sourceRoot":"","sources":["../../../../src/noldova.code.editor/src/models/diff-span.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,QAAQ;IACH,aAAa,CAAS;IACtB,WAAW,CAAS;IACpB,aAAa,CAAS;IACtB,WAAW,CAAS;IAEpC,YAAmB,aAAqB,EAAE,WAAmB,EAAE,aAAqB,EAAE,WAAmB;QACvG,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class AppliedEdit {
9
+ oldRange;
10
+ newRange;
11
+ oldText;
12
+ text;
13
+ oldOffset;
14
+ constructor(oldRange, newRange, oldText, text, oldOffset) {
15
+ this.oldRange = oldRange;
16
+ this.newRange = newRange;
17
+ this.oldText = oldText;
18
+ this.text = text;
19
+ this.oldOffset = oldOffset;
20
+ }
21
+ }
22
+ //# sourceMappingURL=applied-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applied-edit.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/editing/applied-edit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,WAAW;IACN,QAAQ,CAAY;IACpB,QAAQ,CAAY;IACpB,OAAO,CAAS;IAChB,IAAI,CAAS;IACb,SAAS,CAAS;IAElC,YAAmB,QAAmB,EAAE,QAAmB,EAAE,OAAe,EAAE,IAAY,EAAE,SAAiB;QAC3G,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class EditTransaction {
9
+ edits;
10
+ kind;
11
+ time;
12
+ selectionsBefore;
13
+ selectionsAfter;
14
+ constructor(edits, kind, time, selectionsBefore, selectionsAfter) {
15
+ this.edits = edits;
16
+ this.kind = kind;
17
+ this.time = time;
18
+ this.selectionsBefore = selectionsBefore;
19
+ this.selectionsAfter = selectionsAfter;
20
+ }
21
+ }
22
+ //# sourceMappingURL=edit-transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-transaction.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/editing/edit-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,OAAO,eAAe;IACV,KAAK,CAA0B;IAC/B,IAAI,CAAW;IACf,IAAI,CAAS;IACb,gBAAgB,CAA+B;IAC/C,eAAe,CAA+B;IAE9D,YAAmB,KAA8B,EAAE,IAAc,EAAE,IAAY,EAAE,gBAA8C,EAAE,eAA6C;QAC5K,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class UndoStep {
9
+ kind;
10
+ changes;
11
+ selectionsBefore;
12
+ selectionsAfter;
13
+ lastTime;
14
+ sealed;
15
+ constructor(kind, changes, selectionsBefore, selectionsAfter, lastTime, sealed) {
16
+ this.kind = kind;
17
+ this.changes = changes;
18
+ this.selectionsBefore = selectionsBefore;
19
+ this.selectionsAfter = selectionsAfter;
20
+ this.lastTime = lastTime;
21
+ this.sealed = sealed;
22
+ }
23
+ }
24
+ //# sourceMappingURL=undo-step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo-step.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/editing/undo-step.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,OAAO,QAAQ;IACH,IAAI,CAAW;IACf,OAAO,CAAe;IACtB,gBAAgB,CAA+B;IACxD,eAAe,CAA+B;IAC9C,QAAQ,CAAS;IACjB,MAAM,CAAU;IAEvB,YAAmB,IAAc,EAAE,OAAqB,EAAE,gBAA8C,EAAE,eAA6C,EAAE,QAAgB,EAAE,MAAe;QACxL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Registration } from "./registration.js";
9
+ export class EditorFeatureSet {
10
+ provide(feature, value) {
11
+ feature.provide(this, value);
12
+ return new Registration(() => feature.withdraw(this));
13
+ }
14
+ get(feature) {
15
+ return feature.valueIn(this);
16
+ }
17
+ }
18
+ //# sourceMappingURL=editor-feature-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-feature-set.js","sourceRoot":"","sources":["../../../../src/noldova.code.editor/src/models/editor-feature-set.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,gBAAgB;IACpB,OAAO,CAAI,OAAyB,EAAE,KAAQ;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAE7B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,CAAC;IAEM,GAAG,CAAI,OAAyB;QACrC,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ export class EditorFeature {
9
+ name;
10
+ values = new WeakMap();
11
+ constructor(name) {
12
+ this.name = name;
13
+ }
14
+ valueIn(owner) {
15
+ return this.values.get(owner) ?? null;
16
+ }
17
+ provide(owner, value) {
18
+ this.values.set(owner, value);
19
+ }
20
+ withdraw(owner) {
21
+ this.values.delete(owner);
22
+ }
23
+ }
24
+ //# sourceMappingURL=editor-feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-feature.js","sourceRoot":"","sources":["../../../../src/noldova.code.editor/src/models/editor-feature.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,aAAa;IACR,IAAI,CAAS;IACZ,MAAM,GAAuB,IAAI,OAAO,EAAa,CAAC;IAEvE,YAAmB,IAAY;QAC7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IACxC,CAAC;IAEM,OAAO,CAAC,KAAa,EAAE,KAAQ;QACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAEM,QAAQ,CAAC,KAAa;QAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;CACF"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import "@noldova/context.core";
9
+ import { Resources } from "../../resources.js";
10
+ import { Condition } from "../conditions/condition.js";
11
+ import { KeySequence } from "./key-sequence.js";
12
+ export class KeyBindingEntry {
13
+ rule;
14
+ condition;
15
+ removes;
16
+ command;
17
+ macSequence;
18
+ otherSequence;
19
+ constructor(rule) {
20
+ this.rule = rule;
21
+ this.condition = KeyBindingEntry.conditionOf(rule.when);
22
+ this.removes = rule.command.startsWith(Resources.removeCommandPrefix);
23
+ this.command = this.removes ? rule.command.slice(Resources.removeCommandPrefix.length) : rule.command;
24
+ this.macSequence = Object.isUndefined(rule.key) ? null : KeySequence.parse(rule.key, Resources.modifierMeta);
25
+ this.otherSequence = Object.isUndefined(rule.key) ? null : KeySequence.parse(rule.key, Resources.modifierControl);
26
+ }
27
+ static conditionOf(when) {
28
+ if (Object.isUndefined(when))
29
+ return Condition.always;
30
+ return Object.isString(when) ? Condition.parse(when) : when;
31
+ }
32
+ sequenceIn(conditions) {
33
+ return conditions.get(Resources.platformCondition) === Resources.platformMac ? this.macSequence : this.otherSequence;
34
+ }
35
+ continuing(pressed, press, conditions) {
36
+ const sequence = this.following(pressed, press, conditions);
37
+ return Object.isNull(sequence) || sequence.chords.count() === pressed.count() + 1 ? null : sequence.chords.get(pressed.count());
38
+ }
39
+ completes(pressed, press, conditions) {
40
+ return this.following(pressed, press, conditions)?.chords.count() === pressed.count() + 1;
41
+ }
42
+ removesEntry(entry, conditions) {
43
+ if (!this.removes || entry.command !== this.command)
44
+ return false;
45
+ const mine = this.sequenceIn(conditions);
46
+ const theirs = entry.sequenceIn(conditions);
47
+ return Object.isNull(mine) || !Object.isNull(theirs) && mine.equals(theirs);
48
+ }
49
+ following(pressed, press, conditions) {
50
+ const sequence = this.sequenceIn(conditions);
51
+ if (Object.isNull(sequence) || sequence.chords.count() <= pressed.count() || !this.condition.holds(conditions))
52
+ return null;
53
+ const follows = pressed.select((chord, index) => chord.equals(sequence.chords.get(index))).all(t => t);
54
+ return follows && sequence.chords.get(pressed.count()).matches(press) ? sequence : null;
55
+ }
56
+ }
57
+ //# sourceMappingURL=key-binding-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key-binding-entry.js","sourceRoot":"","sources":["../../../../../src/noldova.code.editor/src/models/keys/key-binding-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAK/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,OAAO,eAAe;IACV,IAAI,CAAkB;IACtB,SAAS,CAAY;IACrB,OAAO,CAAU;IACjB,OAAO,CAAS;IACf,WAAW,CAAqB;IAChC,aAAa,CAAqB;IAEnD,YAAmB,IAAqB;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACtE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QACtG,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,C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