@onereach/ui-components 2.69.5-beta.2145.0 → 2.69.5-beta.2146.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 (51) hide show
  1. package/dist/bundled/v2/{OrCardCollection-c4209a92.js → OrCardCollection-f622df47.js} +9 -13
  2. package/dist/bundled/v2/{OrCode-edc7a1f5.js → OrCode-fc6876ec.js} +56 -17
  3. package/dist/bundled/v2/{OrSearch-76b002cf.js → OrSearch-a11b3621.js} +1 -1
  4. package/dist/bundled/v2/components/index.js +3 -3
  5. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  6. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -22
  7. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  8. package/dist/bundled/v2/components/or-code/index.js +1 -1
  9. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  10. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  11. package/dist/bundled/v2/index.js +4 -4
  12. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js → OrCardCollection.vue_vue_type_script_lang-15645a65.js} +2 -10
  13. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-ef5e7f04.js → OrCode.vue_vue_type_script_lang-c55de81d.js} +53 -14
  14. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-014ad470.js → OrSearch.vue_vue_type_script_lang-0ae8a6dd.js} +1 -1
  15. package/dist/bundled/v3/components/index.js +3 -3
  16. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  17. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -22
  18. package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -2
  19. package/dist/bundled/v3/components/or-code/index.js +1 -1
  20. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  21. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  22. package/dist/bundled/v3/index.js +9 -10
  23. package/dist/esm/v2/{OrCardCollection-57d11adf.js → OrCardCollection-43aa4a3c.js} +9 -13
  24. package/dist/esm/v2/{OrCode-41dd5f9b.js → OrCode-d4400b42.js} +6 -4
  25. package/dist/esm/v2/{OrSearch-2f260b09.js → OrSearch-62d91301.js} +1 -1
  26. package/dist/esm/v2/components/index.js +5 -3
  27. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  28. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -22
  29. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  30. package/dist/esm/v2/components/or-code/index.js +3 -1
  31. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  32. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  33. package/dist/esm/v2/index.js +5 -3
  34. package/dist/esm/v3/{OrCardCollection-2a6514f3.js → OrCardCollection-6b5e6b76.js} +5 -14
  35. package/dist/esm/v3/{OrCode-ee19a5e6.js → OrCode-5ed69c23.js} +3 -1
  36. package/dist/esm/v3/{OrSearch-e5a2e93e.js → OrSearch-aafb93b4.js} +1 -1
  37. package/dist/esm/v3/components/index.js +5 -3
  38. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  39. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -22
  40. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  41. package/dist/esm/v3/components/or-code/index.js +3 -1
  42. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +2 -2
  43. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  44. package/dist/esm/v3/index.js +5 -3
  45. package/package.json +2 -1
  46. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +0 -16
  47. package/src/components/or-card-collection-v3/OrCardCollection.vue +1 -13
  48. package/src/components/or-card-collection-v3/styles.ts +1 -3
  49. package/src/components/or-code/OrCode.vue +3 -1
  50. package/src/components/or-search-v3/OrSearch.stories3.ts +1 -1
  51. package/src/components/or-search-v3/OrSearch.vue +1 -1
@@ -7,7 +7,7 @@ import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
7
7
  import './OrMenuItem-4feaba6c.js';
8
8
  import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
9
9
  import './OrIcon-d878b768.js';
10
- import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-014ad470.js';
10
+ import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
11
11
  import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
12
12
  import { s as script$4 } from './OrButton.vue_vue_type_script_lang-b0dc31ca.js';
13
13
  import { s as script$7 } from './OrIcon.vue_vue_type_script_lang-a119a715.js';
@@ -38,7 +38,7 @@ const CardCollectionContentViews = {
38
38
  'grid': [
39
39
  // Layout
40
40
  'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
41
- 'list': ['grid-cols-1']
41
+ 'list': []
42
42
  };
43
43
 
44
44
  var script$1 = defineComponent({
@@ -156,14 +156,6 @@ var script = defineComponent({
156
156
  search: {
157
157
  type: String,
158
158
  default: ''
159
- },
160
- searchPlaceholder: {
161
- type: String,
162
- default: undefined
163
- },
164
- searchDebounce: {
165
- type: Number,
166
- default: undefined
167
159
  }
168
160
  },
169
161
  emits: ['viewChange', 'sortChange', 'searchChange'],
@@ -17855,7 +17855,11 @@ Comment or uncomment the current selection. Will use line comments
17855
17855
  if available, otherwise falling back to block comments.
17856
17856
  */
17857
17857
  const toggleComment = target => {
17858
- let config = getConfig(target.state);
17858
+ let {
17859
+ state
17860
+ } = target,
17861
+ line = state.doc.lineAt(state.selection.main.head),
17862
+ config = getConfig(target.state, line.from);
17859
17863
  return config.line ? toggleLineComment(target) : config.block ? toggleBlockCommentByLine(target) : false;
17860
17864
  };
17861
17865
  function command(f, option) {
@@ -17889,7 +17893,7 @@ Comment or uncomment the lines around the current selection using
17889
17893
  block comments.
17890
17894
  */
17891
17895
  const toggleBlockCommentByLine = /*@__PURE__*/command((o, s) => changeBlockComment(o, s, selectedLineRanges(s)), 0 /* CommentOption.Toggle */);
17892
- function getConfig(state, pos = state.selection.main.head) {
17896
+ function getConfig(state, pos) {
17893
17897
  let data = state.languageDataAt("commentTokens", pos);
17894
17898
  return data.length ? data[0] : {};
17895
17899
  }
@@ -18011,7 +18015,7 @@ function changeLineComment(option, state, ranges = state.selection.ranges) {
18011
18015
  let line = state.doc.lineAt(pos);
18012
18016
  if (line.from > prevLine && (from == to || to > line.from)) {
18013
18017
  prevLine = line.from;
18014
- let token = getConfig(state, pos).line;
18018
+ let token = getConfig(state, line.from).line;
18015
18019
  if (!token) continue;
18016
18020
  let indent = /^\s*/.exec(line.text)[0].length;
18017
18021
  let empty = indent == line.length;
@@ -18508,24 +18512,48 @@ const cursorLineUp = view => cursorByLine(view, false);
18508
18512
  Move the selection one line down.
18509
18513
  */
18510
18514
  const cursorLineDown = view => cursorByLine(view, true);
18511
- function pageHeight(view) {
18512
- return Math.max(view.defaultLineHeight, Math.min(view.dom.clientHeight, innerHeight) - 5);
18515
+ function pageInfo(view) {
18516
+ let selfScroll = view.scrollDOM.clientHeight < view.scrollDOM.scrollHeight - 2;
18517
+ let marginTop = 0,
18518
+ marginBottom = 0,
18519
+ height;
18520
+ if (selfScroll) {
18521
+ for (let source of view.state.facet(EditorView.scrollMargins)) {
18522
+ let margins = source(view);
18523
+ if (margins === null || margins === void 0 ? void 0 : margins.top) marginTop = Math.max(margins === null || margins === void 0 ? void 0 : margins.top, marginTop);
18524
+ if (margins === null || margins === void 0 ? void 0 : margins.bottom) marginBottom = Math.max(margins === null || margins === void 0 ? void 0 : margins.bottom, marginBottom);
18525
+ }
18526
+ height = view.scrollDOM.clientHeight - marginTop - marginBottom;
18527
+ } else {
18528
+ height = (view.dom.ownerDocument.defaultView || window).innerHeight;
18529
+ }
18530
+ return {
18531
+ marginTop,
18532
+ marginBottom,
18533
+ selfScroll,
18534
+ height: Math.max(view.defaultLineHeight, height - 5)
18535
+ };
18513
18536
  }
18514
18537
  function cursorByPage(view, forward) {
18538
+ let page = pageInfo(view);
18515
18539
  let {
18516
18540
  state
18517
18541
  } = view,
18518
18542
  selection = updateSel(state.selection, range => {
18519
- return range.empty ? view.moveVertically(range, forward, pageHeight(view)) : rangeEnd(range, forward);
18543
+ return range.empty ? view.moveVertically(range, forward, page.height) : rangeEnd(range, forward);
18520
18544
  });
18521
18545
  if (selection.eq(state.selection)) return false;
18522
- let startPos = view.coordsAtPos(state.selection.main.head);
18523
- let scrollRect = view.scrollDOM.getBoundingClientRect();
18524
18546
  let effect;
18525
- if (startPos && startPos.top > scrollRect.top && startPos.bottom < scrollRect.bottom && startPos.top - scrollRect.top <= view.scrollDOM.scrollHeight - view.scrollDOM.scrollTop - view.scrollDOM.clientHeight) effect = EditorView.scrollIntoView(selection.main.head, {
18526
- y: "start",
18527
- yMargin: startPos.top - scrollRect.top
18528
- });
18547
+ if (page.selfScroll) {
18548
+ let startPos = view.coordsAtPos(state.selection.main.head);
18549
+ let scrollRect = view.scrollDOM.getBoundingClientRect();
18550
+ let scrollTop = scrollRect.top + page.marginTop,
18551
+ scrollBottom = scrollRect.bottom - page.marginBottom;
18552
+ if (startPos && startPos.top > scrollTop && startPos.bottom < scrollBottom) effect = EditorView.scrollIntoView(selection.main.head, {
18553
+ y: "start",
18554
+ yMargin: startPos.top - scrollTop
18555
+ });
18556
+ }
18529
18557
  view.dispatch(setSel(state, selection), {
18530
18558
  effects: effect
18531
18559
  });
@@ -18651,7 +18679,7 @@ Move the selection head one line down.
18651
18679
  */
18652
18680
  const selectLineDown = view => selectByLine(view, true);
18653
18681
  function selectByPage(view, forward) {
18654
- return extendSel(view, range => view.moveVertically(range, forward, pageHeight(view)));
18682
+ return extendSel(view, range => view.moveVertically(range, forward, pageInfo(view).height));
18655
18683
  }
18656
18684
  /**
18657
18685
  Move the selection head one page up.
@@ -19586,6 +19614,17 @@ const defaultKeymap = /*@__PURE__*/[{
19586
19614
  key: "Alt-A",
19587
19615
  run: toggleBlockComment
19588
19616
  }].concat(standardKeymap);
19617
+ /**
19618
+ A binding that binds Tab to [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) and
19619
+ Shift-Tab to [`indentLess`](https://codemirror.net/6/docs/ref/#commands.indentLess).
19620
+ Please see the [Tab example](../../examples/tab/) before using
19621
+ this.
19622
+ */
19623
+ const indentWithTab = {
19624
+ key: "Tab",
19625
+ run: indentMore,
19626
+ shift: indentLess
19627
+ };
19589
19628
 
19590
19629
  function crelt() {
19591
19630
  var elt = arguments[0];
@@ -29506,7 +29545,7 @@ var script = defineComponent({
29506
29545
  }
29507
29546
  }),
29508
29547
  // line wrapping
29509
- lineWrapping ? EditorView.lineWrapping : undefined]);
29548
+ lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab])]);
29510
29549
  // Append Extensions (such as basic-setup)
29511
29550
  if (this.extensions.length !== 0) _.merge(ext, this.extensions);
29512
29551
  return ext;
@@ -23,7 +23,7 @@ var script = defineComponent({
23
23
  },
24
24
  placeholder: {
25
25
  type: String,
26
- default: 'Search'
26
+ default: undefined
27
27
  },
28
28
  debounce: {
29
29
  type: Number,
@@ -8,14 +8,14 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
8
8
  export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton.vue_vue_type_script_lang-b0dc31ca.js';
9
9
  export { s as OrCard } from '../OrCard.vue_vue_type_script_lang-90ba001b.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection.vue_vue_type_script_lang-d8124dda.js';
11
- export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js';
11
+ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection.vue_vue_type_script_lang-15645a65.js';
12
12
  export { s as OrCardV3 } from '../OrCard.vue_vue_type_script_lang-165de137.js';
13
13
  export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem.vue_vue_type_script_lang-ad286afc.js';
14
14
  export { s as OrCheckbox } from '../OrCheckbox.vue_vue_type_script_lang-d8a66818.js';
15
15
  export { s as OrCheckboxV3 } from '../OrCheckbox.vue_vue_type_script_lang-8b36e06c.js';
16
16
  export { s as OrChip } from '../OrChip-5d502431.js';
17
17
  export { s as OrChips } from '../OrChips.vue_vue_type_script_lang-69917e34.js';
18
- export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-ef5e7f04.js';
18
+ export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-c55de81d.js';
19
19
  export { s as OrCollapse } from '../OrCollapse.vue_vue_type_script_lang-65cbb754.js';
20
20
  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.vue_vue_type_script_lang-4141378d.js';
21
21
  export { s as OrConfirm } from '../OrConfirm.vue_vue_type_script_lang-0f16fc67.js';
@@ -63,7 +63,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
63
63
  export { s as OrRadio } from '../OrRadio.vue_vue_type_script_lang-c956b54b.js';
64
64
  export { s as OrRadioGroup } from '../OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
65
65
  export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-2e666a56.js';
66
- export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-014ad470.js';
66
+ export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
67
67
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-579406f5.js';
68
68
  export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-26c0a70a.js';
69
69
  export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-15285ce4.js';
@@ -20,8 +20,3 @@ export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
20
20
  export declare const ExtraViewMode: StoryFn<typeof OrCardCollection>;
21
21
  export declare const WithLink: StoryFn<typeof OrCardCollection>;
22
22
  export declare const EmptySearchResults: StoryFn<typeof OrCardCollection>;
23
- export declare const CustomizeSearch: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, 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("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
24
- [x: string]: ((...args: any[]) => any) | null;
25
- } | string[], {} & {}, {
26
- [x: number]: string;
27
- } | {}, true>)>;
@@ -47,14 +47,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
47
47
  type: StringConstructor;
48
48
  default: string;
49
49
  };
50
- searchPlaceholder: {
51
- type: StringConstructor;
52
- default: undefined;
53
- };
54
- searchDebounce: {
55
- type: NumberConstructor;
56
- default: undefined;
57
- };
58
50
  }, import("@vue/composition-api").ExtractPropTypes<{
59
51
  items: {
60
52
  type: PropType<CardCollectionItem[]>;
@@ -80,14 +72,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
80
72
  type: StringConstructor;
81
73
  default: string;
82
74
  };
83
- searchPlaceholder: {
84
- type: StringConstructor;
85
- default: undefined;
86
- };
87
- searchDebounce: {
88
- type: NumberConstructor;
89
- default: undefined;
90
- };
91
75
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
92
76
  search: string;
93
77
  sort: string;
@@ -95,8 +79,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
95
79
  view: string;
96
80
  viewModes: ViewMode[];
97
81
  sortOptions: SortOption[];
98
- searchPlaceholder: string;
99
- searchDebounce: number;
100
82
  } & {} & {
101
83
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
102
84
  }, import("@vue/composition-api").ShallowUnwrapRef<{
@@ -128,8 +110,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
128
110
  view: string;
129
111
  viewModes: ViewMode[];
130
112
  sortOptions: SortOption[];
131
- searchPlaceholder: string;
132
- searchDebounce: number;
133
113
  } & {} & {
134
114
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
135
115
  }, {
@@ -139,7 +119,5 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
139
119
  view: string;
140
120
  viewModes: ViewMode[];
141
121
  sortOptions: SortOption[];
142
- searchPlaceholder: string;
143
- searchDebounce: number;
144
122
  }, true>);
145
123
  export default _default;
@@ -1,4 +1,4 @@
1
- export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js';
1
+ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection.vue_vue_type_script_lang-15645a65.js';
2
2
  import 'vue';
3
3
  import '../../OrIconButton-1581013c.js';
4
4
  import '../../OrIconButton.vue_vue_type_script_lang-f6f801ff.js';
@@ -23,7 +23,7 @@ import '../../OrMenu-f26e8e55.js';
23
23
  import '../../OrMenu.vue_vue_type_script_lang-2446a69a.js';
24
24
  import '../../OrMenuItem-4feaba6c.js';
25
25
  import '../../OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
26
- import '../../OrSearch.vue_vue_type_script_lang-014ad470.js';
26
+ import '../../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
27
27
  import '../../OrInput-fa782fc1.js';
28
28
  import '../../OrInput.vue_vue_type_script_lang-f6d793d3.js';
29
29
  import '../../OrHint-9592499e.js';
@@ -1,4 +1,4 @@
1
- export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-ef5e7f04.js';
1
+ export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-c55de81d.js';
2
2
  import '@vueuse/core';
3
3
  import 'lodash';
4
4
  import 'vue';
@@ -22,7 +22,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
22
22
  };
23
23
  placeholder: {
24
24
  type: StringConstructor;
25
- default: string;
25
+ default: undefined;
26
26
  };
27
27
  debounce: {
28
28
  type: NumberConstructor;
@@ -48,7 +48,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
48
48
  };
49
49
  placeholder: {
50
50
  type: StringConstructor;
51
- default: string;
51
+ default: undefined;
52
52
  };
53
53
  debounce: {
54
54
  type: NumberConstructor;
@@ -1,4 +1,4 @@
1
- export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-014ad470.js';
1
+ export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-0ae8a6dd.js';
2
2
  export { a as SearchSize } from '../../OrInputBox.vue_vue_type_script_lang-5ee4ee45.js';
3
3
  import 'vue';
4
4
  import '@vueuse/core';