@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.
Files changed (57) hide show
  1. package/dist/bundled/v2/components/OrCode/OrCode.js +2 -2
  2. package/dist/bundled/v2/components/OrCode/index.js +4 -5
  3. package/dist/bundled/v2/components/OrCode/lang.js +5 -5
  4. package/dist/bundled/v2/components/OrCode/libs.js +4 -5
  5. package/dist/bundled/v2/components/OrCode/theme.js +1 -1
  6. package/dist/bundled/v2/components/OrCodeV3/OrCode.js +24 -12
  7. package/dist/bundled/v2/components/OrCodeV3/index.js +2 -3
  8. package/dist/bundled/v2/components/OrCodeV3/libs.d.ts +1 -3
  9. package/dist/bundled/v2/components/OrCodeV3/libs.js +2 -3
  10. package/dist/bundled/v2/components/index.js +5 -6
  11. package/dist/bundled/v2/{index-86927ce2.js → index-5ce3ef85.js} +831 -10
  12. package/dist/bundled/{v3/index-b6bfd165.js → v2/index-5dd41049.js} +4 -4
  13. package/dist/bundled/{v3/index-ae9c3d66.js → v2/index-5ee42d1f.js} +2 -2
  14. package/dist/bundled/v2/{index-8bffe4d5.js → index-61aeae22.js} +1 -184
  15. package/dist/bundled/v2/{index-bd1ee981.js → index-648acd9e.js} +1 -1
  16. package/dist/bundled/{v3/index-83070a21.js → v2/index-64a3a364.js} +3 -3
  17. package/dist/bundled/v2/{index-14ee755d.js → index-c26082b9.js} +1 -1
  18. package/dist/bundled/v2/{index-118afe52.js → index-e72fe4a8.js} +2 -2
  19. package/dist/bundled/v2/{index-586d2cf4.js → index-f31843f4.js} +2 -2
  20. package/dist/bundled/v2/index.js +5 -6
  21. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-8355d429.js → OrCode.vue_vue_type_script_lang-8c5b4f6e.js} +2 -2
  22. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-29120928.js → OrCode.vue_vue_type_script_lang-b46a0f8a.js} +24 -12
  23. package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
  24. package/dist/bundled/v3/components/OrCode/index.js +5 -6
  25. package/dist/bundled/v3/components/OrCode/lang.js +5 -5
  26. package/dist/bundled/v3/components/OrCode/libs.js +4 -5
  27. package/dist/bundled/v3/components/OrCode/theme.js +1 -1
  28. package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
  29. package/dist/bundled/v3/components/OrCodeV3/index.js +3 -4
  30. package/dist/bundled/v3/components/OrCodeV3/libs.d.ts +1 -3
  31. package/dist/bundled/v3/components/OrCodeV3/libs.js +2 -3
  32. package/dist/bundled/v3/components/index.js +7 -8
  33. package/dist/bundled/v3/{index-1ec4fb10.js → index-19d70079.js} +2 -2
  34. package/dist/bundled/{v2/index-181d90ab.js → v3/index-22f7d3aa.js} +3 -3
  35. package/dist/bundled/v3/{index-93c7d0e8.js → index-792c62f6.js} +2 -2
  36. package/dist/bundled/{v2/index-49b0c759.js → v3/index-84ea2fc8.js} +4 -4
  37. package/dist/bundled/v3/{index-e488383c.js → index-929b54f2.js} +1 -184
  38. package/dist/bundled/{v2/index-bbdfebea.js → v3/index-b71d76f4.js} +2 -2
  39. package/dist/bundled/v3/{index-68fb579e.js → index-bb6d92dd.js} +1 -1
  40. package/dist/bundled/v3/{index-7006d0a5.js → index-df2529d7.js} +1 -1
  41. package/dist/bundled/v3/{index-b6a28985.js → index-f92296d7.js} +831 -10
  42. package/dist/bundled/v3/index.js +7 -8
  43. package/dist/esm/v2/{OrCode-920482b7.js → OrCode-adb9790d.js} +16 -4
  44. package/dist/esm/v2/components/index.js +3 -3
  45. package/dist/esm/v2/components/or-code-v3/index.js +3 -4
  46. package/dist/esm/v2/components/or-code-v3/libs.d.ts +1 -3
  47. package/dist/esm/v2/index.js +3 -3
  48. package/dist/esm/v3/{OrCode-a9234c28.js → OrCode-5457417e.js} +16 -4
  49. package/dist/esm/v3/components/index.js +3 -3
  50. package/dist/esm/v3/components/or-code-v3/index.js +3 -4
  51. package/dist/esm/v3/components/or-code-v3/libs.d.ts +1 -3
  52. package/dist/esm/v3/index.js +3 -3
  53. package/package.json +1 -1
  54. package/src/components/or-code-v3/OrCode.vue +14 -4
  55. package/src/components/or-code-v3/libs.ts +1 -6
  56. package/dist/bundled/v2/index-c6b2aeae.js +0 -825
  57. package/dist/bundled/v3/index-e556efde.js +0 -825
@@ -1,5 +1,5 @@
1
- import { w as EditorView, e as EditorState, a4 as keymap } from '../../index-8bffe4d5.js';
2
- import { b as basicSetup, i as indentWithTab } from '../../index-86927ce2.js';
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-86927ce2.js';
4
- export { a as lintGutter, l as linter } from '../../index-c6b2aeae.js';
5
- export { javascript } from '../../index-181d90ab.js';
6
- export { json, jsonParseLinter } from '../../index-586d2cf4.js';
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-49b0c759.js';
2
- import { css } from '../../index-118afe52.js';
3
- import { json } from '../../index-586d2cf4.js';
4
- import { javascript } from '../../index-181d90ab.js';
5
- import { markdown } from '../../index-bbdfebea.js';
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-86927ce2.js';
2
- export { a as lintGutter, l as linter } from '../../index-c6b2aeae.js';
3
- export { javascript } from '../../index-181d90ab.js';
4
- export { json, jsonParseLinter } from '../../index-586d2cf4.js';
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 { w as EditorView, aM as HighlightStyle, ax as tags, as as syntaxHighlighting } from '../../index-8bffe4d5.js';
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-86927ce2.js';
3
- import { d as Compartment, a4 as keymap, e as EditorState, w as EditorView } from '../../index-8bffe4d5.js';
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-49b0c759.js')).html();
92
+ return (await import('../../index-5dd41049.js')).html();
93
93
  case CodeLanguage.CSS:
94
- return (await import('../../index-118afe52.js')).css();
94
+ return (await import('../../index-e72fe4a8.js')).css();
95
95
  case CodeLanguage.JS:
96
- return (await import('../../index-181d90ab.js')).javascript();
96
+ return (await import('../../index-64a3a364.js')).javascript();
97
97
  case CodeLanguage.TS:
98
- return (await import('../../index-181d90ab.js')).javascript({
98
+ return (await import('../../index-64a3a364.js')).javascript({
99
99
  typescript: true
100
100
  });
101
101
  case CodeLanguage.JSON:
102
- return (await import('../../index-586d2cf4.js')).json();
102
+ return (await import('../../index-f31843f4.js')).json();
103
103
  case CodeLanguage.MD:
104
- return (await import('../../index-bbdfebea.js')).markdown();
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 { a as lintGutter, l as linter } from '../../index-c6b2aeae.js';
4
- export { json, jsonParseLinter } from '../../index-586d2cf4.js';
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,4 +1,2 @@
1
- export { linter, lintGutter } from '@codemirror/lint';
2
1
  export { json, jsonParseLinter } from '@codemirror/lang-json';
3
- export * from '@codemirror/state';
4
- export * from '@codemirror/view';
2
+ export { EditorView } from '@codemirror/view';
@@ -1,3 +1,2 @@
1
- export { a as lintGutter, l as linter } from '../../index-c6b2aeae.js';
2
- export { json, jsonParseLinter } from '../../index-586d2cf4.js';
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-86927ce2.js';
29
- export { a as lintGutter, l as linter } from '../index-c6b2aeae.js';
30
- export { javascript } from '../index-181d90ab.js';
31
- export { json, jsonParseLinter } from '../index-586d2cf4.js';
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 { 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';
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';