yks-element 1.5.2 → 1.5.4

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 (33) hide show
  1. package/lib/019e34e85139cfc611bf23efa096c980.js +18 -0
  2. package/lib/07567125b93045706d81f17f7d04e262.js +120 -0
  3. package/lib/0d56a1f26e052a1bafd10a87782fc74b.js +3380 -0
  4. package/lib/27846e85433e54a3ec0ab34d62233dc5.js +186 -0
  5. package/lib/2f25a4dc442bc9aebc58cae30c50c3e2.js +192 -0
  6. package/lib/2f55cddc8eb85b63ee5b4ce0e5488230.js +67 -0
  7. package/lib/2fe2904fc024afaf81732563cb83e547.js +116 -0
  8. package/lib/3b02cca9e95276a74f3ed2bbc7a64ce6.js +409 -0
  9. package/lib/70efbabef77fb217f904f41dbf7fe8bf.js +380 -0
  10. package/lib/7cec85e554cfaf2464511da505025098.js +74 -0
  11. package/lib/852f0ecd7b17e3bfd700a821ff438f7e.js +330 -0
  12. package/lib/88730abfeb4a23e692ac7933882f12eb.js +255 -0
  13. package/lib/8b8336037f074d9dcbd20eab535b803f.js +227 -0
  14. package/lib/9979f39c4d2773e02151a6cf1558101b.js +768 -0
  15. package/lib/af6e31c060c273848b5fec9fdba8814d.js +3066 -0
  16. package/lib/babd8df6809ef43238f1b280c2cebfe3.js +265 -0
  17. package/lib/bb1365c0983ce5ad50060b24788b9630.js +459 -0
  18. package/lib/c0a8aa1d5e0611259e47c2008cb203ee.js +197 -0
  19. package/lib/c530988d2b1966fd10a4d99fa3877e1b.js +9 -0
  20. package/lib/c8acc93023012737a3bf8fb767b66838.js +1293 -0
  21. package/lib/d0415105402964718010284fcfa8b2ea.js +48 -0
  22. package/lib/d11ab4aa7dd9123fdecb075ff5c5a748.js +790 -0
  23. package/lib/d1907231dc06c32481fefd6d47da973b.js +344 -0
  24. package/lib/d429602e0ebf3c1ec040e070e9b05b9b.js +184 -0
  25. package/lib/e4fc956693373117f057fe9914e983fc.js +7090 -0
  26. package/lib/f15362a7feef894b2e7f706252e6c510.js +45 -0
  27. package/lib/f666b5647087bcfdf6623f8b14d56657.js +136 -0
  28. package/lib/fac0ce75e0690947a9e9e6f5b35c1ea8.js +1067 -0
  29. package/lib/fec23c6964d6cf25681d1f3e24b076a4.js +56 -0
  30. package/lib/yks.js +1 -1
  31. package/package.json +1 -1
  32. package/lib/6c6d192b6860b4508a14c2d04769a35e.js +0 -15404
  33. package/lib/c3832579be376308fa819b04e7b0c66f.js +0 -3788
@@ -0,0 +1,790 @@
1
+ ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"], function(require, exports, module){module.exports = "#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}";
2
+
3
+ });
4
+
5
+ ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
6
+ 'use strict';
7
+ var dom = require("../../lib/dom");
8
+ var cssText = require("./settings_menu.css");
9
+ dom.importCssString(cssText, "settings_menu.css", false);
10
+ module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
11
+ var closer = document.createElement('div');
12
+ var ignoreFocusOut = false;
13
+ function documentEscListener(e) {
14
+ if (e.keyCode === 27) {
15
+ close();
16
+ }
17
+ }
18
+ function close() {
19
+ if (!closer)
20
+ return;
21
+ document.removeEventListener('keydown', documentEscListener);
22
+ closer.parentNode.removeChild(closer);
23
+ if (editor) {
24
+ editor.focus();
25
+ }
26
+ closer = null;
27
+ callback && callback();
28
+ }
29
+ function setIgnoreFocusOut(ignore) {
30
+ ignoreFocusOut = ignore;
31
+ if (ignore) {
32
+ closer.style.pointerEvents = "none";
33
+ contentElement.style.pointerEvents = "auto";
34
+ }
35
+ }
36
+ closer.style.cssText = 'margin: 0; padding: 0; ' +
37
+ 'position: fixed; top:0; bottom:0; left:0; right:0;' +
38
+ 'z-index: 9990; ' +
39
+ (editor ? 'background-color: rgba(0, 0, 0, 0.3);' : '');
40
+ closer.addEventListener('click', function (e) {
41
+ if (!ignoreFocusOut) {
42
+ close();
43
+ }
44
+ });
45
+ document.addEventListener('keydown', documentEscListener);
46
+ contentElement.addEventListener('click', function (e) {
47
+ e.stopPropagation();
48
+ });
49
+ closer.appendChild(contentElement);
50
+ document.body.appendChild(closer);
51
+ if (editor) {
52
+ editor.blur();
53
+ }
54
+ return {
55
+ close: close,
56
+ setIgnoreFocusOut: setIgnoreFocusOut
57
+ };
58
+ };
59
+
60
+ });
61
+
62
+ ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module){"use strict";
63
+ var modes = [];
64
+ function getModeForPath(path) {
65
+ var mode = modesByName.text;
66
+ var fileName = path.split(/[\/\\]/).pop();
67
+ for (var i = 0; i < modes.length; i++) {
68
+ if (modes[i].supportsFile(fileName)) {
69
+ mode = modes[i];
70
+ break;
71
+ }
72
+ }
73
+ return mode;
74
+ }
75
+ var Mode = /** @class */ (function () {
76
+ function Mode(name, caption, extensions) {
77
+ this.name = name;
78
+ this.caption = caption;
79
+ this.mode = "ace/mode/" + name;
80
+ this.extensions = extensions;
81
+ var re;
82
+ if (/\^/.test(extensions)) {
83
+ re = extensions.replace(/\|(\^)?/g, function (a, b) {
84
+ return "$|" + (b ? "^" : "^.*\\.");
85
+ }) + "$";
86
+ }
87
+ else {
88
+ re = "^.*\\.(" + extensions + ")$";
89
+ }
90
+ this.extRe = new RegExp(re, "gi");
91
+ }
92
+ Mode.prototype.supportsFile = function (filename) {
93
+ return filename.match(this.extRe);
94
+ };
95
+ return Mode;
96
+ }());
97
+ var supportedModes = {
98
+ ABAP: ["abap"],
99
+ ABC: ["abc"],
100
+ ActionScript: ["as"],
101
+ ADA: ["ada|adb"],
102
+ Alda: ["alda"],
103
+ Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
104
+ Apex: ["apex|cls|trigger|tgr"],
105
+ AQL: ["aql"],
106
+ AsciiDoc: ["asciidoc|adoc"],
107
+ ASL: ["dsl|asl|asl.json"],
108
+ Assembly_ARM32: ["s"],
109
+ Assembly_x86: ["asm|a"],
110
+ Astro: ["astro"],
111
+ AutoHotKey: ["ahk"],
112
+ BatchFile: ["bat|cmd"],
113
+ Basic: ["bas|bak"],
114
+ BibTeX: ["bib"],
115
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
116
+ C9Search: ["c9search_results"],
117
+ Cirru: ["cirru|cr"],
118
+ Clojure: ["clj|cljs"],
119
+ Cobol: ["CBL|COB"],
120
+ coffee: ["coffee|cf|cson|^Cakefile"],
121
+ ColdFusion: ["cfm|cfc"],
122
+ Crystal: ["cr"],
123
+ CSharp: ["cs"],
124
+ Csound_Document: ["csd"],
125
+ Csound_Orchestra: ["orc"],
126
+ Csound_Score: ["sco"],
127
+ CSS: ["css"],
128
+ Curly: ["curly"],
129
+ Cuttlefish: ["conf"],
130
+ D: ["d|di"],
131
+ Dart: ["dart"],
132
+ Diff: ["diff|patch"],
133
+ Django: ["djt|html.djt|dj.html|djhtml"],
134
+ Dockerfile: ["^Dockerfile"],
135
+ Dot: ["dot"],
136
+ Drools: ["drl"],
137
+ Edifact: ["edi"],
138
+ Eiffel: ["e|ge"],
139
+ EJS: ["ejs"],
140
+ Elixir: ["ex|exs"],
141
+ Elm: ["elm"],
142
+ Erlang: ["erl|hrl"],
143
+ Flix: ["flix"],
144
+ Forth: ["frt|fs|ldr|fth|4th"],
145
+ Fortran: ["f|f90"],
146
+ FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
147
+ FSL: ["fsl"],
148
+ FTL: ["ftl"],
149
+ Gcode: ["gcode"],
150
+ Gherkin: ["feature"],
151
+ Gitignore: ["^.gitignore"],
152
+ Glsl: ["glsl|frag|vert"],
153
+ Gobstones: ["gbs"],
154
+ golang: ["go"],
155
+ GraphQLSchema: ["gql"],
156
+ Groovy: ["groovy"],
157
+ HAML: ["haml"],
158
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
159
+ Haskell: ["hs"],
160
+ Haskell_Cabal: ["cabal"],
161
+ haXe: ["hx"],
162
+ Hjson: ["hjson"],
163
+ HTML: ["html|htm|xhtml|we|wpy"],
164
+ HTML_Elixir: ["eex|html.eex"],
165
+ HTML_Ruby: ["erb|rhtml|html.erb"],
166
+ INI: ["ini|conf|cfg|prefs"],
167
+ Io: ["io"],
168
+ Ion: ["ion"],
169
+ Jack: ["jack"],
170
+ Jade: ["jade|pug"],
171
+ Java: ["java"],
172
+ JavaScript: ["js|jsm|cjs|mjs"],
173
+ JEXL: ["jexl"],
174
+ JSON: ["json"],
175
+ JSON5: ["json5"],
176
+ JSONiq: ["jq"],
177
+ JSP: ["jsp"],
178
+ JSSM: ["jssm|jssm_state"],
179
+ JSX: ["jsx"],
180
+ Julia: ["jl"],
181
+ Kotlin: ["kt|kts"],
182
+ LaTeX: ["tex|latex|ltx|bib"],
183
+ Latte: ["latte"],
184
+ LESS: ["less"],
185
+ Liquid: ["liquid"],
186
+ Lisp: ["lisp"],
187
+ LiveScript: ["ls"],
188
+ Log: ["log"],
189
+ LogiQL: ["logic|lql"],
190
+ Logtalk: ["lgt"],
191
+ LSL: ["lsl"],
192
+ Lua: ["lua"],
193
+ LuaPage: ["lp"],
194
+ Lucene: ["lucene"],
195
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
196
+ Markdown: ["md|markdown"],
197
+ Mask: ["mask"],
198
+ MATLAB: ["matlab"],
199
+ Maze: ["mz"],
200
+ MediaWiki: ["wiki|mediawiki"],
201
+ MEL: ["mel"],
202
+ MIPS: ["s|asm"],
203
+ MIXAL: ["mixal"],
204
+ MUSHCode: ["mc|mush"],
205
+ MySQL: ["mysql"],
206
+ Nasal: ["nas"],
207
+ Nginx: ["nginx|conf"],
208
+ Nim: ["nim"],
209
+ Nix: ["nix"],
210
+ NSIS: ["nsi|nsh"],
211
+ Nunjucks: ["nunjucks|nunjs|nj|njk"],
212
+ ObjectiveC: ["m|mm"],
213
+ OCaml: ["ml|mli"],
214
+ Odin: ["odin"],
215
+ PartiQL: ["partiql|pql"],
216
+ Pascal: ["pas|p"],
217
+ Perl: ["pl|pm"],
218
+ pgSQL: ["pgsql"],
219
+ PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
220
+ PHP_Laravel_blade: ["blade.php"],
221
+ Pig: ["pig"],
222
+ PLSQL: ["plsql"],
223
+ Powershell: ["ps1"],
224
+ Praat: ["praat|praatscript|psc|proc"],
225
+ Prisma: ["prisma"],
226
+ Prolog: ["plg|prolog"],
227
+ Properties: ["properties"],
228
+ Protobuf: ["proto"],
229
+ PRQL: ["prql"],
230
+ Puppet: ["epp|pp"],
231
+ Python: ["py"],
232
+ QML: ["qml"],
233
+ R: ["r"],
234
+ Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
235
+ Razor: ["cshtml|asp"],
236
+ RDoc: ["Rd"],
237
+ Red: ["red|reds"],
238
+ RHTML: ["Rhtml"],
239
+ Robot: ["robot|resource"],
240
+ RST: ["rst"],
241
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
242
+ Rust: ["rs"],
243
+ SaC: ["sac"],
244
+ SASS: ["sass"],
245
+ SCAD: ["scad"],
246
+ Scala: ["scala|sbt"],
247
+ Scheme: ["scm|sm|rkt|oak|scheme"],
248
+ Scrypt: ["scrypt"],
249
+ SCSS: ["scss"],
250
+ SH: ["sh|bash|^.bashrc"],
251
+ SJS: ["sjs"],
252
+ Slim: ["slim|skim"],
253
+ Smarty: ["smarty|tpl"],
254
+ Smithy: ["smithy"],
255
+ snippets: ["snippets"],
256
+ Soy_Template: ["soy"],
257
+ Space: ["space"],
258
+ SPARQL: ["rq"],
259
+ SQL: ["sql"],
260
+ SQLServer: ["sqlserver"],
261
+ Stylus: ["styl|stylus"],
262
+ SVG: ["svg"],
263
+ Swift: ["swift"],
264
+ Tcl: ["tcl"],
265
+ Terraform: ["tf", "tfvars", "terragrunt"],
266
+ Tex: ["tex"],
267
+ Text: ["txt"],
268
+ Textile: ["textile"],
269
+ Toml: ["toml"],
270
+ TSX: ["tsx"],
271
+ Turtle: ["ttl"],
272
+ Twig: ["twig|swig"],
273
+ Typescript: ["ts|mts|cts|typescript|str"],
274
+ Vala: ["vala"],
275
+ VBScript: ["vbs|vb"],
276
+ Velocity: ["vm"],
277
+ Verilog: ["v|vh|sv|svh"],
278
+ VHDL: ["vhd|vhdl"],
279
+ Visualforce: ["vfp|component|page"],
280
+ Vue: ["vue"],
281
+ Wollok: ["wlk|wpgm|wtest"],
282
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
283
+ XQuery: ["xq"],
284
+ YAML: ["yaml|yml"],
285
+ Zeek: ["zeek|bro"],
286
+ Zig: ["zig"]
287
+ };
288
+ var nameOverrides = {
289
+ ObjectiveC: "Objective-C",
290
+ CSharp: "C#",
291
+ golang: "Go",
292
+ C_Cpp: "C and C++",
293
+ Csound_Document: "Csound Document",
294
+ Csound_Orchestra: "Csound",
295
+ Csound_Score: "Csound Score",
296
+ coffee: "CoffeeScript",
297
+ HTML_Ruby: "HTML (Ruby)",
298
+ HTML_Elixir: "HTML (Elixir)",
299
+ FTL: "FreeMarker",
300
+ PHP_Laravel_blade: "PHP (Blade Template)",
301
+ Perl6: "Perl 6",
302
+ AutoHotKey: "AutoHotkey / AutoIt"
303
+ };
304
+ var modesByName = {};
305
+ for (var name in supportedModes) {
306
+ var data = supportedModes[name];
307
+ var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
308
+ var filename = name.toLowerCase();
309
+ var mode = new Mode(filename, displayName, data[0]);
310
+ modesByName[filename] = mode;
311
+ modes.push(mode);
312
+ }
313
+ module.exports = {
314
+ getModeForPath: getModeForPath,
315
+ modes: modes,
316
+ modesByName: modesByName
317
+ };
318
+
319
+ });
320
+
321
+ ace.define("ace/ext/themelist",["require","exports","module"], function(require, exports, module){/**
322
+ * Generates a list of themes available when ace was built.
323
+ * @fileOverview Generates a list of themes available when ace was built.
324
+ * @author <a href="mailto:matthewkastor@gmail.com">
325
+ * Matthew Christopher Kastor-Inare III </a><br />
326
+ * ☭ Hial Atropa!! ☭
327
+ */
328
+ "use strict";
329
+ var themeData = [
330
+ ["Chrome"],
331
+ ["Clouds"],
332
+ ["Crimson Editor"],
333
+ ["Dawn"],
334
+ ["Dreamweaver"],
335
+ ["Eclipse"],
336
+ ["GitHub Light Default"],
337
+ ["GitHub (Legacy)", "github", "light"],
338
+ ["IPlastic"],
339
+ ["Solarized Light"],
340
+ ["TextMate"],
341
+ ["Tomorrow"],
342
+ ["XCode"],
343
+ ["Kuroir"],
344
+ ["KatzenMilch"],
345
+ ["SQL Server", "sqlserver", "light"],
346
+ ["CloudEditor", "cloud_editor", "light"],
347
+ ["Ambiance", "ambiance", "dark"],
348
+ ["Chaos", "chaos", "dark"],
349
+ ["Clouds Midnight", "clouds_midnight", "dark"],
350
+ ["Dracula", "", "dark"],
351
+ ["Cobalt", "cobalt", "dark"],
352
+ ["Gruvbox", "gruvbox", "dark"],
353
+ ["Green on Black", "gob", "dark"],
354
+ ["idle Fingers", "idle_fingers", "dark"],
355
+ ["krTheme", "kr_theme", "dark"],
356
+ ["Merbivore", "merbivore", "dark"],
357
+ ["Merbivore Soft", "merbivore_soft", "dark"],
358
+ ["Mono Industrial", "mono_industrial", "dark"],
359
+ ["Monokai", "monokai", "dark"],
360
+ ["Nord Dark", "nord_dark", "dark"],
361
+ ["One Dark", "one_dark", "dark"],
362
+ ["Pastel on dark", "pastel_on_dark", "dark"],
363
+ ["Solarized Dark", "solarized_dark", "dark"],
364
+ ["Terminal", "terminal", "dark"],
365
+ ["Tomorrow Night", "tomorrow_night", "dark"],
366
+ ["Tomorrow Night Blue", "tomorrow_night_blue", "dark"],
367
+ ["Tomorrow Night Bright", "tomorrow_night_bright", "dark"],
368
+ ["Tomorrow Night 80s", "tomorrow_night_eighties", "dark"],
369
+ ["Twilight", "twilight", "dark"],
370
+ ["Vibrant Ink", "vibrant_ink", "dark"],
371
+ ["GitHub Dark", "github_dark", "dark"],
372
+ ["CloudEditor Dark", "cloud_editor_dark", "dark"]
373
+ ];
374
+ exports.themesByName = {};
375
+ exports.themes = themeData.map(function (data) {
376
+ var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
377
+ var theme = {
378
+ caption: data[0],
379
+ theme: "ace/theme/" + name,
380
+ isDark: data[2] == "dark",
381
+ name: name
382
+ };
383
+ exports.themesByName[name] = theme;
384
+ return theme;
385
+ });
386
+
387
+ });
388
+
389
+ ace.define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module){"use strict";
390
+ require("./menu_tools/overlay_page");
391
+ var dom = require("../lib/dom");
392
+ var oop = require("../lib/oop");
393
+ var config = require("../config");
394
+ var EventEmitter = require("../lib/event_emitter").EventEmitter;
395
+ var buildDom = dom.buildDom;
396
+ var modelist = require("./modelist");
397
+ var themelist = require("./themelist");
398
+ var themes = { Bright: [], Dark: [] };
399
+ themelist.themes.forEach(function (x) {
400
+ themes[x.isDark ? "Dark" : "Bright"].push({ caption: x.caption, value: x.theme });
401
+ });
402
+ var modes = modelist.modes.map(function (x) {
403
+ return { caption: x.caption, value: x.mode };
404
+ });
405
+ var optionGroups = {
406
+ Main: {
407
+ Mode: {
408
+ path: "mode",
409
+ type: "select",
410
+ items: modes
411
+ },
412
+ Theme: {
413
+ path: "theme",
414
+ type: "select",
415
+ items: themes
416
+ },
417
+ "Keybinding": {
418
+ type: "buttonBar",
419
+ path: "keyboardHandler",
420
+ items: [
421
+ { caption: "Ace", value: null },
422
+ { caption: "Vim", value: "ace/keyboard/vim" },
423
+ { caption: "Emacs", value: "ace/keyboard/emacs" },
424
+ { caption: "Sublime", value: "ace/keyboard/sublime" },
425
+ { caption: "VSCode", value: "ace/keyboard/vscode" }
426
+ ]
427
+ },
428
+ "Font Size": {
429
+ path: "fontSize",
430
+ type: "number",
431
+ defaultValue: 12,
432
+ defaults: [
433
+ { caption: "12px", value: 12 },
434
+ { caption: "24px", value: 24 }
435
+ ]
436
+ },
437
+ "Soft Wrap": {
438
+ type: "buttonBar",
439
+ path: "wrap",
440
+ items: [
441
+ { caption: "Off", value: "off" },
442
+ { caption: "View", value: "free" },
443
+ { caption: "margin", value: "printMargin" },
444
+ { caption: "40", value: "40" }
445
+ ]
446
+ },
447
+ "Cursor Style": {
448
+ path: "cursorStyle",
449
+ items: [
450
+ { caption: "Ace", value: "ace" },
451
+ { caption: "Slim", value: "slim" },
452
+ { caption: "Smooth", value: "smooth" },
453
+ { caption: "Smooth And Slim", value: "smooth slim" },
454
+ { caption: "Wide", value: "wide" }
455
+ ]
456
+ },
457
+ "Folding": {
458
+ path: "foldStyle",
459
+ items: [
460
+ { caption: "Manual", value: "manual" },
461
+ { caption: "Mark begin", value: "markbegin" },
462
+ { caption: "Mark begin and end", value: "markbeginend" }
463
+ ]
464
+ },
465
+ "Soft Tabs": [{
466
+ path: "useSoftTabs"
467
+ }, {
468
+ ariaLabel: "Tab Size",
469
+ path: "tabSize",
470
+ type: "number",
471
+ values: [2, 3, 4, 8, 16]
472
+ }],
473
+ "Overscroll": {
474
+ type: "buttonBar",
475
+ path: "scrollPastEnd",
476
+ items: [
477
+ { caption: "None", value: 0 },
478
+ { caption: "Half", value: 0.5 },
479
+ { caption: "Full", value: 1 }
480
+ ]
481
+ }
482
+ },
483
+ More: {
484
+ "Atomic soft tabs": {
485
+ path: "navigateWithinSoftTabs"
486
+ },
487
+ "Enable Behaviours": {
488
+ path: "behavioursEnabled"
489
+ },
490
+ "Wrap with quotes": {
491
+ path: "wrapBehavioursEnabled"
492
+ },
493
+ "Enable Auto Indent": {
494
+ path: "enableAutoIndent"
495
+ },
496
+ "Full Line Selection": {
497
+ type: "checkbox",
498
+ values: "text|line",
499
+ path: "selectionStyle"
500
+ },
501
+ "Highlight Active Line": {
502
+ path: "highlightActiveLine"
503
+ },
504
+ "Show Invisibles": {
505
+ path: "showInvisibles"
506
+ },
507
+ "Show Indent Guides": {
508
+ path: "displayIndentGuides"
509
+ },
510
+ "Highlight Indent Guides": {
511
+ path: "highlightIndentGuides"
512
+ },
513
+ "Persistent HScrollbar": {
514
+ path: "hScrollBarAlwaysVisible"
515
+ },
516
+ "Persistent VScrollbar": {
517
+ path: "vScrollBarAlwaysVisible"
518
+ },
519
+ "Animate scrolling": {
520
+ path: "animatedScroll"
521
+ },
522
+ "Show Gutter": {
523
+ path: "showGutter"
524
+ },
525
+ "Show Line Numbers": {
526
+ path: "showLineNumbers"
527
+ },
528
+ "Relative Line Numbers": {
529
+ path: "relativeLineNumbers"
530
+ },
531
+ "Fixed Gutter Width": {
532
+ path: "fixedWidthGutter"
533
+ },
534
+ "Show Print Margin": [{
535
+ path: "showPrintMargin"
536
+ }, {
537
+ ariaLabel: "Print Margin",
538
+ type: "number",
539
+ path: "printMarginColumn"
540
+ }],
541
+ "Indented Soft Wrap": {
542
+ path: "indentedSoftWrap"
543
+ },
544
+ "Highlight selected word": {
545
+ path: "highlightSelectedWord"
546
+ },
547
+ "Fade Fold Widgets": {
548
+ path: "fadeFoldWidgets"
549
+ },
550
+ "Use textarea for IME": {
551
+ path: "useTextareaForIME"
552
+ },
553
+ "Merge Undo Deltas": {
554
+ path: "mergeUndoDeltas",
555
+ items: [
556
+ { caption: "Always", value: "always" },
557
+ { caption: "Never", value: "false" },
558
+ { caption: "Timed", value: "true" }
559
+ ]
560
+ },
561
+ "Elastic Tabstops": {
562
+ path: "useElasticTabstops"
563
+ },
564
+ "Incremental Search": {
565
+ path: "useIncrementalSearch"
566
+ },
567
+ "Read-only": {
568
+ path: "readOnly"
569
+ },
570
+ "Copy without selection": {
571
+ path: "copyWithEmptySelection"
572
+ },
573
+ "Live Autocompletion": {
574
+ path: "enableLiveAutocompletion"
575
+ },
576
+ "Custom scrollbar": {
577
+ path: "customScrollbar"
578
+ },
579
+ "Use SVG gutter icons": {
580
+ path: "useSvgGutterIcons"
581
+ },
582
+ "Annotations for folded lines": {
583
+ path: "showFoldedAnnotations"
584
+ },
585
+ "Keyboard Accessibility Mode": {
586
+ path: "enableKeyboardAccessibility"
587
+ },
588
+ "Gutter tooltip follows mouse": {
589
+ path: "tooltipFollowsMouse",
590
+ defaultValue: true
591
+ }
592
+ }
593
+ };
594
+ var OptionPanel = /** @class */ (function () {
595
+ function OptionPanel(editor, element) {
596
+ this.editor = editor;
597
+ this.container = element || document.createElement("div");
598
+ this.groups = [];
599
+ this.options = {};
600
+ }
601
+ OptionPanel.prototype.add = function (config) {
602
+ if (config.Main)
603
+ oop.mixin(optionGroups.Main, config.Main);
604
+ if (config.More)
605
+ oop.mixin(optionGroups.More, config.More);
606
+ };
607
+ OptionPanel.prototype.render = function () {
608
+ this.container.innerHTML = "";
609
+ buildDom(["table", { role: "presentation", id: "controls" },
610
+ this.renderOptionGroup(optionGroups.Main),
611
+ ["tr", null, ["td", { colspan: 2 },
612
+ ["table", { role: "presentation", id: "more-controls" },
613
+ this.renderOptionGroup(optionGroups.More)
614
+ ]
615
+ ]],
616
+ ["tr", null, ["td", { colspan: 2 }, "version " + config.version]]
617
+ ], this.container);
618
+ };
619
+ OptionPanel.prototype.renderOptionGroup = function (group) {
620
+ return Object.keys(group).map(function (key, i) {
621
+ var item = group[key];
622
+ if (!item.position)
623
+ item.position = i / 10000;
624
+ if (!item.label)
625
+ item.label = key;
626
+ return item;
627
+ }).sort(function (a, b) {
628
+ return a.position - b.position;
629
+ }).map(function (item) {
630
+ return this.renderOption(item.label, item);
631
+ }, this);
632
+ };
633
+ OptionPanel.prototype.renderOptionControl = function (key, option) {
634
+ var self = this;
635
+ if (Array.isArray(option)) {
636
+ return option.map(function (x) {
637
+ return self.renderOptionControl(key, x);
638
+ });
639
+ }
640
+ var control;
641
+ var value = self.getOption(option);
642
+ if (option.values && option.type != "checkbox") {
643
+ if (typeof option.values == "string")
644
+ option.values = option.values.split("|");
645
+ option.items = option.values.map(function (v) {
646
+ return { value: v, name: v };
647
+ });
648
+ }
649
+ if (option.type == "buttonBar") {
650
+ control = ["div", { role: "group", "aria-labelledby": option.path + "-label" }, option.items.map(function (item) {
651
+ return ["button", {
652
+ value: item.value,
653
+ ace_selected_button: value == item.value,
654
+ 'aria-pressed': value == item.value,
655
+ onclick: function () {
656
+ self.setOption(option, item.value);
657
+ var nodes = this.parentNode.querySelectorAll("[ace_selected_button]");
658
+ for (var i = 0; i < nodes.length; i++) {
659
+ nodes[i].removeAttribute("ace_selected_button");
660
+ nodes[i].setAttribute("aria-pressed", false);
661
+ }
662
+ this.setAttribute("ace_selected_button", true);
663
+ this.setAttribute("aria-pressed", true);
664
+ }
665
+ }, item.desc || item.caption || item.name];
666
+ })];
667
+ }
668
+ else if (option.type == "number") {
669
+ control = ["input", { type: "number", value: value || option.defaultValue, style: "width:3em", oninput: function () {
670
+ self.setOption(option, parseInt(this.value));
671
+ } }];
672
+ if (option.ariaLabel) {
673
+ control[1]["aria-label"] = option.ariaLabel;
674
+ }
675
+ else {
676
+ control[1].id = key;
677
+ }
678
+ if (option.defaults) {
679
+ control = [control, option.defaults.map(function (item) {
680
+ return ["button", { onclick: function () {
681
+ var input = this.parentNode.firstChild;
682
+ input.value = item.value;
683
+ input.oninput();
684
+ } }, item.caption];
685
+ })];
686
+ }
687
+ }
688
+ else if (option.items) {
689
+ var buildItems = function (items) {
690
+ return items.map(function (item) {
691
+ return ["option", { value: item.value || item.name }, item.desc || item.caption || item.name];
692
+ });
693
+ };
694
+ var items = Array.isArray(option.items)
695
+ ? buildItems(option.items)
696
+ : Object.keys(option.items).map(function (key) {
697
+ return ["optgroup", { "label": key }, buildItems(option.items[key])];
698
+ });
699
+ control = ["select", { id: key, value: value, onchange: function () {
700
+ self.setOption(option, this.value);
701
+ } }, items];
702
+ }
703
+ else {
704
+ if (typeof option.values == "string")
705
+ option.values = option.values.split("|");
706
+ if (option.values)
707
+ value = value == option.values[1];
708
+ control = ["input", { type: "checkbox", id: key, checked: value || null, onchange: function () {
709
+ var value = this.checked;
710
+ if (option.values)
711
+ value = option.values[value ? 1 : 0];
712
+ self.setOption(option, value);
713
+ } }];
714
+ if (option.type == "checkedNumber") {
715
+ control = [control, []];
716
+ }
717
+ }
718
+ return control;
719
+ };
720
+ OptionPanel.prototype.renderOption = function (key, option) {
721
+ if (option.path && !option.onchange && !this.editor.$options[option.path])
722
+ return;
723
+ var path = Array.isArray(option) ? option[0].path : option.path;
724
+ this.options[path] = option;
725
+ var safeKey = "-" + path;
726
+ var safeId = path + "-label";
727
+ var control = this.renderOptionControl(safeKey, option);
728
+ return ["tr", { class: "ace_optionsMenuEntry" }, ["td",
729
+ ["label", { for: safeKey, id: safeId }, key]
730
+ ], ["td", control]];
731
+ };
732
+ OptionPanel.prototype.setOption = function (option, value) {
733
+ if (typeof option == "string")
734
+ option = this.options[option];
735
+ if (value == "false")
736
+ value = false;
737
+ if (value == "true")
738
+ value = true;
739
+ if (value == "null")
740
+ value = null;
741
+ if (value == "undefined")
742
+ value = undefined;
743
+ if (typeof value == "string" && parseFloat(value).toString() == value)
744
+ value = parseFloat(value);
745
+ if (option.onchange)
746
+ option.onchange(value);
747
+ else if (option.path)
748
+ this.editor.setOption(option.path, value);
749
+ this._signal("setOption", { name: option.path, value: value });
750
+ };
751
+ OptionPanel.prototype.getOption = function (option) {
752
+ if (option.getValue)
753
+ return option.getValue();
754
+ return this.editor.getOption(option.path);
755
+ };
756
+ return OptionPanel;
757
+ }());
758
+ oop.implement(OptionPanel.prototype, EventEmitter);
759
+ exports.OptionPanel = OptionPanel;
760
+
761
+ });
762
+
763
+ ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/options","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module){/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
764
+ "use strict";
765
+ var OptionPanel = require("./options").OptionPanel;
766
+ var overlayPage = require('./menu_tools/overlay_page').overlayPage;
767
+ function showSettingsMenu(editor) {
768
+ if (!document.getElementById('ace_settingsmenu')) {
769
+ var options = new OptionPanel(editor);
770
+ options.render();
771
+ options.container.id = "ace_settingsmenu";
772
+ overlayPage(editor, options.container);
773
+ options.container.querySelector("select,input,button,checkbox").focus();
774
+ }
775
+ }
776
+ module.exports.init = function () {
777
+ var Editor = require("../editor").Editor;
778
+ Editor.prototype.showSettingsMenu = function () {
779
+ showSettingsMenu(this);
780
+ };
781
+ };
782
+
783
+ }); (function() {
784
+ ace.require(["ace/ext/settings_menu"], function(m) {
785
+ if (typeof module == "object" && typeof exports == "object" && module) {
786
+ module.exports = m;
787
+ }
788
+ });
789
+ })();
790
+