@onereach/ui-components 6.2.0-beta.3281.0 → 6.2.0-beta.3286.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/OrCode/OrCode.js +2 -2
- package/dist/bundled/v2/components/OrCode/index.js +4 -5
- package/dist/bundled/v2/components/OrCode/lang.js +5 -5
- package/dist/bundled/v2/components/OrCode/libs.js +4 -5
- package/dist/bundled/v2/components/OrCode/theme.js +1 -1
- package/dist/bundled/v2/components/OrCodeV3/OrCode.js +24 -12
- package/dist/bundled/v2/components/OrCodeV3/index.js +2 -3
- package/dist/bundled/v2/components/OrCodeV3/libs.d.ts +1 -3
- package/dist/bundled/v2/components/OrCodeV3/libs.js +2 -3
- package/dist/bundled/v2/components/index.js +5 -6
- package/dist/bundled/v2/{index-86927ce2.js → index-5ce3ef85.js} +831 -10
- package/dist/bundled/{v3/index-b6bfd165.js → v2/index-5dd41049.js} +4 -4
- package/dist/bundled/{v3/index-ae9c3d66.js → v2/index-5ee42d1f.js} +2 -2
- package/dist/bundled/v2/{index-8bffe4d5.js → index-61aeae22.js} +1 -184
- package/dist/bundled/v2/{index-bd1ee981.js → index-648acd9e.js} +1 -1
- package/dist/bundled/{v3/index-83070a21.js → v2/index-64a3a364.js} +3 -3
- package/dist/bundled/v2/{index-14ee755d.js → index-c26082b9.js} +1 -1
- package/dist/bundled/v2/{index-118afe52.js → index-e72fe4a8.js} +2 -2
- package/dist/bundled/v2/{index-586d2cf4.js → index-f31843f4.js} +2 -2
- package/dist/bundled/v2/index.js +5 -6
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-8355d429.js → OrCode.vue_vue_type_script_lang-8c5b4f6e.js} +2 -2
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-29120928.js → OrCode.vue_vue_type_script_lang-b46a0f8a.js} +24 -12
- package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCode/index.js +5 -6
- package/dist/bundled/v3/components/OrCode/lang.js +5 -5
- package/dist/bundled/v3/components/OrCode/libs.js +4 -5
- package/dist/bundled/v3/components/OrCode/theme.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/index.js +3 -4
- package/dist/bundled/v3/components/OrCodeV3/libs.d.ts +1 -3
- package/dist/bundled/v3/components/OrCodeV3/libs.js +2 -3
- package/dist/bundled/v3/components/index.js +7 -8
- package/dist/bundled/v3/{index-1ec4fb10.js → index-19d70079.js} +2 -2
- package/dist/bundled/{v2/index-181d90ab.js → v3/index-22f7d3aa.js} +3 -3
- package/dist/bundled/v3/{index-93c7d0e8.js → index-792c62f6.js} +2 -2
- package/dist/bundled/{v2/index-49b0c759.js → v3/index-84ea2fc8.js} +4 -4
- package/dist/bundled/v3/{index-e488383c.js → index-929b54f2.js} +1 -184
- package/dist/bundled/{v2/index-bbdfebea.js → v3/index-b71d76f4.js} +2 -2
- package/dist/bundled/v3/{index-68fb579e.js → index-bb6d92dd.js} +1 -1
- package/dist/bundled/v3/{index-7006d0a5.js → index-df2529d7.js} +1 -1
- package/dist/bundled/v3/{index-b6a28985.js → index-f92296d7.js} +831 -10
- package/dist/bundled/v3/index.js +7 -8
- package/dist/esm/v2/{OrCode-920482b7.js → OrCode-adb9790d.js} +16 -4
- package/dist/esm/v2/components/index.js +3 -3
- package/dist/esm/v2/components/or-code-v3/index.js +3 -4
- package/dist/esm/v2/components/or-code-v3/libs.d.ts +1 -3
- package/dist/esm/v2/index.js +3 -3
- package/dist/esm/v3/{OrCode-a9234c28.js → OrCode-5457417e.js} +16 -4
- package/dist/esm/v3/components/index.js +3 -3
- package/dist/esm/v3/components/or-code-v3/index.js +3 -4
- package/dist/esm/v3/components/or-code-v3/libs.d.ts +1 -3
- package/dist/esm/v3/index.js +3 -3
- package/package.json +1 -1
- package/src/components/or-code-v3/OrCode.vue +14 -4
- package/src/components/or-code-v3/libs.ts +1 -6
- package/dist/bundled/v2/index-c6b2aeae.js +0 -825
- package/dist/bundled/v3/index-e556efde.js +0 -825
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as basicSetup, i as indentWithTab } from '../../index-
|
|
1
|
+
import { E as EditorView, a as EditorState, k as keymap } from '../../index-61aeae22.js';
|
|
2
|
+
import { b as basicSetup, i as indentWithTab } from '../../index-5ce3ef85.js';
|
|
3
3
|
import { u as useElementHover } from '../../index-509d77a1.js';
|
|
4
4
|
import { defineComponent, ref } from 'vue-demi';
|
|
5
5
|
import __vue_component__$3 from '../OrTeleport/OrTeleport.js';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as OrCode } from './OrCode.js';
|
|
2
2
|
export { OrCodeLanguages } from './constants.js';
|
|
3
|
-
export { b as basicSetup } from '../../index-
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { html } from '../../index-49b0c759.js';
|
|
3
|
+
export { b as basicSetup, a as lintGutter, l as linter } from '../../index-5ce3ef85.js';
|
|
4
|
+
export { javascript } from '../../index-64a3a364.js';
|
|
5
|
+
export { json, jsonParseLinter } from '../../index-f31843f4.js';
|
|
6
|
+
export { html } from '../../index-5dd41049.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { html } from '../../index-
|
|
2
|
-
import { css } from '../../index-
|
|
3
|
-
import { json } from '../../index-
|
|
4
|
-
import { javascript } from '../../index-
|
|
5
|
-
import { markdown } from '../../index-
|
|
1
|
+
import { html } from '../../index-5dd41049.js';
|
|
2
|
+
import { css } from '../../index-e72fe4a8.js';
|
|
3
|
+
import { json } from '../../index-f31843f4.js';
|
|
4
|
+
import { javascript } from '../../index-64a3a364.js';
|
|
5
|
+
import { markdown } from '../../index-5ee42d1f.js';
|
|
6
6
|
import { OrCodeLanguages } from './constants.js';
|
|
7
7
|
|
|
8
8
|
const JS = javascript({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { b as basicSetup } from '../../index-
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { html } from '../../index-49b0c759.js';
|
|
1
|
+
export { b as basicSetup, a as lintGutter, l as linter } from '../../index-5ce3ef85.js';
|
|
2
|
+
export { javascript } from '../../index-64a3a364.js';
|
|
3
|
+
export { json, jsonParseLinter } from '../../index-f31843f4.js';
|
|
4
|
+
export { html } from '../../index-5dd41049.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as EditorView, am as HighlightStyle, a4 as tags, Y as syntaxHighlighting } from '../../index-61aeae22.js';
|
|
2
2
|
|
|
3
3
|
// Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
|
|
4
4
|
const chalky = 'var(--c-warning-darken-20)',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive, toRef, watch, onMounted, onUnmounted } from 'vue-demi';
|
|
2
|
-
import { b as basicSetup, i as indentWithTab } from '../../index-
|
|
3
|
-
import {
|
|
2
|
+
import { b as basicSetup, i as indentWithTab } from '../../index-5ce3ef85.js';
|
|
3
|
+
import { C as Compartment, k as keymap, a as EditorState, E as EditorView } from '../../index-61aeae22.js';
|
|
4
4
|
import { CodeLanguage } from './props.js';
|
|
5
5
|
import { Code, CodeControl } from './styles.js';
|
|
6
6
|
import __vue_component__$1 from '../OrErrorV3/OrError.js';
|
|
@@ -89,19 +89,19 @@ var script = defineComponent({
|
|
|
89
89
|
const getLanguageExtension = async language => {
|
|
90
90
|
switch (language) {
|
|
91
91
|
case CodeLanguage.HTML:
|
|
92
|
-
return (await import('../../index-
|
|
92
|
+
return (await import('../../index-5dd41049.js')).html();
|
|
93
93
|
case CodeLanguage.CSS:
|
|
94
|
-
return (await import('../../index-
|
|
94
|
+
return (await import('../../index-e72fe4a8.js')).css();
|
|
95
95
|
case CodeLanguage.JS:
|
|
96
|
-
return (await import('../../index-
|
|
96
|
+
return (await import('../../index-64a3a364.js')).javascript();
|
|
97
97
|
case CodeLanguage.TS:
|
|
98
|
-
return (await import('../../index-
|
|
98
|
+
return (await import('../../index-64a3a364.js')).javascript({
|
|
99
99
|
typescript: true
|
|
100
100
|
});
|
|
101
101
|
case CodeLanguage.JSON:
|
|
102
|
-
return (await import('../../index-
|
|
102
|
+
return (await import('../../index-f31843f4.js')).json();
|
|
103
103
|
case CodeLanguage.MD:
|
|
104
|
-
return (await import('../../index-
|
|
104
|
+
return (await import('../../index-5ee42d1f.js')).markdown();
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
// Methods
|
|
@@ -154,11 +154,7 @@ var script = defineComponent({
|
|
|
154
154
|
const state = EditorState.create({
|
|
155
155
|
doc: proxyModelValue.value,
|
|
156
156
|
extensions: [...defaultExtensions, addedExtensionCompartment.of([])]
|
|
157
|
-
// selection: selection.ranges.some((range) => range.to > modelValue.length)
|
|
158
|
-
// ? { anchor: modelValue.length }
|
|
159
|
-
// : selection,
|
|
160
157
|
});
|
|
161
|
-
|
|
162
158
|
const editorView = new EditorView({
|
|
163
159
|
state,
|
|
164
160
|
dispatch: transaction => {
|
|
@@ -168,6 +164,22 @@ var script = defineComponent({
|
|
|
168
164
|
}
|
|
169
165
|
}
|
|
170
166
|
});
|
|
167
|
+
watch(proxyModelValue, value => {
|
|
168
|
+
const modelValue = value !== null && value !== void 0 ? value : '';
|
|
169
|
+
const {
|
|
170
|
+
selection
|
|
171
|
+
} = editorView.state;
|
|
172
|
+
editorView.dispatch({
|
|
173
|
+
changes: {
|
|
174
|
+
from: 0,
|
|
175
|
+
to: editorView.state.doc.length,
|
|
176
|
+
insert: modelValue
|
|
177
|
+
},
|
|
178
|
+
selection: selection.ranges.some(range => range.to > modelValue.length) ? {
|
|
179
|
+
anchor: modelValue.length
|
|
180
|
+
} : selection
|
|
181
|
+
});
|
|
182
|
+
});
|
|
171
183
|
watch([() => props.extensions, () => props.language], async _ref => {
|
|
172
184
|
let [extensions, language] = _ref;
|
|
173
185
|
const languageExt = await getLanguageExtension(language);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { default as OrCodeV3 } from './OrCode.js';
|
|
2
2
|
export { CodeLanguage } from './props.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { A as Annotation, a as AnnotationType, B as BidiSpan, t as BlockInfo, u as BlockType, C as ChangeDesc, b as ChangeSet, c as CharCategory, d as Compartment, D as Decoration, v as Direction, E as EditorSelection, e as EditorState, w as EditorView, F as Facet, G as GutterMarker, L as Line, M as MapMode, x as MatchDecorator, P as Prec, R as Range, f as RangeSet, g as RangeSetBuilder, h as RangeValue, y as RectangleMarker, S as SelectionRange, i as StateEffect, j as StateEffectType, k as StateField, T as Text, l as Transaction, V as ViewPlugin, z as ViewUpdate, W as WidgetType, _ as __test, H as closeHoverTooltips, m as codePointAt, n as codePointSize, o as combineConfig, p as countColumn, I as crosshairCursor, J as drawSelection, K as dropCursor, q as findClusterBreak, r as findColumn, s as fromCodePoint, N as getPanel, O as getTooltip, Q as gutter, U as gutterLineClass, X as gutters, Y as hasHoverTooltips, Z as highlightActiveLine, $ as highlightActiveLineGutter, a0 as highlightSpecialChars, a1 as highlightTrailingWhitespace, a2 as highlightWhitespace, a3 as hoverTooltip, a4 as keymap, a5 as layer, a6 as lineNumberMarkers, a7 as lineNumbers, a8 as logException, a9 as panels, aa as placeholder, ab as rectangularSelection, ac as repositionTooltips, ad as runScopeHandlers, ae as scrollPastEnd, af as showPanel, ag as showTooltip, ah as tooltips } from '../../index-8bffe4d5.js';
|
|
3
|
+
export { json, jsonParseLinter } from '../../index-f31843f4.js';
|
|
4
|
+
export { E as EditorView } from '../../index-61aeae22.js';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { A as Annotation, a as AnnotationType, B as BidiSpan, t as BlockInfo, u as BlockType, C as ChangeDesc, b as ChangeSet, c as CharCategory, d as Compartment, D as Decoration, v as Direction, E as EditorSelection, e as EditorState, w as EditorView, F as Facet, G as GutterMarker, L as Line, M as MapMode, x as MatchDecorator, P as Prec, R as Range, f as RangeSet, g as RangeSetBuilder, h as RangeValue, y as RectangleMarker, S as SelectionRange, i as StateEffect, j as StateEffectType, k as StateField, T as Text, l as Transaction, V as ViewPlugin, z as ViewUpdate, W as WidgetType, _ as __test, H as closeHoverTooltips, m as codePointAt, n as codePointSize, o as combineConfig, p as countColumn, I as crosshairCursor, J as drawSelection, K as dropCursor, q as findClusterBreak, r as findColumn, s as fromCodePoint, N as getPanel, O as getTooltip, Q as gutter, U as gutterLineClass, X as gutters, Y as hasHoverTooltips, Z as highlightActiveLine, $ as highlightActiveLineGutter, a0 as highlightSpecialChars, a1 as highlightTrailingWhitespace, a2 as highlightWhitespace, a3 as hoverTooltip, a4 as keymap, a5 as layer, a6 as lineNumberMarkers, a7 as lineNumbers, a8 as logException, a9 as panels, aa as placeholder, ab as rectangularSelection, ac as repositionTooltips, ad as runScopeHandlers, ae as scrollPastEnd, af as showPanel, ag as showTooltip, ah as tooltips } from '../../index-8bffe4d5.js';
|
|
1
|
+
export { json, jsonParseLinter } from '../../index-f31843f4.js';
|
|
2
|
+
export { E as EditorView } from '../../index-61aeae22.js';
|
|
@@ -25,14 +25,13 @@ export { default as OrChip } from './OrChip/OrChip.js';
|
|
|
25
25
|
export { default as OrChips } from './OrChips/OrChips.js';
|
|
26
26
|
export { default as OrCode } from './OrCode/OrCode.js';
|
|
27
27
|
export { OrCodeLanguages } from './OrCode/constants.js';
|
|
28
|
-
export { b as basicSetup } from '../index-
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export { html } from '../index-49b0c759.js';
|
|
28
|
+
export { b as basicSetup, a as lintGutter, l as linter } from '../index-5ce3ef85.js';
|
|
29
|
+
export { javascript } from '../index-64a3a364.js';
|
|
30
|
+
export { json, jsonParseLinter } from '../index-f31843f4.js';
|
|
31
|
+
export { html } from '../index-5dd41049.js';
|
|
33
32
|
export { default as OrCodeV3 } from './OrCodeV3/OrCode.js';
|
|
34
33
|
export { CodeLanguage } from './OrCodeV3/props.js';
|
|
35
|
-
export {
|
|
34
|
+
export { E as EditorView } from '../index-61aeae22.js';
|
|
36
35
|
export { default as OrCollapse } from './OrCollapse/OrCollapse.js';
|
|
37
36
|
export { default as OrColorPicker } from './OrColorPicker/OrColorPicker.js';
|
|
38
37
|
export { amber, black, blue, blueGrey, brown, cyan, deepOrange, deepPurple, green, indigo, lightBlue, lightGreen, lime, orange, pink, purple, red, teal, white, yellow } from './OrColorPicker/constants.js';
|