@onereach/ui-components 8.17.0 → 8.17.1-beta.3881.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/bundled/v2/components/OrCodeV3/OrCode.js +11 -6
- package/dist/bundled/v2/components/OrCodeV3/OrCode.vue.d.ts +3 -3
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +4 -3
- package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/props.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrCodeV3-7ecb46ca.js → OrCodeV3-628f8e28.js} +20 -15
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/{OrCode-c37dabe7.js → OrCode-4c7bbbd2.js} +21 -16
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-code-v3/OrCode.vue.d.ts +3 -3
- package/dist/esm/v2/components/or-code-v3/index.js +1 -1
- package/dist/esm/v2/components/or-tabs/OrTabs.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tabs-v3/OrTabs.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tag/OrTag.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tag-input-v3/OrTagInput.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tag-v3/OrTag.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tags-v3/OrTags.vue.d.ts +2 -2
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrCode-6f8164d5.js → OrCode-37d50c74.js} +21 -16
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +4 -3
- package/dist/esm/v3/components/or-code-v3/index.js +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -3
- package/src/components/or-code-v3/OrCode.vue +22 -8
- package/src/components/or-code-v3/partials/OrCodeControl.vue +10 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive, toRef, watch, onMounted, onUnmounted } from 'vue-demi';
|
|
2
2
|
import { b as basicSetup, i as indentWithTab } from '../../index-f1a845c3.js';
|
|
3
3
|
import { C as Compartment, k as keymap, a as EditorState, E as EditorView } from '../../index-10711eb4.js';
|
|
4
|
-
import { CodeLanguage } from './props.js';
|
|
5
4
|
import { CodeControlRoot, CodeControl, Code, CodeModal } from './styles.js';
|
|
6
5
|
import __vue_component__$2 from '../OrErrorV3/OrError.js';
|
|
7
6
|
import __vue_component__$3 from '../OrHintV3/OrHint.js';
|
|
8
7
|
import __vue_component__$4 from '../OrInputBoxV3/OrInputBox.js';
|
|
9
8
|
import __vue_component__$5 from '../OrLabelV3/OrLabel.js';
|
|
10
9
|
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
10
|
+
import { CodeLanguage } from './props.js';
|
|
11
11
|
import __vue_component__$6 from '../OrModalV3/OrModal.js';
|
|
12
12
|
import __vue_component__$7 from '../OrIconButtonV3/OrIconButton.js';
|
|
13
13
|
import { useIdAttribute } from '../../hooks/useIdAttribute.js';
|
|
@@ -218,7 +218,7 @@ var script = defineComponent({
|
|
|
218
218
|
default: true
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
-
emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
|
|
221
|
+
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
222
222
|
expose: ['root', 'editorView', 'control', 'fullscreenControl', 'modal', 'focus', 'blur'],
|
|
223
223
|
setup(props, context) {
|
|
224
224
|
// Refs
|
|
@@ -273,6 +273,9 @@ var script = defineComponent({
|
|
|
273
273
|
// #region Codemirror
|
|
274
274
|
const theme = useTheme();
|
|
275
275
|
const defaultExtensions = [basicSetup, keymap.of([indentWithTab]), EditorState.readOnly.of(props.readonly), EditorView.editable.of(!props.disabled), EditorView.domEventHandlers({
|
|
276
|
+
input: event => {
|
|
277
|
+
context.emit('input', event);
|
|
278
|
+
},
|
|
276
279
|
keydown: event => {
|
|
277
280
|
context.emit('keydown', event);
|
|
278
281
|
},
|
|
@@ -287,6 +290,7 @@ var script = defineComponent({
|
|
|
287
290
|
}
|
|
288
291
|
}), EditorView.theme({
|
|
289
292
|
'&': {
|
|
293
|
+
overflow: 'hidden',
|
|
290
294
|
color: theme.textColor['on-background'],
|
|
291
295
|
backgroundColor: theme.backgroundColor['background']
|
|
292
296
|
},
|
|
@@ -302,7 +306,8 @@ var script = defineComponent({
|
|
|
302
306
|
'.cm-gutters': {
|
|
303
307
|
color: theme.textColor['on-background'],
|
|
304
308
|
backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
|
|
305
|
-
borderColor: theme.borderColor['outline']
|
|
309
|
+
borderColor: theme.borderColor['outline'],
|
|
310
|
+
backdropFilter: 'blur(2px)'
|
|
306
311
|
},
|
|
307
312
|
'.cm-activeLineGutter, .cm-activeLine': {
|
|
308
313
|
backgroundColor: theme.backgroundColor['primary-opacity-0-08']
|
|
@@ -378,8 +383,8 @@ var script = defineComponent({
|
|
|
378
383
|
editorView.destroy();
|
|
379
384
|
});
|
|
380
385
|
return {
|
|
381
|
-
editorView,
|
|
382
386
|
root,
|
|
387
|
+
editorView,
|
|
383
388
|
control,
|
|
384
389
|
fullscreenControl,
|
|
385
390
|
modal,
|
|
@@ -438,8 +443,8 @@ var __vue_render__ = function () {
|
|
|
438
443
|
}), _vm._v(" "), _c('OrModal', {
|
|
439
444
|
ref: "modal",
|
|
440
445
|
attrs: {
|
|
441
|
-
"
|
|
442
|
-
"
|
|
446
|
+
"additional-styles": _vm.modalStyles,
|
|
447
|
+
"size": 'l'
|
|
443
448
|
},
|
|
444
449
|
scopedSlots: _vm._u([{
|
|
445
450
|
key: "header",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
2
|
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { EditorView } from '@codemirror/view';
|
|
4
4
|
import { CodeLanguage } from './props';
|
|
5
5
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
6
|
-
editorView: EditorView;
|
|
7
6
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
7
|
+
editorView: EditorView;
|
|
8
8
|
control: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
@@ -136,8 +136,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
136
136
|
} & {} & {
|
|
137
137
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
138
138
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
139
|
-
editorView: EditorView;
|
|
140
139
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
140
|
+
editorView: EditorView;
|
|
141
141
|
control: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
142
142
|
[x: string]: ((...args: any[]) => any) | null;
|
|
143
143
|
} | string[], {} & {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as default } from '../OrCodeV3-
|
|
1
|
+
export { s as default } from '../OrCodeV3-628f8e28.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
2
|
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { EditorView } from '@codemirror/view';
|
|
4
4
|
import { CodeLanguage } from './props';
|
|
5
5
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
6
6
|
modelValue: {
|
|
@@ -44,8 +44,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
46
|
}, {
|
|
47
|
-
editorView: EditorView;
|
|
48
47
|
root: import("vue-demi").Ref<HTMLElement | undefined>;
|
|
48
|
+
editorView: EditorView;
|
|
49
49
|
control: import("vue-demi").Ref<any>;
|
|
50
50
|
fullscreenControl: import("vue-demi").Ref<any>;
|
|
51
51
|
modal: import("vue-demi").Ref<any>;
|
|
@@ -69,7 +69,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
69
69
|
focus: () => void;
|
|
70
70
|
blur: () => void;
|
|
71
71
|
openFullscreen: () => void;
|
|
72
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
72
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
73
73
|
modelValue: {
|
|
74
74
|
type: StringConstructor;
|
|
75
75
|
default: undefined;
|
|
@@ -112,6 +112,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
112
112
|
};
|
|
113
113
|
}>> & {
|
|
114
114
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
115
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
|
115
116
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
116
117
|
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
117
118
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CodeLanguage, s as OrCodeV3 } from '../OrCodeV3-
|
|
1
|
+
export { C as CodeLanguage, s as OrCodeV3 } from '../OrCodeV3-628f8e28.js';
|
|
2
2
|
export { E as EditorState, a as EditorView, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from '../OrCode-46b1b8aa.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CodeLanguage } from '../OrCodeV3-
|
|
1
|
+
export { C as CodeLanguage } from '../OrCodeV3-628f8e28.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as Code, c as CodeControl, b as CodeControlRoot, d as CodeModal } from '../OrCodeV3-
|
|
1
|
+
export { a as Code, c as CodeControl, b as CodeControlRoot, d as CodeModal } from '../OrCodeV3-628f8e28.js';
|
|
@@ -13,16 +13,6 @@ import { useValidationAttributes } from '../hooks/useValidationAttributes.js';
|
|
|
13
13
|
import { useProxyModelValue } from '../hooks/useProxyModelValue.js';
|
|
14
14
|
import { useTheme } from '../hooks/useTheme.js';
|
|
15
15
|
|
|
16
|
-
var CodeLanguage;
|
|
17
|
-
(function (CodeLanguage) {
|
|
18
|
-
CodeLanguage["HTML"] = "html";
|
|
19
|
-
CodeLanguage["CSS"] = "css";
|
|
20
|
-
CodeLanguage["JS"] = "js";
|
|
21
|
-
CodeLanguage["TS"] = "ts";
|
|
22
|
-
CodeLanguage["JSON"] = "json";
|
|
23
|
-
CodeLanguage["MD"] = "md";
|
|
24
|
-
})(CodeLanguage || (CodeLanguage = {}));
|
|
25
|
-
|
|
26
16
|
const Code = [
|
|
27
17
|
// Layout
|
|
28
18
|
'layout-column',
|
|
@@ -171,6 +161,16 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
161
|
script$1.render = render$1;
|
|
172
162
|
script$1.__file = "src/components/or-code-v3/partials/OrCodeControl.vue";
|
|
173
163
|
|
|
164
|
+
var CodeLanguage;
|
|
165
|
+
(function (CodeLanguage) {
|
|
166
|
+
CodeLanguage["HTML"] = "html";
|
|
167
|
+
CodeLanguage["CSS"] = "css";
|
|
168
|
+
CodeLanguage["JS"] = "js";
|
|
169
|
+
CodeLanguage["TS"] = "ts";
|
|
170
|
+
CodeLanguage["JSON"] = "json";
|
|
171
|
+
CodeLanguage["MD"] = "md";
|
|
172
|
+
})(CodeLanguage || (CodeLanguage = {}));
|
|
173
|
+
|
|
174
174
|
var script = defineComponent({
|
|
175
175
|
components: {
|
|
176
176
|
OrModal: script$6,
|
|
@@ -224,7 +224,7 @@ var script = defineComponent({
|
|
|
224
224
|
default: true
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
|
-
emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
|
|
227
|
+
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
228
228
|
expose: ['root', 'editorView', 'control', 'fullscreenControl', 'modal', 'focus', 'blur'],
|
|
229
229
|
setup(props, context) {
|
|
230
230
|
// Refs
|
|
@@ -279,6 +279,9 @@ var script = defineComponent({
|
|
|
279
279
|
// #region Codemirror
|
|
280
280
|
const theme = useTheme();
|
|
281
281
|
const defaultExtensions = [basicSetup, keymap.of([indentWithTab]), EditorState.readOnly.of(props.readonly), EditorView.editable.of(!props.disabled), EditorView.domEventHandlers({
|
|
282
|
+
input: event => {
|
|
283
|
+
context.emit('input', event);
|
|
284
|
+
},
|
|
282
285
|
keydown: event => {
|
|
283
286
|
context.emit('keydown', event);
|
|
284
287
|
},
|
|
@@ -293,6 +296,7 @@ var script = defineComponent({
|
|
|
293
296
|
}
|
|
294
297
|
}), EditorView.theme({
|
|
295
298
|
'&': {
|
|
299
|
+
overflow: 'hidden',
|
|
296
300
|
color: theme.textColor['on-background'],
|
|
297
301
|
backgroundColor: theme.backgroundColor['background']
|
|
298
302
|
},
|
|
@@ -308,7 +312,8 @@ var script = defineComponent({
|
|
|
308
312
|
'.cm-gutters': {
|
|
309
313
|
color: theme.textColor['on-background'],
|
|
310
314
|
backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
|
|
311
|
-
borderColor: theme.borderColor['outline']
|
|
315
|
+
borderColor: theme.borderColor['outline'],
|
|
316
|
+
backdropFilter: 'blur(2px)'
|
|
312
317
|
},
|
|
313
318
|
'.cm-activeLineGutter, .cm-activeLine': {
|
|
314
319
|
backgroundColor: theme.backgroundColor['primary-opacity-0-08']
|
|
@@ -384,8 +389,8 @@ var script = defineComponent({
|
|
|
384
389
|
editorView.destroy();
|
|
385
390
|
});
|
|
386
391
|
return {
|
|
387
|
-
editorView,
|
|
388
392
|
root,
|
|
393
|
+
editorView,
|
|
389
394
|
control,
|
|
390
395
|
fullscreenControl,
|
|
391
396
|
modal,
|
|
@@ -428,8 +433,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
428
433
|
_: 3 /* FORWARDED */
|
|
429
434
|
}, 8 /* PROPS */, ["control-id", "label", "hint", "error", "disabled", "readonly"]), createVNode(_component_OrModal, {
|
|
430
435
|
ref: "modal",
|
|
431
|
-
|
|
432
|
-
|
|
436
|
+
"additional-styles": _ctx.modalStyles,
|
|
437
|
+
size: 'l'
|
|
433
438
|
}, createSlots({
|
|
434
439
|
header: withCtx(() => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)]),
|
|
435
440
|
|
|
@@ -16,7 +16,7 @@ export { s as OrCheckboxTreeV3 } from './OrCheckboxTreeV3-885148fa.js';
|
|
|
16
16
|
export { s as OrCheckboxV3 } from './OrCheckboxV3-7d36a9a8.js';
|
|
17
17
|
export { s as OrChip, a as OrChips } from './OrChips-ba5bb85b.js';
|
|
18
18
|
export { E as EditorState, a as EditorView, q as OrCode, O as OrCodeLanguages, b as basicSetup, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from './OrCode-46b1b8aa.js';
|
|
19
|
-
export { C as CodeLanguage, s as OrCodeV3 } from './OrCodeV3-
|
|
19
|
+
export { C as CodeLanguage, s as OrCodeV3 } from './OrCodeV3-628f8e28.js';
|
|
20
20
|
export { default as OrCollapse } from './OrCollapse/OrCollapse.js';
|
|
21
21
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-2271c176.js';
|
|
22
22
|
export { s as OrCombinedInputV3 } from './OrCombinedInputV3-795e8cf2.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -9,7 +9,7 @@ export { C as CardPadding, s as OrCardV3 } from './components/OrCardV3-f9908b34.
|
|
|
9
9
|
export { default as OrCheckboxGroupV3 } from './components/OrCheckboxGroupV3/OrCheckboxGroup.js';
|
|
10
10
|
export { s as OrChip, a as OrChips } from './components/OrChips-ba5bb85b.js';
|
|
11
11
|
export { E as EditorState, a as EditorView, q as OrCode, O as OrCodeLanguages, b as basicSetup, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from './components/OrCode-46b1b8aa.js';
|
|
12
|
-
export { C as CodeLanguage, s as OrCodeV3 } from './components/OrCodeV3-
|
|
12
|
+
export { C as CodeLanguage, s as OrCodeV3 } from './components/OrCodeV3-628f8e28.js';
|
|
13
13
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './components/OrColorPicker-2271c176.js';
|
|
14
14
|
export { s as OrCombinedInputV3 } from './components/OrCombinedInputV3-795e8cf2.js';
|
|
15
15
|
export { s as OrConfirm } from './components/OrConfirm-f95a3ce6.js';
|
|
@@ -7,9 +7,9 @@ import '@onereach/styles/tailwind/plugins/core';
|
|
|
7
7
|
import { u as useTheme } from './useTheme-0ef25778.js';
|
|
8
8
|
import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
9
9
|
import { basicSetup } from 'codemirror';
|
|
10
|
-
import { keymap, EditorView } from '@codemirror/view';
|
|
11
10
|
import { indentWithTab } from '@codemirror/commands';
|
|
12
11
|
import { Compartment, EditorState } from '@codemirror/state';
|
|
12
|
+
import { keymap, EditorView } from '@codemirror/view';
|
|
13
13
|
import { _ as __vue_component__$7 } from './OrIconButton-edff56d4.js';
|
|
14
14
|
import { _ as __vue_component__$6 } from './OrModal-b191f8c8.js';
|
|
15
15
|
import { _ as __vue_component__$2 } from './OrError-916e928e.js';
|
|
@@ -19,16 +19,6 @@ import './OrInputBox.vue_rollup-plugin-vue_script-65ebcf4d.js';
|
|
|
19
19
|
import { _ as __vue_component__$5 } from './OrLabel-caf02dc4.js';
|
|
20
20
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
21
21
|
|
|
22
|
-
var CodeLanguage;
|
|
23
|
-
(function (CodeLanguage) {
|
|
24
|
-
CodeLanguage["HTML"] = "html";
|
|
25
|
-
CodeLanguage["CSS"] = "css";
|
|
26
|
-
CodeLanguage["JS"] = "js";
|
|
27
|
-
CodeLanguage["TS"] = "ts";
|
|
28
|
-
CodeLanguage["JSON"] = "json";
|
|
29
|
-
CodeLanguage["MD"] = "md";
|
|
30
|
-
})(CodeLanguage || (CodeLanguage = {}));
|
|
31
|
-
|
|
32
22
|
const Code = [
|
|
33
23
|
// Layout
|
|
34
24
|
'layout-column',
|
|
@@ -204,6 +194,16 @@ const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
|
|
|
204
194
|
staticRenderFns: __vue_staticRenderFns__$1
|
|
205
195
|
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
|
|
206
196
|
|
|
197
|
+
var CodeLanguage;
|
|
198
|
+
(function (CodeLanguage) {
|
|
199
|
+
CodeLanguage["HTML"] = "html";
|
|
200
|
+
CodeLanguage["CSS"] = "css";
|
|
201
|
+
CodeLanguage["JS"] = "js";
|
|
202
|
+
CodeLanguage["TS"] = "ts";
|
|
203
|
+
CodeLanguage["JSON"] = "json";
|
|
204
|
+
CodeLanguage["MD"] = "md";
|
|
205
|
+
})(CodeLanguage || (CodeLanguage = {}));
|
|
206
|
+
|
|
207
207
|
var script = defineComponent({
|
|
208
208
|
components: {
|
|
209
209
|
OrModal: __vue_component__$6,
|
|
@@ -257,7 +257,7 @@ var script = defineComponent({
|
|
|
257
257
|
default: true
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
|
-
emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
|
|
260
|
+
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
261
261
|
expose: ['root', 'editorView', 'control', 'fullscreenControl', 'modal', 'focus', 'blur'],
|
|
262
262
|
setup(props, context) {
|
|
263
263
|
// Refs
|
|
@@ -312,6 +312,9 @@ var script = defineComponent({
|
|
|
312
312
|
// #region Codemirror
|
|
313
313
|
const theme = useTheme();
|
|
314
314
|
const defaultExtensions = [basicSetup, keymap.of([indentWithTab]), EditorState.readOnly.of(props.readonly), EditorView.editable.of(!props.disabled), EditorView.domEventHandlers({
|
|
315
|
+
input: event => {
|
|
316
|
+
context.emit('input', event);
|
|
317
|
+
},
|
|
315
318
|
keydown: event => {
|
|
316
319
|
context.emit('keydown', event);
|
|
317
320
|
},
|
|
@@ -326,6 +329,7 @@ var script = defineComponent({
|
|
|
326
329
|
}
|
|
327
330
|
}), EditorView.theme({
|
|
328
331
|
'&': {
|
|
332
|
+
overflow: 'hidden',
|
|
329
333
|
color: theme.textColor['on-background'],
|
|
330
334
|
backgroundColor: theme.backgroundColor['background']
|
|
331
335
|
},
|
|
@@ -341,7 +345,8 @@ var script = defineComponent({
|
|
|
341
345
|
'.cm-gutters': {
|
|
342
346
|
color: theme.textColor['on-background'],
|
|
343
347
|
backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
|
|
344
|
-
borderColor: theme.borderColor['outline']
|
|
348
|
+
borderColor: theme.borderColor['outline'],
|
|
349
|
+
backdropFilter: 'blur(2px)'
|
|
345
350
|
},
|
|
346
351
|
'.cm-activeLineGutter, .cm-activeLine': {
|
|
347
352
|
backgroundColor: theme.backgroundColor['primary-opacity-0-08']
|
|
@@ -417,8 +422,8 @@ var script = defineComponent({
|
|
|
417
422
|
editorView.destroy();
|
|
418
423
|
});
|
|
419
424
|
return {
|
|
420
|
-
editorView,
|
|
421
425
|
root,
|
|
426
|
+
editorView,
|
|
422
427
|
control,
|
|
423
428
|
fullscreenControl,
|
|
424
429
|
modal,
|
|
@@ -477,8 +482,8 @@ var __vue_render__ = function () {
|
|
|
477
482
|
}), _vm._v(" "), _c('OrModal', {
|
|
478
483
|
ref: "modal",
|
|
479
484
|
attrs: {
|
|
480
|
-
"
|
|
481
|
-
"
|
|
485
|
+
"additional-styles": _vm.modalStyles,
|
|
486
|
+
"size": 'l'
|
|
482
487
|
},
|
|
483
488
|
scopedSlots: _vm._u([{
|
|
484
489
|
key: "header",
|
|
@@ -24,7 +24,7 @@ export { lintGutter, linter } from '@codemirror/lint';
|
|
|
24
24
|
export { javascript } from '@codemirror/lang-javascript';
|
|
25
25
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
26
26
|
export { html } from '@codemirror/lang-html';
|
|
27
|
-
export { C as CodeLanguage, _ as OrCodeV3 } from '../OrCode-
|
|
27
|
+
export { C as CodeLanguage, _ as OrCodeV3 } from '../OrCode-4c7bbbd2.js';
|
|
28
28
|
export { EditorView } from '@codemirror/view';
|
|
29
29
|
export { EditorState } from '@codemirror/state';
|
|
30
30
|
export { _ as OrCollapse } from '../OrCollapse-9d22b072.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
2
|
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { EditorView } from '@codemirror/view';
|
|
4
4
|
import { CodeLanguage } from './props';
|
|
5
5
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
6
|
-
editorView: EditorView;
|
|
7
6
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
7
|
+
editorView: EditorView;
|
|
8
8
|
control: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
9
|
[x: string]: ((...args: any[]) => any) | null;
|
|
10
10
|
} | string[], {} & {}, {
|
|
@@ -136,8 +136,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
136
136
|
} & {} & {
|
|
137
137
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
138
138
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
139
|
-
editorView: EditorView;
|
|
140
139
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
140
|
+
editorView: EditorView;
|
|
141
141
|
control: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
142
142
|
[x: string]: ((...args: any[]) => any) | null;
|
|
143
143
|
} | string[], {} & {}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CodeLanguage, _ as OrCodeV3 } from '../../OrCode-
|
|
1
|
+
export { C as CodeLanguage, _ as OrCodeV3 } from '../../OrCode-4c7bbbd2.js';
|
|
2
2
|
export { lintGutter, linter } from '@codemirror/lint';
|
|
3
3
|
export { javascript } from '@codemirror/lang-javascript';
|
|
4
4
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & {
|
|
2
2
|
tabs: any;
|
|
3
3
|
indicatorWidth: number;
|
|
4
4
|
indicatorTransformX: number;
|
|
@@ -7,7 +7,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
7
7
|
changeActiveIndex(index: number): void;
|
|
8
8
|
setIndicatorStyles({ clientWidth, offsetLeft }: HTMLElement): void;
|
|
9
9
|
onSelect(el: HTMLElement, index: number): void;
|
|
10
|
-
}, {}, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("
|
|
10
|
+
}, {}, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {} & {
|
|
11
11
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
12
12
|
}, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data>, {
|
|
13
13
|
tabs: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { TabsVariant } from './props';
|
|
3
3
|
import { TabsItem } from './types';
|
|
4
|
-
declare const _default: import("
|
|
4
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
5
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
6
6
|
overflowTab: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
7
7
|
[x: string]: ((...args: any[]) => any) | null;
|
|
@@ -61,7 +61,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
61
61
|
type: PropType<"default" | "fitted">;
|
|
62
62
|
default: () => TabsVariant.Default;
|
|
63
63
|
};
|
|
64
|
-
}>> & Omit<import("
|
|
64
|
+
}>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
65
65
|
modelValue: string | number;
|
|
66
66
|
items: TabsItem[];
|
|
67
67
|
variant: "default" | "fitted";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
declare const _default: import("
|
|
2
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & import("@vue/composition-api").Data, {
|
|
3
3
|
handleDeleteClick(event: MouseEvent): void;
|
|
4
4
|
}, {
|
|
5
5
|
rootClasses(): Record<string, boolean>;
|
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
44
44
|
required: false;
|
|
45
45
|
default: boolean;
|
|
46
46
|
};
|
|
47
|
-
}>> & Omit<import("
|
|
47
|
+
}>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
48
48
|
content: string;
|
|
49
49
|
color: string;
|
|
50
50
|
canDelete: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { TagsOverflow } from '../or-tags-v3';
|
|
3
3
|
import { TagObject } from '../or-tags-v3/types';
|
|
4
|
-
declare const _default: import("
|
|
4
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
5
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
6
6
|
control: import("@vue/composition-api").Ref<HTMLInputElement | undefined>;
|
|
7
7
|
inputBox: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
@@ -137,7 +137,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
137
137
|
type: BooleanConstructor;
|
|
138
138
|
default: boolean;
|
|
139
139
|
};
|
|
140
|
-
}>> & Omit<import("
|
|
140
|
+
}>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
141
141
|
modelValue: string[];
|
|
142
142
|
label: string;
|
|
143
143
|
placeholder: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { TagColor, TagVariant } from './props';
|
|
3
|
-
declare const _default: import("
|
|
3
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
5
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
6
|
custom: import("@vue/composition-api").ComputedRef<boolean>;
|
|
@@ -30,7 +30,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
default: boolean;
|
|
32
32
|
};
|
|
33
|
-
}>> & Omit<import("
|
|
33
|
+
}>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
34
34
|
variant: "tag" | "button" | "reset";
|
|
35
35
|
color: string;
|
|
36
36
|
disabled: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { TagsOverflow } from './props';
|
|
3
3
|
import { Tag } from './types';
|
|
4
|
-
declare const _default: import("
|
|
4
|
+
declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
5
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
6
6
|
container: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
7
7
|
localOverflow: import("@vue/composition-api").ComputedRef<TagsOverflow.Hidden | "wrap" | "hidden" | "scroll">;
|
|
@@ -64,7 +64,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
64
64
|
type: BooleanConstructor;
|
|
65
65
|
default: boolean;
|
|
66
66
|
};
|
|
67
|
-
}>> & Omit<import("
|
|
67
|
+
}>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
68
68
|
items: Tag[];
|
|
69
69
|
overflow: "default" | "wrap" | "hidden" | "scroll";
|
|
70
70
|
tagProps: Readonly<Partial<{
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export { lintGutter, linter } from '@codemirror/lint';
|
|
|
24
24
|
export { javascript } from '@codemirror/lang-javascript';
|
|
25
25
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
26
26
|
export { html } from '@codemirror/lang-html';
|
|
27
|
-
export { C as CodeLanguage, _ as OrCodeV3 } from './OrCode-
|
|
27
|
+
export { C as CodeLanguage, _ as OrCodeV3 } from './OrCode-4c7bbbd2.js';
|
|
28
28
|
export { EditorView } from '@codemirror/view';
|
|
29
29
|
export { EditorState } from '@codemirror/state';
|
|
30
30
|
export { _ as OrCollapse } from './OrCollapse-9d22b072.js';
|
|
@@ -7,9 +7,9 @@ import '@onereach/styles/tailwind/plugins/core';
|
|
|
7
7
|
import { u as useTheme } from './useTheme-0ef25778.js';
|
|
8
8
|
import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
9
9
|
import { basicSetup } from 'codemirror';
|
|
10
|
-
import { keymap, EditorView } from '@codemirror/view';
|
|
11
10
|
import { indentWithTab } from '@codemirror/commands';
|
|
12
11
|
import { Compartment, EditorState } from '@codemirror/state';
|
|
12
|
+
import { keymap, EditorView } from '@codemirror/view';
|
|
13
13
|
import { s as script$7 } from './OrIconButton-13fd3f96.js';
|
|
14
14
|
import { s as script$6 } from './OrModal-33100f1a.js';
|
|
15
15
|
import { s as script$2 } from './OrError-69bd7f6a.js';
|
|
@@ -18,16 +18,6 @@ import { s as script$4 } from './OrInputBox-8c1a29dd.js';
|
|
|
18
18
|
import { s as script$5 } from './OrLabel-40af976e.js';
|
|
19
19
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString, createElementVNode, withDirectives, createBlock, createCommentVNode, vShow, withModifiers, createSlots } from 'vue';
|
|
20
20
|
|
|
21
|
-
var CodeLanguage;
|
|
22
|
-
(function (CodeLanguage) {
|
|
23
|
-
CodeLanguage["HTML"] = "html";
|
|
24
|
-
CodeLanguage["CSS"] = "css";
|
|
25
|
-
CodeLanguage["JS"] = "js";
|
|
26
|
-
CodeLanguage["TS"] = "ts";
|
|
27
|
-
CodeLanguage["JSON"] = "json";
|
|
28
|
-
CodeLanguage["MD"] = "md";
|
|
29
|
-
})(CodeLanguage || (CodeLanguage = {}));
|
|
30
|
-
|
|
31
21
|
const Code = [
|
|
32
22
|
// Layout
|
|
33
23
|
'layout-column',
|
|
@@ -176,6 +166,16 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
166
|
script$1.render = render$1;
|
|
177
167
|
script$1.__file = "src/components/or-code-v3/partials/OrCodeControl.vue";
|
|
178
168
|
|
|
169
|
+
var CodeLanguage;
|
|
170
|
+
(function (CodeLanguage) {
|
|
171
|
+
CodeLanguage["HTML"] = "html";
|
|
172
|
+
CodeLanguage["CSS"] = "css";
|
|
173
|
+
CodeLanguage["JS"] = "js";
|
|
174
|
+
CodeLanguage["TS"] = "ts";
|
|
175
|
+
CodeLanguage["JSON"] = "json";
|
|
176
|
+
CodeLanguage["MD"] = "md";
|
|
177
|
+
})(CodeLanguage || (CodeLanguage = {}));
|
|
178
|
+
|
|
179
179
|
var script = defineComponent({
|
|
180
180
|
components: {
|
|
181
181
|
OrModal: script$6,
|
|
@@ -229,7 +229,7 @@ var script = defineComponent({
|
|
|
229
229
|
default: true
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
|
-
emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
|
|
232
|
+
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
233
233
|
expose: ['root', 'editorView', 'control', 'fullscreenControl', 'modal', 'focus', 'blur'],
|
|
234
234
|
setup(props, context) {
|
|
235
235
|
// Refs
|
|
@@ -284,6 +284,9 @@ var script = defineComponent({
|
|
|
284
284
|
// #region Codemirror
|
|
285
285
|
const theme = useTheme();
|
|
286
286
|
const defaultExtensions = [basicSetup, keymap.of([indentWithTab]), EditorState.readOnly.of(props.readonly), EditorView.editable.of(!props.disabled), EditorView.domEventHandlers({
|
|
287
|
+
input: event => {
|
|
288
|
+
context.emit('input', event);
|
|
289
|
+
},
|
|
287
290
|
keydown: event => {
|
|
288
291
|
context.emit('keydown', event);
|
|
289
292
|
},
|
|
@@ -298,6 +301,7 @@ var script = defineComponent({
|
|
|
298
301
|
}
|
|
299
302
|
}), EditorView.theme({
|
|
300
303
|
'&': {
|
|
304
|
+
overflow: 'hidden',
|
|
301
305
|
color: theme.textColor['on-background'],
|
|
302
306
|
backgroundColor: theme.backgroundColor['background']
|
|
303
307
|
},
|
|
@@ -313,7 +317,8 @@ var script = defineComponent({
|
|
|
313
317
|
'.cm-gutters': {
|
|
314
318
|
color: theme.textColor['on-background'],
|
|
315
319
|
backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
|
|
316
|
-
borderColor: theme.borderColor['outline']
|
|
320
|
+
borderColor: theme.borderColor['outline'],
|
|
321
|
+
backdropFilter: 'blur(2px)'
|
|
317
322
|
},
|
|
318
323
|
'.cm-activeLineGutter, .cm-activeLine': {
|
|
319
324
|
backgroundColor: theme.backgroundColor['primary-opacity-0-08']
|
|
@@ -389,8 +394,8 @@ var script = defineComponent({
|
|
|
389
394
|
editorView.destroy();
|
|
390
395
|
});
|
|
391
396
|
return {
|
|
392
|
-
editorView,
|
|
393
397
|
root,
|
|
398
|
+
editorView,
|
|
394
399
|
control,
|
|
395
400
|
fullscreenControl,
|
|
396
401
|
modal,
|
|
@@ -433,8 +438,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
438
|
_: 3 /* FORWARDED */
|
|
434
439
|
}, 8 /* PROPS */, ["control-id", "label", "hint", "error", "disabled", "readonly"]), createVNode(_component_OrModal, {
|
|
435
440
|
ref: "modal",
|
|
436
|
-
|
|
437
|
-
|
|
441
|
+
"additional-styles": _ctx.modalStyles,
|
|
442
|
+
size: 'l'
|
|
438
443
|
}, createSlots({
|
|
439
444
|
header: withCtx(() => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)]),
|
|
440
445
|
|
|
@@ -22,7 +22,7 @@ export { lintGutter, linter } from '@codemirror/lint';
|
|
|
22
22
|
export { javascript } from '@codemirror/lang-javascript';
|
|
23
23
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
24
24
|
export { html } from '@codemirror/lang-html';
|
|
25
|
-
export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-
|
|
25
|
+
export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-37d50c74.js';
|
|
26
26
|
export { EditorView } from '@codemirror/view';
|
|
27
27
|
export { EditorState } from '@codemirror/state';
|
|
28
28
|
export { s as OrCollapse } from '../OrCollapse-d7c0afae.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { EditorView } from '@codemirror/view';
|
|
3
2
|
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { EditorView } from '@codemirror/view';
|
|
4
4
|
import { CodeLanguage } from './props';
|
|
5
5
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
6
6
|
modelValue: {
|
|
@@ -44,8 +44,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
44
44
|
default: boolean;
|
|
45
45
|
};
|
|
46
46
|
}, {
|
|
47
|
-
editorView: EditorView;
|
|
48
47
|
root: import("vue-demi").Ref<HTMLElement | undefined>;
|
|
48
|
+
editorView: EditorView;
|
|
49
49
|
control: import("vue-demi").Ref<any>;
|
|
50
50
|
fullscreenControl: import("vue-demi").Ref<any>;
|
|
51
51
|
modal: import("vue-demi").Ref<any>;
|
|
@@ -69,7 +69,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
69
69
|
focus: () => void;
|
|
70
70
|
blur: () => void;
|
|
71
71
|
openFullscreen: () => void;
|
|
72
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
72
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
73
73
|
modelValue: {
|
|
74
74
|
type: StringConstructor;
|
|
75
75
|
default: undefined;
|
|
@@ -112,6 +112,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
112
112
|
};
|
|
113
113
|
}>> & {
|
|
114
114
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
115
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
|
115
116
|
onKeydown?: ((...args: any[]) => any) | undefined;
|
|
116
117
|
onKeyup?: ((...args: any[]) => any) | undefined;
|
|
117
118
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-
|
|
1
|
+
export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-37d50c74.js';
|
|
2
2
|
export { lintGutter, linter } from '@codemirror/lint';
|
|
3
3
|
export { javascript } from '@codemirror/lang-javascript';
|
|
4
4
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { lintGutter, linter } from '@codemirror/lint';
|
|
|
22
22
|
export { javascript } from '@codemirror/lang-javascript';
|
|
23
23
|
export { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
24
24
|
export { html } from '@codemirror/lang-html';
|
|
25
|
-
export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-
|
|
25
|
+
export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-37d50c74.js';
|
|
26
26
|
export { EditorView } from '@codemirror/view';
|
|
27
27
|
export { EditorState } from '@codemirror/state';
|
|
28
28
|
export { s as OrCollapse } from './OrCollapse-d7c0afae.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "8.17.0",
|
|
3
|
+
"version": "8.17.1-beta.3881.0",
|
|
4
4
|
"npmUnpacked": "4.15.2",
|
|
5
5
|
"description": "Vue components library for v2/3",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -176,6 +176,5 @@
|
|
|
176
176
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
177
177
|
},
|
|
178
178
|
"./package.json": "./package.json"
|
|
179
|
-
}
|
|
180
|
-
"gitHead": "5f3a231f61caf830f2a12a9c0f4d77674cd78053"
|
|
179
|
+
}
|
|
181
180
|
}
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
</template>
|
|
26
26
|
</OrCodeControl>
|
|
27
|
+
|
|
27
28
|
<OrModal
|
|
28
29
|
ref="modal"
|
|
29
|
-
size="l"
|
|
30
30
|
:additional-styles="modalStyles"
|
|
31
|
+
:size="'l'"
|
|
31
32
|
>
|
|
32
|
-
<template
|
|
33
|
-
v-slot:header
|
|
34
|
-
>
|
|
33
|
+
<template v-slot:header>
|
|
35
34
|
{{ label }}
|
|
36
35
|
</template>
|
|
36
|
+
|
|
37
37
|
<OrCodeControl
|
|
38
38
|
ref="fullscreenControl"
|
|
39
39
|
:control-id="controlAttributes.id"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
<slot name="addon" />
|
|
47
47
|
</template>
|
|
48
48
|
</OrCodeControl>
|
|
49
|
+
|
|
49
50
|
<template
|
|
50
51
|
v-if="$slots.modalFooter"
|
|
51
52
|
v-slot:footer
|
|
@@ -63,17 +64,17 @@ import { useControlAttributes, useIdAttribute, useProxyModelValue, useTheme, use
|
|
|
63
64
|
/* Codemirror core */
|
|
64
65
|
import { basicSetup } from 'codemirror';
|
|
65
66
|
|
|
66
|
-
import { EditorView, keymap } from '@codemirror/view';
|
|
67
67
|
import { indentWithTab } from '@codemirror/commands';
|
|
68
|
-
import { EditorState, Extension
|
|
68
|
+
import { Compartment, EditorState, Extension } from '@codemirror/state';
|
|
69
|
+
import { EditorView, keymap } from '@codemirror/view';
|
|
69
70
|
|
|
70
71
|
/* Components */
|
|
71
72
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
72
73
|
import { OrModalV3 as OrModal } from '../or-modal-v3';
|
|
73
74
|
|
|
75
|
+
import OrCodeControl from './partials/OrCodeControl.vue';
|
|
74
76
|
import { CodeLanguage } from './props';
|
|
75
77
|
import { Code, CodeControl, CodeModal } from './styles';
|
|
76
|
-
import OrCodeControl from './partials/OrCodeControl.vue';
|
|
77
78
|
|
|
78
79
|
export default defineComponent({
|
|
79
80
|
components: {
|
|
@@ -143,6 +144,7 @@ export default defineComponent({
|
|
|
143
144
|
emits: [
|
|
144
145
|
'update:modelValue',
|
|
145
146
|
|
|
147
|
+
'input',
|
|
146
148
|
'keydown',
|
|
147
149
|
'keyup',
|
|
148
150
|
'focus',
|
|
@@ -151,6 +153,7 @@ export default defineComponent({
|
|
|
151
153
|
|
|
152
154
|
expose: [
|
|
153
155
|
'root',
|
|
156
|
+
|
|
154
157
|
'editorView',
|
|
155
158
|
'control',
|
|
156
159
|
'fullscreenControl',
|
|
@@ -242,6 +245,10 @@ export default defineComponent({
|
|
|
242
245
|
EditorView.editable.of(!props.disabled),
|
|
243
246
|
|
|
244
247
|
EditorView.domEventHandlers({
|
|
248
|
+
input: (event) => {
|
|
249
|
+
context.emit('input', event);
|
|
250
|
+
},
|
|
251
|
+
|
|
245
252
|
keydown: (event) => {
|
|
246
253
|
context.emit('keydown', event);
|
|
247
254
|
},
|
|
@@ -261,6 +268,8 @@ export default defineComponent({
|
|
|
261
268
|
|
|
262
269
|
EditorView.theme({
|
|
263
270
|
'&': {
|
|
271
|
+
overflow: 'hidden',
|
|
272
|
+
|
|
264
273
|
color: theme.textColor['on-background'],
|
|
265
274
|
backgroundColor: theme.backgroundColor['background'],
|
|
266
275
|
},
|
|
@@ -280,6 +289,8 @@ export default defineComponent({
|
|
|
280
289
|
color: theme.textColor['on-background'],
|
|
281
290
|
backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
|
|
282
291
|
borderColor: theme.borderColor['outline'],
|
|
292
|
+
|
|
293
|
+
backdropFilter: 'blur(2px)',
|
|
283
294
|
},
|
|
284
295
|
|
|
285
296
|
'.cm-activeLineGutter, .cm-activeLine': {
|
|
@@ -290,6 +301,7 @@ export default defineComponent({
|
|
|
290
301
|
|
|
291
302
|
const state = EditorState.create({
|
|
292
303
|
doc: proxyModelValue.value,
|
|
304
|
+
|
|
293
305
|
extensions: [
|
|
294
306
|
...defaultExtensions,
|
|
295
307
|
languageExtensionCompartment.of([]),
|
|
@@ -299,6 +311,7 @@ export default defineComponent({
|
|
|
299
311
|
|
|
300
312
|
const editorView = new EditorView({
|
|
301
313
|
state,
|
|
314
|
+
|
|
302
315
|
dispatch: (transaction) => {
|
|
303
316
|
editorView.update([
|
|
304
317
|
transaction,
|
|
@@ -323,6 +336,7 @@ export default defineComponent({
|
|
|
323
336
|
to: editorView!.state.doc.length,
|
|
324
337
|
insert: modelValue,
|
|
325
338
|
},
|
|
339
|
+
|
|
326
340
|
selection: selection.ranges.some((range) => range.to > modelValue.length) ? { anchor: modelValue.length } : selection,
|
|
327
341
|
});
|
|
328
342
|
});
|
|
@@ -363,8 +377,8 @@ export default defineComponent({
|
|
|
363
377
|
});
|
|
364
378
|
|
|
365
379
|
return {
|
|
366
|
-
editorView,
|
|
367
380
|
root,
|
|
381
|
+
editorView,
|
|
368
382
|
control,
|
|
369
383
|
fullscreenControl,
|
|
370
384
|
modal,
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
</div>
|
|
52
52
|
</template>
|
|
53
|
+
|
|
53
54
|
<script lang="ts">
|
|
54
55
|
import { computed, ref, defineComponent } from 'vue-demi';
|
|
55
56
|
import { OrErrorV3 as OrError } from '../../or-error-v3';
|
|
@@ -101,7 +102,15 @@ export default defineComponent({
|
|
|
101
102
|
default: undefined,
|
|
102
103
|
},
|
|
103
104
|
},
|
|
104
|
-
|
|
105
|
+
|
|
106
|
+
expose: [
|
|
107
|
+
'root',
|
|
108
|
+
'control',
|
|
109
|
+
|
|
110
|
+
'focus',
|
|
111
|
+
'blur',
|
|
112
|
+
],
|
|
113
|
+
|
|
105
114
|
setup() {
|
|
106
115
|
// Refs
|
|
107
116
|
const root = ref<HTMLElement>();
|