@limetech/lime-elements 36.1.0-next.9 → 36.1.0
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/dist/cjs/{checkbox.template-b6c6562c.js → checkbox.template-ac867c17.js} +1 -1
- package/dist/cjs/{index-2a28697b.js → index-287e25e0.js} +424 -246
- package/dist/cjs/lime-elements.cjs.js +3 -3
- package/dist/cjs/limel-badge.cjs.entry.js +2 -1
- package/dist/cjs/limel-banner.cjs.entry.js +3 -1
- package/dist/cjs/limel-button-group.cjs.entry.js +3 -8
- package/dist/cjs/{limel-button.cjs.entry.js → limel-button_2.cjs.entry.js} +117 -21
- package/dist/cjs/limel-checkbox.cjs.entry.js +10 -26
- package/dist/cjs/limel-chip-set.cjs.entry.js +21 -52
- package/dist/cjs/{limel-linear-progress.cjs.entry.js → limel-circular-progress_2.cjs.entry.js} +34 -7
- package/dist/cjs/limel-code-editor.cjs.entry.js +110 -97
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +4 -5
- package/dist/cjs/limel-color-picker-palette.cjs.entry.js +5 -1
- package/dist/cjs/limel-color-picker.cjs.entry.js +8 -2
- package/dist/cjs/limel-config.cjs.entry.js +2 -1
- package/dist/cjs/limel-date-picker.cjs.entry.js +15 -33
- package/dist/cjs/limel-dialog.cjs.entry.js +4 -12
- package/dist/cjs/limel-dock-button.cjs.entry.js +5 -15
- package/dist/cjs/limel-dock.cjs.entry.js +8 -40
- package/dist/cjs/limel-file.cjs.entry.js +10 -24
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +149 -48
- package/dist/cjs/limel-flex-container.cjs.entry.js +1 -13
- package/dist/cjs/limel-form.cjs.entry.js +327 -326
- package/dist/cjs/limel-grid.cjs.entry.js +1 -1
- package/dist/cjs/limel-header.cjs.entry.js +5 -1
- package/dist/cjs/limel-icon-button.cjs.entry.js +3 -8
- package/dist/cjs/limel-icon.cjs.entry.js +4 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +95 -0
- package/dist/cjs/limel-input-field.cjs.entry.js +27 -60
- package/dist/cjs/limel-list_2.cjs.entry.js +10 -21
- package/dist/cjs/limel-menu-list.cjs.entry.js +7 -14
- package/dist/cjs/limel-picker.cjs.entry.js +14 -39
- package/dist/cjs/limel-popover_4.cjs.entry.js +13 -12
- package/dist/cjs/limel-portal.cjs.entry.js +63 -73
- package/dist/cjs/limel-progress-flow-item.cjs.entry.js +4 -13
- package/dist/cjs/limel-progress-flow.cjs.entry.js +4 -20
- package/dist/cjs/limel-select.cjs.entry.js +19 -31
- package/dist/cjs/limel-shortcut.cjs.entry.js +52 -0
- package/dist/cjs/limel-slider.cjs.entry.js +12 -33
- package/dist/cjs/limel-snackbar.cjs.entry.js +7 -5
- package/dist/cjs/limel-spinner.cjs.entry.js +1 -7
- package/dist/cjs/limel-split-button.cjs.entry.js +35 -0
- package/dist/cjs/limel-switch.cjs.entry.js +6 -19
- package/dist/cjs/limel-tab-bar.cjs.entry.js +2 -5
- package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -5
- package/dist/cjs/limel-table.cjs.entry.js +16 -28
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{translations-5a8d7f6c.js → translations-ca7279bc.js} +6 -0
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/badge/badge.js +35 -26
- package/dist/collection/components/banner/banner.js +88 -83
- package/dist/collection/components/button/button.css +4 -1
- package/dist/collection/components/button/button.js +148 -160
- package/dist/collection/components/button-group/button-group.js +81 -79
- package/dist/collection/components/checkbox/checkbox.js +172 -176
- package/dist/collection/components/checkbox/checkbox.template.js +15 -23
- package/dist/collection/components/chip-set/chip-set.js +486 -528
- package/dist/collection/components/circular-progress/circular-progress.css +27 -5
- package/dist/collection/components/circular-progress/circular-progress.js +129 -113
- package/dist/collection/components/code-editor/code-editor.js +178 -182
- package/dist/collection/components/collapsible-section/collapsible-section.js +120 -124
- package/dist/collection/components/color-picker/color-picker-palette.js +102 -92
- package/dist/collection/components/color-picker/color-picker.js +143 -131
- package/dist/collection/components/config/config.js +21 -17
- package/dist/collection/components/date-picker/date-picker.js +254 -261
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +591 -166
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +150 -143
- package/dist/collection/components/date-picker/pickers/QuarterPicker.js +1 -3
- package/dist/collection/components/dialog/dialog.css +7 -1
- package/dist/collection/components/dialog/dialog.js +134 -142
- package/dist/collection/components/dock/dock-button/dock-button.js +138 -141
- package/dist/collection/components/dock/dock.js +204 -233
- package/dist/collection/components/file/file.js +187 -191
- package/dist/collection/components/flex-container/flex-container.js +96 -102
- package/dist/collection/components/form/form.js +158 -150
- package/dist/collection/components/form/widgets/code-editor.js +2 -0
- package/dist/collection/components/grid/grid.js +11 -7
- package/dist/collection/components/header/header.js +89 -87
- package/dist/collection/components/icon/icon.js +79 -66
- package/dist/collection/components/icon-button/icon-button.js +85 -85
- package/dist/collection/components/info-tile/info-tile.css +310 -0
- package/dist/collection/components/info-tile/info-tile.js +294 -0
- package/dist/collection/components/info-tile/info-tile.types.js +1 -0
- package/dist/collection/components/input-field/input-field.css +3 -0
- package/dist/collection/components/input-field/input-field.js +482 -523
- package/dist/collection/components/linear-progress/linear-progress.js +57 -61
- package/dist/collection/components/list/list-renderer.js +3 -12
- package/dist/collection/components/list/list.css +11 -116
- package/dist/collection/components/list/list.js +167 -166
- package/dist/collection/components/list/radio-button/radio-button.template.js +2 -8
- package/dist/collection/components/menu/menu.js +183 -195
- package/dist/collection/components/menu-list/menu-list-renderer.js +2 -9
- package/dist/collection/components/menu-list/menu-list.css +11 -116
- package/dist/collection/components/menu-list/menu-list.js +149 -146
- package/dist/collection/components/menu-surface/menu-surface.js +69 -64
- package/dist/collection/components/picker/picker.js +412 -427
- package/dist/collection/components/popover/popover.js +79 -74
- package/dist/collection/components/popover-surface/popover-surface.js +34 -25
- package/dist/collection/components/portal/portal.js +145 -158
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.js +90 -94
- package/dist/collection/components/progress-flow/progress-flow.js +93 -101
- package/dist/collection/components/select/select.css +8 -7
- package/dist/collection/components/select/select.js +206 -211
- package/dist/collection/components/select/select.template.js +17 -26
- package/dist/collection/components/shortcut/shortcut.css +91 -0
- package/dist/collection/components/shortcut/shortcut.js +161 -0
- package/dist/collection/components/slider/slider.js +233 -264
- package/dist/collection/components/snackbar/snackbar.js +175 -169
- package/dist/collection/components/spinner/spinner.js +56 -85
- package/dist/collection/components/split-button/split-button.css +84 -0
- package/dist/collection/components/split-button/split-button.js +176 -0
- package/dist/collection/components/switch/switch.js +117 -129
- package/dist/collection/components/tab-bar/tab-bar.js +87 -92
- package/dist/collection/components/tab-panel/tab-panel.js +64 -61
- package/dist/collection/components/table/table.js +447 -457
- package/dist/collection/components/tooltip/tooltip-content.js +70 -61
- package/dist/collection/components/tooltip/tooltip.js +96 -91
- package/dist/collection/global/shared-types/link.types.js +1 -0
- package/dist/collection/style/internal/z-index.scss +0 -5
- package/dist/collection/translations/da.js +1 -0
- package/dist/collection/translations/en.js +1 -0
- package/dist/collection/translations/fi.js +1 -0
- package/dist/collection/translations/nl.js +1 -0
- package/dist/collection/translations/no.js +1 -0
- package/dist/collection/translations/sv.js +1 -0
- package/dist/esm/{checkbox.template-2f1bbc98.js → checkbox.template-fc7fcd06.js} +1 -1
- package/dist/esm/{index-11cd0b60.js → index-cdfd351d.js} +424 -246
- package/dist/esm/lime-elements.js +3 -3
- package/dist/esm/limel-badge.entry.js +2 -1
- package/dist/esm/limel-banner.entry.js +3 -1
- package/dist/esm/limel-button-group.entry.js +3 -8
- package/dist/esm/{limel-button.entry.js → limel-button_2.entry.js} +117 -22
- package/dist/esm/limel-checkbox.entry.js +10 -26
- package/dist/esm/limel-chip-set.entry.js +21 -52
- package/dist/esm/{limel-linear-progress.entry.js → limel-circular-progress_2.entry.js} +34 -8
- package/dist/esm/limel-code-editor.entry.js +110 -97
- package/dist/esm/limel-collapsible-section.entry.js +4 -5
- package/dist/esm/limel-color-picker-palette.entry.js +5 -1
- package/dist/esm/limel-color-picker.entry.js +8 -2
- package/dist/esm/limel-config.entry.js +2 -1
- package/dist/esm/limel-date-picker.entry.js +15 -33
- package/dist/esm/limel-dialog.entry.js +4 -12
- package/dist/esm/limel-dock-button.entry.js +5 -15
- package/dist/esm/limel-dock.entry.js +8 -40
- package/dist/esm/limel-file.entry.js +10 -24
- package/dist/esm/limel-flatpickr-adapter.entry.js +149 -48
- package/dist/esm/limel-flex-container.entry.js +1 -13
- package/dist/esm/limel-form.entry.js +327 -326
- package/dist/esm/limel-grid.entry.js +1 -1
- package/dist/esm/limel-header.entry.js +5 -1
- package/dist/esm/limel-icon-button.entry.js +3 -8
- package/dist/esm/limel-icon.entry.js +4 -1
- package/dist/esm/limel-info-tile.entry.js +91 -0
- package/dist/esm/limel-input-field.entry.js +27 -60
- package/dist/esm/limel-list_2.entry.js +10 -21
- package/dist/esm/limel-menu-list.entry.js +7 -14
- package/dist/esm/limel-picker.entry.js +14 -39
- package/dist/esm/limel-popover_4.entry.js +13 -12
- package/dist/esm/limel-portal.entry.js +63 -73
- package/dist/esm/limel-progress-flow-item.entry.js +4 -13
- package/dist/esm/limel-progress-flow.entry.js +4 -20
- package/dist/esm/limel-select.entry.js +19 -31
- package/dist/esm/limel-shortcut.entry.js +48 -0
- package/dist/esm/limel-slider.entry.js +12 -33
- package/dist/esm/limel-snackbar.entry.js +7 -5
- package/dist/esm/limel-spinner.entry.js +1 -7
- package/dist/esm/limel-split-button.entry.js +31 -0
- package/dist/esm/limel-switch.entry.js +6 -19
- package/dist/esm/limel-tab-bar.entry.js +2 -5
- package/dist/esm/limel-tab-panel.entry.js +2 -5
- package/dist/esm/limel-table.entry.js +16 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{translations-682e905e.js → translations-0d0ee941.js} +6 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-059e0a64.entry.js +1 -0
- package/dist/lime-elements/{p-440454ed.entry.js → p-06f2f6b4.entry.js} +1 -1
- package/dist/lime-elements/p-12a7453b.entry.js +73 -0
- package/dist/lime-elements/p-1386d86d.entry.js +82 -0
- package/dist/lime-elements/p-15c2eb16.entry.js +1 -0
- package/dist/lime-elements/{p-c80acfb2.entry.js → p-15ca0d70.entry.js} +4 -4
- package/dist/lime-elements/{p-ed65468d.entry.js → p-16eb9071.entry.js} +1 -1
- package/dist/lime-elements/{p-1ede893b.js → p-1af8258b.js} +1 -1
- package/dist/lime-elements/{p-71efe2ca.entry.js → p-21058db5.entry.js} +4 -3
- package/dist/lime-elements/p-246862ec.js +1 -0
- package/dist/lime-elements/p-36a3b897.entry.js +1 -0
- package/dist/lime-elements/p-4eda8b67.entry.js +82 -0
- package/dist/lime-elements/{p-9af0704c.entry.js → p-4fb4e89b.entry.js} +1 -1
- package/dist/lime-elements/p-4fc38050.entry.js +1 -0
- package/dist/lime-elements/{p-a5af84a7.entry.js → p-5338663b.entry.js} +1 -1
- package/dist/lime-elements/p-5ce60a32.entry.js +126 -0
- package/dist/lime-elements/p-5f13035a.entry.js +1 -0
- package/dist/lime-elements/p-5f29f099.entry.js +16 -0
- package/dist/lime-elements/p-600464a9.entry.js +1 -0
- package/dist/lime-elements/p-6534e16a.entry.js +1 -0
- package/dist/lime-elements/p-6a4a5ddd.entry.js +1 -0
- package/dist/lime-elements/p-6c38b505.entry.js +1 -0
- package/dist/lime-elements/p-75d01713.entry.js +1 -0
- package/dist/lime-elements/p-768b7cbb.entry.js +1 -0
- package/dist/lime-elements/{p-6e7809a6.entry.js → p-82cd7bb6.entry.js} +1 -1
- package/dist/lime-elements/p-84a137a7.entry.js +1 -0
- package/dist/lime-elements/{p-aa66620a.entry.js → p-8ab597a8.entry.js} +2 -2
- package/dist/lime-elements/{p-8827628d.entry.js → p-8fb83e83.entry.js} +2 -2
- package/dist/lime-elements/p-90961075.entry.js +1 -0
- package/dist/lime-elements/p-9984b31c.entry.js +1 -0
- package/dist/lime-elements/p-9bd76629.entry.js +59 -0
- package/dist/lime-elements/p-9ea8dd5c.entry.js +1 -0
- package/dist/lime-elements/p-cad7cda1.entry.js +16 -0
- package/dist/lime-elements/{p-104c89e8.entry.js → p-cfaa685f.entry.js} +1 -1
- package/dist/lime-elements/{p-94899019.entry.js → p-d1187867.entry.js} +1 -1
- package/dist/lime-elements/p-d4e788e1.js +2 -0
- package/dist/lime-elements/p-d512656b.entry.js +1 -0
- package/dist/lime-elements/p-d8e5a9ee.entry.js +1 -0
- package/dist/lime-elements/p-de161bb5.entry.js +1 -0
- package/dist/lime-elements/p-e4bca82b.entry.js +1 -0
- package/dist/lime-elements/p-e6f84d68.entry.js +1 -0
- package/dist/lime-elements/{p-c15da26d.entry.js → p-e7bb664f.entry.js} +1 -1
- package/dist/lime-elements/p-e88f7922.entry.js +1 -0
- package/dist/lime-elements/p-ec4c075d.entry.js +1 -0
- package/dist/lime-elements/p-f1ed857b.entry.js +37 -0
- package/dist/lime-elements/p-f33cfcb8.entry.js +11 -0
- package/dist/lime-elements/style/internal/z-index.scss +0 -5
- package/dist/loader/package.json +1 -0
- package/dist/types/components/circular-progress/circular-progress.d.ts +5 -0
- package/dist/types/components/dock/dock.d.ts +0 -1
- package/dist/types/components/info-tile/info-tile.d.ts +87 -0
- package/dist/types/components/info-tile/info-tile.types.d.ts +23 -0
- package/dist/types/components/picker/picker.d.ts +2 -2
- package/dist/types/components/shortcut/shortcut.d.ts +42 -0
- package/dist/types/components/split-button/split-button.d.ts +46 -0
- package/dist/types/components.d.ts +403 -67
- package/dist/types/global/shared-types/link.types.d.ts +25 -0
- package/dist/types/interface.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/translations/da.d.ts +1 -0
- package/dist/types/translations/en.d.ts +1 -0
- package/dist/types/translations/fi.d.ts +1 -0
- package/dist/types/translations/nl.d.ts +1 -0
- package/dist/types/translations/no.d.ts +1 -0
- package/dist/types/translations/sv.d.ts +1 -0
- package/package.json +21 -20
- package/dist/cjs/limel-circular-progress.cjs.entry.js +0 -44
- package/dist/cjs/limel-menu.cjs.entry.js +0 -137
- package/dist/esm/limel-circular-progress.entry.js +0 -40
- package/dist/esm/limel-menu.entry.js +0 -133
- package/dist/lime-elements/p-009de50e.entry.js +0 -1
- package/dist/lime-elements/p-19f72dab.entry.js +0 -1
- package/dist/lime-elements/p-2639edf9.entry.js +0 -73
- package/dist/lime-elements/p-2fc4f4ff.entry.js +0 -1
- package/dist/lime-elements/p-3b0c9885.entry.js +0 -37
- package/dist/lime-elements/p-3bf54a4c.js +0 -1
- package/dist/lime-elements/p-3cf4aae0.entry.js +0 -1
- package/dist/lime-elements/p-3f388717.entry.js +0 -11
- package/dist/lime-elements/p-41e902ac.entry.js +0 -126
- package/dist/lime-elements/p-4dc07252.entry.js +0 -82
- package/dist/lime-elements/p-53e01330.entry.js +0 -1
- package/dist/lime-elements/p-5ef52589.entry.js +0 -1
- package/dist/lime-elements/p-629862f4.entry.js +0 -1
- package/dist/lime-elements/p-63e25a0a.entry.js +0 -1
- package/dist/lime-elements/p-6b1bc80f.entry.js +0 -1
- package/dist/lime-elements/p-93cd2268.entry.js +0 -1
- package/dist/lime-elements/p-95f275ab.entry.js +0 -1
- package/dist/lime-elements/p-9917f042.entry.js +0 -16
- package/dist/lime-elements/p-995bbd2a.entry.js +0 -1
- package/dist/lime-elements/p-a465084b.entry.js +0 -82
- package/dist/lime-elements/p-b0046fcd.entry.js +0 -1
- package/dist/lime-elements/p-b0e54dc2.entry.js +0 -1
- package/dist/lime-elements/p-b4de3380.entry.js +0 -1
- package/dist/lime-elements/p-c59cbd68.entry.js +0 -1
- package/dist/lime-elements/p-d74fa89e.entry.js +0 -1
- package/dist/lime-elements/p-e98d76e8.entry.js +0 -59
- package/dist/lime-elements/p-e9a95b8f.js +0 -1
- package/dist/lime-elements/p-eec907ac.entry.js +0 -1
- package/dist/lime-elements/p-f0c9dadd.entry.js +0 -1
- package/dist/lime-elements/p-f0e872b6.entry.js +0 -16
- package/dist/lime-elements/p-f41567a1.entry.js +0 -1
- package/dist/lime-elements/p-f5df4d4f.entry.js +0 -1
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-287e25e0.js');
|
|
6
6
|
const _commonjsHelpers = require('./_commonjsHelpers-0c557e26.js');
|
|
7
7
|
|
|
8
8
|
var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
9
9
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
10
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
10
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11
11
|
|
|
12
|
-
// This is CodeMirror (https://codemirror.net), a code editor
|
|
12
|
+
// This is CodeMirror (https://codemirror.net/5), a code editor
|
|
13
13
|
// implemented in JavaScript on top of the browser's DOM.
|
|
14
14
|
//
|
|
15
15
|
// You can find some technical background for some of the code below
|
|
@@ -31,7 +31,8 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
31
31
|
var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
|
|
32
32
|
var webkit = !edge && /WebKit\//.test(userAgent);
|
|
33
33
|
var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
|
|
34
|
-
var chrome = !edge && /Chrome
|
|
34
|
+
var chrome = !edge && /Chrome\/(\d+)/.exec(userAgent);
|
|
35
|
+
var chrome_version = chrome && +chrome[1];
|
|
35
36
|
var presto = /Opera\//.test(userAgent);
|
|
36
37
|
var safari = /Apple Computer/.test(navigator.vendor);
|
|
37
38
|
var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
|
|
@@ -116,15 +117,15 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
116
117
|
} while (child = child.parentNode)
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
function activeElt() {
|
|
120
|
+
function activeElt(doc) {
|
|
120
121
|
// IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
|
|
121
122
|
// IE < 10 will throw when accessed while the page is loading or in an iframe.
|
|
122
123
|
// IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
|
|
123
124
|
var activeElement;
|
|
124
125
|
try {
|
|
125
|
-
activeElement =
|
|
126
|
+
activeElement = doc.activeElement;
|
|
126
127
|
} catch(e) {
|
|
127
|
-
activeElement =
|
|
128
|
+
activeElement = doc.body || null;
|
|
128
129
|
}
|
|
129
130
|
while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
|
|
130
131
|
{ activeElement = activeElement.shadowRoot.activeElement; }
|
|
@@ -148,6 +149,10 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
148
149
|
else if (ie) // Suppress mysterious IE10 errors
|
|
149
150
|
{ selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
|
|
150
151
|
|
|
152
|
+
function doc(cm) { return cm.display.wrapper.ownerDocument }
|
|
153
|
+
|
|
154
|
+
function win(cm) { return doc(cm).defaultView }
|
|
155
|
+
|
|
151
156
|
function bind(f) {
|
|
152
157
|
var args = Array.prototype.slice.call(arguments, 1);
|
|
153
158
|
return function(){return f.apply(null, args)}
|
|
@@ -2577,16 +2582,16 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
2577
2582
|
cm.display.lineNumChars = null;
|
|
2578
2583
|
}
|
|
2579
2584
|
|
|
2580
|
-
function pageScrollX() {
|
|
2585
|
+
function pageScrollX(doc) {
|
|
2581
2586
|
// Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
|
|
2582
2587
|
// which causes page_Offset and bounding client rects to use
|
|
2583
2588
|
// different reference viewports and invalidate our calculations.
|
|
2584
|
-
if (chrome && android) { return -(
|
|
2585
|
-
return
|
|
2589
|
+
if (chrome && android) { return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) }
|
|
2590
|
+
return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft
|
|
2586
2591
|
}
|
|
2587
|
-
function pageScrollY() {
|
|
2588
|
-
if (chrome && android) { return -(
|
|
2589
|
-
return
|
|
2592
|
+
function pageScrollY(doc) {
|
|
2593
|
+
if (chrome && android) { return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) }
|
|
2594
|
+
return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop
|
|
2590
2595
|
}
|
|
2591
2596
|
|
|
2592
2597
|
function widgetTopHeight(lineObj) {
|
|
@@ -2614,8 +2619,8 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
2614
2619
|
else { yOff -= cm.display.viewOffset; }
|
|
2615
2620
|
if (context == "page" || context == "window") {
|
|
2616
2621
|
var lOff = cm.display.lineSpace.getBoundingClientRect();
|
|
2617
|
-
yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
|
|
2618
|
-
var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
|
|
2622
|
+
yOff += lOff.top + (context == "window" ? 0 : pageScrollY(doc(cm)));
|
|
2623
|
+
var xOff = lOff.left + (context == "window" ? 0 : pageScrollX(doc(cm)));
|
|
2619
2624
|
rect.left += xOff; rect.right += xOff;
|
|
2620
2625
|
}
|
|
2621
2626
|
rect.top += yOff; rect.bottom += yOff;
|
|
@@ -2629,8 +2634,8 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
2629
2634
|
var left = coords.left, top = coords.top;
|
|
2630
2635
|
// First move into "page" coordinate system
|
|
2631
2636
|
if (context == "page") {
|
|
2632
|
-
left -= pageScrollX();
|
|
2633
|
-
top -= pageScrollY();
|
|
2637
|
+
left -= pageScrollX(doc(cm));
|
|
2638
|
+
top -= pageScrollY(doc(cm));
|
|
2634
2639
|
} else if (context == "local" || !context) {
|
|
2635
2640
|
var localBox = cm.display.sizer.getBoundingClientRect();
|
|
2636
2641
|
left += localBox.left;
|
|
@@ -3446,8 +3451,9 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
3446
3451
|
if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
|
|
3447
3452
|
|
|
3448
3453
|
var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
|
|
3454
|
+
var doc = display.wrapper.ownerDocument;
|
|
3449
3455
|
if (rect.top + box.top < 0) { doScroll = true; }
|
|
3450
|
-
else if (rect.bottom + box.top > (
|
|
3456
|
+
else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) { doScroll = false; }
|
|
3451
3457
|
if (doScroll != null && !phantom) {
|
|
3452
3458
|
var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
|
|
3453
3459
|
cm.display.lineSpace.appendChild(scrollNode);
|
|
@@ -3701,13 +3707,13 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
3701
3707
|
NativeScrollbars.prototype.zeroWidthHack = function () {
|
|
3702
3708
|
var w = mac && !mac_geMountainLion ? "12px" : "18px";
|
|
3703
3709
|
this.horiz.style.height = this.vert.style.width = w;
|
|
3704
|
-
this.horiz.style.
|
|
3710
|
+
this.horiz.style.visibility = this.vert.style.visibility = "hidden";
|
|
3705
3711
|
this.disableHoriz = new Delayed;
|
|
3706
3712
|
this.disableVert = new Delayed;
|
|
3707
3713
|
};
|
|
3708
3714
|
|
|
3709
3715
|
NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
|
|
3710
|
-
bar.style.
|
|
3716
|
+
bar.style.visibility = "";
|
|
3711
3717
|
function maybeDisable() {
|
|
3712
3718
|
// To find out whether the scrollbar is still visible, we
|
|
3713
3719
|
// check whether the element under the pixel in the bottom
|
|
@@ -3718,7 +3724,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
3718
3724
|
var box = bar.getBoundingClientRect();
|
|
3719
3725
|
var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)
|
|
3720
3726
|
: document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
|
|
3721
|
-
if (elt != bar) { bar.style.
|
|
3727
|
+
if (elt != bar) { bar.style.visibility = "hidden"; }
|
|
3722
3728
|
else { delay.set(1000, maybeDisable); }
|
|
3723
3729
|
}
|
|
3724
3730
|
delay.set(1000, maybeDisable);
|
|
@@ -3899,7 +3905,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
3899
3905
|
cm.display.maxLineChanged = false;
|
|
3900
3906
|
}
|
|
3901
3907
|
|
|
3902
|
-
var takeFocus = op.focus && op.focus == activeElt();
|
|
3908
|
+
var takeFocus = op.focus && op.focus == activeElt(doc(cm));
|
|
3903
3909
|
if (op.preparedSelection)
|
|
3904
3910
|
{ cm.display.input.showSelection(op.preparedSelection, takeFocus); }
|
|
3905
3911
|
if (op.updatedDisplay || op.startHeight != cm.doc.height)
|
|
@@ -4076,11 +4082,11 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
4076
4082
|
|
|
4077
4083
|
function selectionSnapshot(cm) {
|
|
4078
4084
|
if (cm.hasFocus()) { return null }
|
|
4079
|
-
var active = activeElt();
|
|
4085
|
+
var active = activeElt(doc(cm));
|
|
4080
4086
|
if (!active || !contains(cm.display.lineDiv, active)) { return null }
|
|
4081
4087
|
var result = {activeElt: active};
|
|
4082
4088
|
if (window.getSelection) {
|
|
4083
|
-
var sel =
|
|
4089
|
+
var sel = win(cm).getSelection();
|
|
4084
4090
|
if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
|
|
4085
4091
|
result.anchorNode = sel.anchorNode;
|
|
4086
4092
|
result.anchorOffset = sel.anchorOffset;
|
|
@@ -4092,11 +4098,12 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
4092
4098
|
}
|
|
4093
4099
|
|
|
4094
4100
|
function restoreSelection(snapshot) {
|
|
4095
|
-
if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
|
|
4101
|
+
if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(snapshot.activeElt.ownerDocument)) { return }
|
|
4096
4102
|
snapshot.activeElt.focus();
|
|
4097
4103
|
if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&
|
|
4098
4104
|
snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
|
|
4099
|
-
var
|
|
4105
|
+
var doc = snapshot.activeElt.ownerDocument;
|
|
4106
|
+
var sel = doc.defaultView.getSelection(), range = doc.createRange();
|
|
4100
4107
|
range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
|
|
4101
4108
|
range.collapse(false);
|
|
4102
4109
|
sel.removeAllRanges();
|
|
@@ -4413,6 +4420,8 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
4413
4420
|
d.scroller.setAttribute("tabIndex", "-1");
|
|
4414
4421
|
// The element in which the editor lives.
|
|
4415
4422
|
d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
|
|
4423
|
+
// See #6982. FIXME remove when this has been fixed for a while in Chrome
|
|
4424
|
+
if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = "inset(0px)"; }
|
|
4416
4425
|
|
|
4417
4426
|
// This attribute is respected by automatic translation systems such as Google Translate,
|
|
4418
4427
|
// and may also be respected by tools used by human translators.
|
|
@@ -4514,6 +4523,17 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
4514
4523
|
}
|
|
4515
4524
|
|
|
4516
4525
|
function onScrollWheel(cm, e) {
|
|
4526
|
+
// On Chrome 102, viewport updates somehow stop wheel-based
|
|
4527
|
+
// scrolling. Turning off pointer events during the scroll seems
|
|
4528
|
+
// to avoid the issue.
|
|
4529
|
+
if (chrome && chrome_version == 102) {
|
|
4530
|
+
if (cm.display.chromeScrollHack == null) { cm.display.sizer.style.pointerEvents = "none"; }
|
|
4531
|
+
else { clearTimeout(cm.display.chromeScrollHack); }
|
|
4532
|
+
cm.display.chromeScrollHack = setTimeout(function () {
|
|
4533
|
+
cm.display.chromeScrollHack = null;
|
|
4534
|
+
cm.display.sizer.style.pointerEvents = "";
|
|
4535
|
+
}, 100);
|
|
4536
|
+
}
|
|
4517
4537
|
var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
|
|
4518
4538
|
var pixelsPerUnit = wheelPixelsPerUnit;
|
|
4519
4539
|
if (e.deltaMode === 0) {
|
|
@@ -5197,7 +5217,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
5197
5217
|
var range = sel.ranges[i];
|
|
5198
5218
|
var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
|
|
5199
5219
|
var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
|
|
5200
|
-
var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
|
|
5220
|
+
var newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear);
|
|
5201
5221
|
if (out || newAnchor != range.anchor || newHead != range.head) {
|
|
5202
5222
|
if (!out) { out = sel.ranges.slice(0, i); }
|
|
5203
5223
|
out[i] = new Range(newAnchor, newHead);
|
|
@@ -7249,7 +7269,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7249
7269
|
function onKeyDown(e) {
|
|
7250
7270
|
var cm = this;
|
|
7251
7271
|
if (e.target && e.target != cm.display.input.getField()) { return }
|
|
7252
|
-
cm.curOp.focus = activeElt();
|
|
7272
|
+
cm.curOp.focus = activeElt(doc(cm));
|
|
7253
7273
|
if (signalDOMEvent(cm, e)) { return }
|
|
7254
7274
|
// IE does strange things with escape.
|
|
7255
7275
|
if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
|
|
@@ -7356,7 +7376,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7356
7376
|
}
|
|
7357
7377
|
if (clickInGutter(cm, e)) { return }
|
|
7358
7378
|
var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";
|
|
7359
|
-
|
|
7379
|
+
win(cm).focus();
|
|
7360
7380
|
|
|
7361
7381
|
// #3261: make sure, that we're not starting a second selection
|
|
7362
7382
|
if (button == 1 && cm.state.selectingText)
|
|
@@ -7411,7 +7431,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7411
7431
|
|
|
7412
7432
|
function leftButtonDown(cm, pos, repeat, event) {
|
|
7413
7433
|
if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
|
|
7414
|
-
else { cm.curOp.focus = activeElt(); }
|
|
7434
|
+
else { cm.curOp.focus = activeElt(doc(cm)); }
|
|
7415
7435
|
|
|
7416
7436
|
var behavior = configureMouse(cm, repeat, event);
|
|
7417
7437
|
|
|
@@ -7481,19 +7501,19 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7481
7501
|
// Normal selection, as opposed to text dragging.
|
|
7482
7502
|
function leftButtonSelect(cm, event, start, behavior) {
|
|
7483
7503
|
if (ie) { delayBlurEvent(cm); }
|
|
7484
|
-
var display = cm.display, doc = cm.doc;
|
|
7504
|
+
var display = cm.display, doc$1 = cm.doc;
|
|
7485
7505
|
e_preventDefault(event);
|
|
7486
7506
|
|
|
7487
|
-
var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
|
|
7507
|
+
var ourRange, ourIndex, startSel = doc$1.sel, ranges = startSel.ranges;
|
|
7488
7508
|
if (behavior.addNew && !behavior.extend) {
|
|
7489
|
-
ourIndex = doc.sel.contains(start);
|
|
7509
|
+
ourIndex = doc$1.sel.contains(start);
|
|
7490
7510
|
if (ourIndex > -1)
|
|
7491
7511
|
{ ourRange = ranges[ourIndex]; }
|
|
7492
7512
|
else
|
|
7493
7513
|
{ ourRange = new Range(start, start); }
|
|
7494
7514
|
} else {
|
|
7495
|
-
ourRange = doc.sel.primary();
|
|
7496
|
-
ourIndex = doc.sel.primIndex;
|
|
7515
|
+
ourRange = doc$1.sel.primary();
|
|
7516
|
+
ourIndex = doc$1.sel.primIndex;
|
|
7497
7517
|
}
|
|
7498
7518
|
|
|
7499
7519
|
if (behavior.unit == "rectangle") {
|
|
@@ -7510,18 +7530,18 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7510
7530
|
|
|
7511
7531
|
if (!behavior.addNew) {
|
|
7512
7532
|
ourIndex = 0;
|
|
7513
|
-
setSelection(doc, new Selection([ourRange], 0), sel_mouse);
|
|
7514
|
-
startSel = doc.sel;
|
|
7533
|
+
setSelection(doc$1, new Selection([ourRange], 0), sel_mouse);
|
|
7534
|
+
startSel = doc$1.sel;
|
|
7515
7535
|
} else if (ourIndex == -1) {
|
|
7516
7536
|
ourIndex = ranges.length;
|
|
7517
|
-
setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
|
|
7537
|
+
setSelection(doc$1, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
|
|
7518
7538
|
{scroll: false, origin: "*mouse"});
|
|
7519
7539
|
} else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
|
|
7520
|
-
setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
|
|
7540
|
+
setSelection(doc$1, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
|
|
7521
7541
|
{scroll: false, origin: "*mouse"});
|
|
7522
|
-
startSel = doc.sel;
|
|
7542
|
+
startSel = doc$1.sel;
|
|
7523
7543
|
} else {
|
|
7524
|
-
replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
|
|
7544
|
+
replaceOneSelection(doc$1, ourIndex, ourRange, sel_mouse);
|
|
7525
7545
|
}
|
|
7526
7546
|
|
|
7527
7547
|
var lastPos = start;
|
|
@@ -7531,19 +7551,19 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7531
7551
|
|
|
7532
7552
|
if (behavior.unit == "rectangle") {
|
|
7533
7553
|
var ranges = [], tabSize = cm.options.tabSize;
|
|
7534
|
-
var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
|
|
7535
|
-
var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
|
|
7554
|
+
var startCol = countColumn(getLine(doc$1, start.line).text, start.ch, tabSize);
|
|
7555
|
+
var posCol = countColumn(getLine(doc$1, pos.line).text, pos.ch, tabSize);
|
|
7536
7556
|
var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
|
|
7537
7557
|
for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
|
|
7538
7558
|
line <= end; line++) {
|
|
7539
|
-
var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
|
|
7559
|
+
var text = getLine(doc$1, line).text, leftPos = findColumn(text, left, tabSize);
|
|
7540
7560
|
if (left == right)
|
|
7541
7561
|
{ ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
|
|
7542
7562
|
else if (text.length > leftPos)
|
|
7543
7563
|
{ ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
|
|
7544
7564
|
}
|
|
7545
7565
|
if (!ranges.length) { ranges.push(new Range(start, start)); }
|
|
7546
|
-
setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
|
|
7566
|
+
setSelection(doc$1, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
|
|
7547
7567
|
{origin: "*mouse", scroll: false});
|
|
7548
7568
|
cm.scrollIntoView(pos);
|
|
7549
7569
|
} else {
|
|
@@ -7558,8 +7578,8 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7558
7578
|
anchor = maxPos(oldRange.to(), range.head);
|
|
7559
7579
|
}
|
|
7560
7580
|
var ranges$1 = startSel.ranges.slice(0);
|
|
7561
|
-
ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
|
|
7562
|
-
setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
|
|
7581
|
+
ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc$1, anchor), head));
|
|
7582
|
+
setSelection(doc$1, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
|
|
7563
7583
|
}
|
|
7564
7584
|
}
|
|
7565
7585
|
|
|
@@ -7575,9 +7595,9 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7575
7595
|
var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
|
|
7576
7596
|
if (!cur) { return }
|
|
7577
7597
|
if (cmp(cur, lastPos) != 0) {
|
|
7578
|
-
cm.curOp.focus = activeElt();
|
|
7598
|
+
cm.curOp.focus = activeElt(doc(cm));
|
|
7579
7599
|
extendTo(cur);
|
|
7580
|
-
var visible = visibleLines(display, doc);
|
|
7600
|
+
var visible = visibleLines(display, doc$1);
|
|
7581
7601
|
if (cur.line >= visible.to || cur.line < visible.from)
|
|
7582
7602
|
{ setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
|
|
7583
7603
|
} else {
|
|
@@ -7602,7 +7622,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7602
7622
|
}
|
|
7603
7623
|
off(display.wrapper.ownerDocument, "mousemove", move);
|
|
7604
7624
|
off(display.wrapper.ownerDocument, "mouseup", up);
|
|
7605
|
-
doc.history.lastSelOrigin = null;
|
|
7625
|
+
doc$1.history.lastSelOrigin = null;
|
|
7606
7626
|
}
|
|
7607
7627
|
|
|
7608
7628
|
var move = operation(cm, function (e) {
|
|
@@ -7759,7 +7779,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
7759
7779
|
for (var i = newBreaks.length - 1; i >= 0; i--)
|
|
7760
7780
|
{ replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
|
|
7761
7781
|
});
|
|
7762
|
-
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
|
7782
|
+
option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function (cm, val, old) {
|
|
7763
7783
|
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
|
|
7764
7784
|
if (old != Init) { cm.refresh(); }
|
|
7765
7785
|
});
|
|
@@ -8202,7 +8222,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8202
8222
|
var pasted = e.clipboardData && e.clipboardData.getData("Text");
|
|
8203
8223
|
if (pasted) {
|
|
8204
8224
|
e.preventDefault();
|
|
8205
|
-
if (!cm.isReadOnly() && !cm.options.disableInput)
|
|
8225
|
+
if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())
|
|
8206
8226
|
{ runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
|
|
8207
8227
|
return true
|
|
8208
8228
|
}
|
|
@@ -8279,7 +8299,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8279
8299
|
|
|
8280
8300
|
CodeMirror.prototype = {
|
|
8281
8301
|
constructor: CodeMirror,
|
|
8282
|
-
focus: function(){
|
|
8302
|
+
focus: function(){win(this).focus(); this.display.input.focus();},
|
|
8283
8303
|
|
|
8284
8304
|
setOption: function(option, value) {
|
|
8285
8305
|
var options = this.options, old = options[option];
|
|
@@ -8603,7 +8623,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8603
8623
|
|
|
8604
8624
|
signal(this, "overwriteToggle", this, this.state.overwrite);
|
|
8605
8625
|
},
|
|
8606
|
-
hasFocus: function() { return this.display.input.getField() == activeElt() },
|
|
8626
|
+
hasFocus: function() { return this.display.input.getField() == activeElt(doc(this)) },
|
|
8607
8627
|
isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
|
|
8608
8628
|
|
|
8609
8629
|
scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
|
|
@@ -8784,7 +8804,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8784
8804
|
function findPosV(cm, pos, dir, unit) {
|
|
8785
8805
|
var doc = cm.doc, x = pos.left, y;
|
|
8786
8806
|
if (unit == "page") {
|
|
8787
|
-
var pageSize = Math.min(cm.display.wrapper.clientHeight,
|
|
8807
|
+
var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight);
|
|
8788
8808
|
var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
|
|
8789
8809
|
y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
|
|
8790
8810
|
|
|
@@ -8884,7 +8904,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8884
8904
|
var kludge = hiddenTextarea(), te = kludge.firstChild;
|
|
8885
8905
|
cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
|
|
8886
8906
|
te.value = lastCopied.text.join("\n");
|
|
8887
|
-
var hadFocus = activeElt();
|
|
8907
|
+
var hadFocus = activeElt(div.ownerDocument);
|
|
8888
8908
|
selectInput(te);
|
|
8889
8909
|
setTimeout(function () {
|
|
8890
8910
|
cm.display.lineSpace.removeChild(kludge);
|
|
@@ -8907,7 +8927,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
8907
8927
|
|
|
8908
8928
|
ContentEditableInput.prototype.prepareSelection = function () {
|
|
8909
8929
|
var result = prepareSelection(this.cm, false);
|
|
8910
|
-
result.focus = activeElt() == this.div;
|
|
8930
|
+
result.focus = activeElt(this.div.ownerDocument) == this.div;
|
|
8911
8931
|
return result
|
|
8912
8932
|
};
|
|
8913
8933
|
|
|
@@ -9003,7 +9023,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9003
9023
|
|
|
9004
9024
|
ContentEditableInput.prototype.focus = function () {
|
|
9005
9025
|
if (this.cm.options.readOnly != "nocursor") {
|
|
9006
|
-
if (!this.selectionInEditor() || activeElt() != this.div)
|
|
9026
|
+
if (!this.selectionInEditor() || activeElt(this.div.ownerDocument) != this.div)
|
|
9007
9027
|
{ this.showSelection(this.prepareSelection(), true); }
|
|
9008
9028
|
this.div.focus();
|
|
9009
9029
|
}
|
|
@@ -9355,6 +9375,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9355
9375
|
// Used to work around IE issue with selection being forgotten when focus moves away from textarea
|
|
9356
9376
|
this.hasSelection = false;
|
|
9357
9377
|
this.composing = null;
|
|
9378
|
+
this.resetting = false;
|
|
9358
9379
|
};
|
|
9359
9380
|
|
|
9360
9381
|
TextareaInput.prototype.init = function (display) {
|
|
@@ -9487,8 +9508,9 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9487
9508
|
// Reset the input to correspond to the selection (or to be empty,
|
|
9488
9509
|
// when not typing and nothing is selected)
|
|
9489
9510
|
TextareaInput.prototype.reset = function (typing) {
|
|
9490
|
-
if (this.contextMenuPending || this.composing) { return }
|
|
9511
|
+
if (this.contextMenuPending || this.composing && typing) { return }
|
|
9491
9512
|
var cm = this.cm;
|
|
9513
|
+
this.resetting = true;
|
|
9492
9514
|
if (cm.somethingSelected()) {
|
|
9493
9515
|
this.prevInput = "";
|
|
9494
9516
|
var content = cm.getSelection();
|
|
@@ -9499,6 +9521,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9499
9521
|
this.prevInput = this.textarea.value = "";
|
|
9500
9522
|
if (ie && ie_version >= 9) { this.hasSelection = null; }
|
|
9501
9523
|
}
|
|
9524
|
+
this.resetting = false;
|
|
9502
9525
|
};
|
|
9503
9526
|
|
|
9504
9527
|
TextareaInput.prototype.getField = function () { return this.textarea };
|
|
@@ -9506,7 +9529,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9506
9529
|
TextareaInput.prototype.supportsTouch = function () { return false };
|
|
9507
9530
|
|
|
9508
9531
|
TextareaInput.prototype.focus = function () {
|
|
9509
|
-
if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
|
|
9532
|
+
if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt(this.textarea.ownerDocument) != this.textarea)) {
|
|
9510
9533
|
try { this.textarea.focus(); }
|
|
9511
9534
|
catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
|
|
9512
9535
|
}
|
|
@@ -9560,7 +9583,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9560
9583
|
// possible when it is clear that nothing happened. hasSelection
|
|
9561
9584
|
// will be the case when there is a lot of text in the textarea,
|
|
9562
9585
|
// in which case reading its value would be expensive.
|
|
9563
|
-
if (this.contextMenuPending || !cm.state.focused ||
|
|
9586
|
+
if (this.contextMenuPending || this.resetting || !cm.state.focused ||
|
|
9564
9587
|
(hasSelection(input) && !prevInput && !this.composing) ||
|
|
9565
9588
|
cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
|
|
9566
9589
|
{ return false }
|
|
@@ -9629,9 +9652,9 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9629
9652
|
input.wrapper.style.cssText = "position: static";
|
|
9630
9653
|
te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
|
|
9631
9654
|
var oldScrollY;
|
|
9632
|
-
if (webkit) { oldScrollY =
|
|
9655
|
+
if (webkit) { oldScrollY = te.ownerDocument.defaultView.scrollY; } // Work around Chrome issue (#2712)
|
|
9633
9656
|
display.input.focus();
|
|
9634
|
-
if (webkit) {
|
|
9657
|
+
if (webkit) { te.ownerDocument.defaultView.scrollTo(null, oldScrollY); }
|
|
9635
9658
|
display.input.reset();
|
|
9636
9659
|
// Adds "Select all" to context menu in FF
|
|
9637
9660
|
if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
|
|
@@ -9713,7 +9736,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9713
9736
|
// Set autofocus to true if this textarea is focused, or if it has
|
|
9714
9737
|
// autofocus and no other element is focused.
|
|
9715
9738
|
if (options.autofocus == null) {
|
|
9716
|
-
var hasFocus = activeElt();
|
|
9739
|
+
var hasFocus = activeElt(textarea.ownerDocument);
|
|
9717
9740
|
options.autofocus = hasFocus == textarea ||
|
|
9718
9741
|
textarea.getAttribute("autofocus") != null && hasFocus == document.body;
|
|
9719
9742
|
}
|
|
@@ -9847,7 +9870,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9847
9870
|
|
|
9848
9871
|
addLegacyProps(CodeMirror);
|
|
9849
9872
|
|
|
9850
|
-
CodeMirror.version = "5.65.
|
|
9873
|
+
CodeMirror.version = "5.65.9";
|
|
9851
9874
|
|
|
9852
9875
|
return CodeMirror;
|
|
9853
9876
|
|
|
@@ -9856,7 +9879,7 @@ var codemirror = _commonjsHelpers.createCommonjsModule(function (module, exports
|
|
|
9856
9879
|
|
|
9857
9880
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
9858
9881
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
9859
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
9882
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
9860
9883
|
|
|
9861
9884
|
(function(mod) {
|
|
9862
9885
|
mod(codemirror);
|
|
@@ -10812,7 +10835,7 @@ CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript
|
|
|
10812
10835
|
|
|
10813
10836
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
10814
10837
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
10815
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
10838
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
10816
10839
|
|
|
10817
10840
|
(function(mod) {
|
|
10818
10841
|
mod(codemirror);
|
|
@@ -10881,7 +10904,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
10881
10904
|
|
|
10882
10905
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
10883
10906
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
10884
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
10907
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
10885
10908
|
|
|
10886
10909
|
(function(mod) {
|
|
10887
10910
|
mod(codemirror);
|
|
@@ -11039,7 +11062,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11039
11062
|
|
|
11040
11063
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11041
11064
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11042
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11065
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11043
11066
|
|
|
11044
11067
|
(function(mod) {
|
|
11045
11068
|
mod(codemirror);
|
|
@@ -11327,7 +11350,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11327
11350
|
|
|
11328
11351
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11329
11352
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11330
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11353
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11331
11354
|
|
|
11332
11355
|
// Depends on jsonlint.js from https://github.com/zaach/jsonlint
|
|
11333
11356
|
|
|
@@ -11364,7 +11387,7 @@ CodeMirror.registerHelper("lint", "json", function(text) {
|
|
|
11364
11387
|
|
|
11365
11388
|
var foldcode = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11366
11389
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11367
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11390
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11368
11391
|
|
|
11369
11392
|
(function(mod) {
|
|
11370
11393
|
mod(codemirror);
|
|
@@ -11520,7 +11543,7 @@ var foldcode = _commonjsHelpers.createCommonjsModule(function (module, exports)
|
|
|
11520
11543
|
|
|
11521
11544
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11522
11545
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11523
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11546
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11524
11547
|
|
|
11525
11548
|
(function(mod) {
|
|
11526
11549
|
mod(codemirror, foldcode);
|
|
@@ -11536,6 +11559,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11536
11559
|
cm.off("fold", onFold);
|
|
11537
11560
|
cm.off("unfold", onFold);
|
|
11538
11561
|
cm.off("swapDoc", onChange);
|
|
11562
|
+
cm.off("optionChange", optionChange);
|
|
11539
11563
|
}
|
|
11540
11564
|
if (val) {
|
|
11541
11565
|
cm.state.foldGutter = new State(parseOptions(val));
|
|
@@ -11546,6 +11570,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11546
11570
|
cm.on("fold", onFold);
|
|
11547
11571
|
cm.on("unfold", onFold);
|
|
11548
11572
|
cm.on("swapDoc", onChange);
|
|
11573
|
+
cm.on("optionChange", optionChange);
|
|
11549
11574
|
}
|
|
11550
11575
|
});
|
|
11551
11576
|
|
|
@@ -11635,6 +11660,10 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11635
11660
|
else cm.foldCode(Pos(line, 0), opts);
|
|
11636
11661
|
}
|
|
11637
11662
|
|
|
11663
|
+
function optionChange(cm, option) {
|
|
11664
|
+
if (option == "mode") onChange(cm);
|
|
11665
|
+
}
|
|
11666
|
+
|
|
11638
11667
|
function onChange(cm) {
|
|
11639
11668
|
var state = cm.state.foldGutter;
|
|
11640
11669
|
if (!state) return;
|
|
@@ -11680,7 +11709,7 @@ _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
|
11680
11709
|
|
|
11681
11710
|
_commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
11682
11711
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
11683
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
|
11712
|
+
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
11684
11713
|
|
|
11685
11714
|
(function(mod) {
|
|
11686
11715
|
mod(codemirror);
|
|
@@ -12592,30 +12621,6 @@ const CodeEditor = class {
|
|
|
12592
12621
|
constructor(hostRef) {
|
|
12593
12622
|
index.registerInstance(this, hostRef);
|
|
12594
12623
|
this.change = index.createEvent(this, "change", 7);
|
|
12595
|
-
/**
|
|
12596
|
-
* The code to be rendered
|
|
12597
|
-
*/
|
|
12598
|
-
this.value = '';
|
|
12599
|
-
/**
|
|
12600
|
-
* Disables editing of the editor content
|
|
12601
|
-
*/
|
|
12602
|
-
this.readonly = false;
|
|
12603
|
-
/**
|
|
12604
|
-
* Displays line numbers in the editor
|
|
12605
|
-
*/
|
|
12606
|
-
this.lineNumbers = false;
|
|
12607
|
-
/**
|
|
12608
|
-
* Allows the user to fold code
|
|
12609
|
-
*/
|
|
12610
|
-
this.fold = false;
|
|
12611
|
-
/**
|
|
12612
|
-
* Enables linting of JSON content
|
|
12613
|
-
*/
|
|
12614
|
-
this.lint = false;
|
|
12615
|
-
/**
|
|
12616
|
-
* Select color scheme for the editor
|
|
12617
|
-
*/
|
|
12618
|
-
this.colorScheme = 'auto';
|
|
12619
12624
|
this.handleChangeDarkMode = () => {
|
|
12620
12625
|
if (this.colorScheme !== 'auto') {
|
|
12621
12626
|
return;
|
|
@@ -12631,6 +12636,14 @@ const CodeEditor = class {
|
|
|
12631
12636
|
}
|
|
12632
12637
|
this.editor.refresh();
|
|
12633
12638
|
};
|
|
12639
|
+
this.value = '';
|
|
12640
|
+
this.language = undefined;
|
|
12641
|
+
this.readonly = false;
|
|
12642
|
+
this.lineNumbers = false;
|
|
12643
|
+
this.fold = false;
|
|
12644
|
+
this.lint = false;
|
|
12645
|
+
this.colorScheme = 'auto';
|
|
12646
|
+
this.random = undefined;
|
|
12634
12647
|
}
|
|
12635
12648
|
connectedCallback() {
|
|
12636
12649
|
this.observer = new ResizeObserver(this.handleResize);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-287e25e0.js');
|
|
6
6
|
const dispatchResizeEvent = require('./dispatch-resize-event-4462d78f.js');
|
|
7
7
|
const keycodes = require('./keycodes-3949f425.js');
|
|
8
8
|
|
|
@@ -14,10 +14,6 @@ const CollapsibleSection = class {
|
|
|
14
14
|
this.open = index.createEvent(this, "open", 7);
|
|
15
15
|
this.close = index.createEvent(this, "close", 7);
|
|
16
16
|
this.action = index.createEvent(this, "action", 7);
|
|
17
|
-
/**
|
|
18
|
-
* `true` if the section is expanded, `false` if collapsed.
|
|
19
|
-
*/
|
|
20
|
-
this.isOpen = false;
|
|
21
17
|
this.onClick = () => {
|
|
22
18
|
this.handleInteraction();
|
|
23
19
|
};
|
|
@@ -53,6 +49,9 @@ const CollapsibleSection = class {
|
|
|
53
49
|
event.stopPropagation();
|
|
54
50
|
this.action.emit(action);
|
|
55
51
|
};
|
|
52
|
+
this.isOpen = false;
|
|
53
|
+
this.header = undefined;
|
|
54
|
+
this.actions = undefined;
|
|
56
55
|
}
|
|
57
56
|
render() {
|
|
58
57
|
return (index.h("section", { class: `${this.isOpen ? 'open' : ''}` }, index.h("header", { class: "section__header", onClick: this.onClick, onKeyDown: this.handleKeyDown, tabindex: "0" }, index.h("div", { class: "section__header__expand-icon" }, index.h("div", { class: "expand-icon__line" }), index.h("div", { class: "expand-icon__line" }), index.h("div", { class: "expand-icon__line" }), index.h("div", { class: "expand-icon__line" })), index.h("h2", { class: "section__header__title mdc-typography mdc-typography--headline2" }, this.header), index.h("div", { class: "section__header__divider-line" }), this.renderActions()), index.h("div", { class: "section__body" }, index.h("slot", null))));
|