@onereach/ui-components 2.70.0-beta.2159.0 → 2.70.0-beta.2164.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 (33) hide show
  1. package/dist/bundled/v2/{OrRichTextEditor-5843ecda.js → OrRichTextEditor-9e2535da.js} +6 -12
  2. package/dist/bundled/v2/{codemirrorView-14f6685c.js → codemirrorView-77ce9187.js} +2 -2
  3. package/dist/bundled/v2/components/index.js +2 -2
  4. package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +2 -2
  5. package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -18
  6. package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +1 -1
  7. package/dist/bundled/v2/index.js +2 -2
  8. package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-e0dfd695.js → OrRichTextEditor.vue_vue_type_script_lang-1aa9ad53.js} +4 -10
  9. package/dist/bundled/v3/{codemirrorView-14f6685c.js → codemirrorView-77ce9187.js} +2 -2
  10. package/dist/bundled/v3/components/index.js +2 -2
  11. package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +2 -2
  12. package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -18
  13. package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +1 -1
  14. package/dist/bundled/v3/index.js +4 -4
  15. package/dist/esm/v2/{OrRichTextEditor-2d152db0.js → OrRichTextEditor-ed356c5b.js} +6 -12
  16. package/dist/esm/v2/{codemirrorView-8ea431d2.js → codemirrorView-2e87c938.js} +2 -2
  17. package/dist/esm/v2/components/index.js +2 -2
  18. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +2 -2
  19. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -18
  20. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +1 -1
  21. package/dist/esm/v2/index.js +2 -2
  22. package/dist/esm/v3/{OrRichTextEditor-f1271eb6.js → OrRichTextEditor-f710fc9d.js} +5 -11
  23. package/dist/esm/v3/{codemirrorView-8ea431d2.js → codemirrorView-2e87c938.js} +2 -2
  24. package/dist/esm/v3/components/index.js +2 -2
  25. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +2 -2
  26. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -18
  27. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +1 -1
  28. package/dist/esm/v3/index.js +2 -2
  29. package/package.json +1 -1
  30. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +2 -2
  31. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +17 -13
  32. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +1 -1
  33. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +11 -16
@@ -1,5 +1,5 @@
1
1
  import './index-fa6eb4ca.js';
2
- import { S as Schema, M as Mark$1, T as TextSelection, N as NodeSelection, a as Selection, b as Slice, d as dropPoint, D as DOMSerializer, F as Fragment, c as DOMParser$1, A as AllSelection, P as Plugin, e as NodeRange, f as findWrapping, R as ReplaceAroundStep, g as canSplit, l as liftTarget, h as canJoin, i as PluginKey, E as EditorState, j as createParagraphNear$1, k as deleteSelection$1, m as exitCode$1, n as joinUp$1, o as joinDown$1, p as joinBackward$1, q as joinForward$1, r as lift$1, s as liftEmptyBlock$1, t as newlineInCode$1, u as selectNodeBackward$1, v as selectNodeForward$1, w as selectParentNode$1, x as selectTextblockEnd$1, y as selectTextblockStart$1, z as Transform, B as setBlockType, C as wrapIn$1, G as ReplaceStep, H as Mapping, I as CodeMirrorView } from './codemirrorView-14f6685c.js';
2
+ import { S as Schema, M as Mark$1, T as TextSelection, N as NodeSelection, a as Selection, b as Slice, d as dropPoint, D as DOMSerializer, F as Fragment, c as DOMParser$1, A as AllSelection, P as Plugin, e as NodeRange, f as findWrapping, R as ReplaceAroundStep, g as canSplit, l as liftTarget, h as canJoin, i as PluginKey, E as EditorState, j as createParagraphNear$1, k as deleteSelection$1, m as exitCode$1, n as joinUp$1, o as joinDown$1, p as joinBackward$1, q as joinForward$1, r as lift$1, s as liftEmptyBlock$1, t as newlineInCode$1, u as selectNodeBackward$1, v as selectNodeForward$1, w as selectParentNode$1, x as selectTextblockEnd$1, y as selectTextblockStart$1, z as Transform, B as setBlockType, C as wrapIn$1, G as ReplaceStep, H as Mapping, I as CodeMirrorView } from './codemirrorView-77ce9187.js';
3
3
  import require$$8 from 'node:punycode';
4
4
  import { c as keyName, d as base } from './index-780d00b0.js';
5
5
  import { w as minimalSetup, g as javascript } from './index-46cc379c.js';
@@ -29509,7 +29509,7 @@ const Placeholder = Extension.create({
29509
29509
  });
29510
29510
 
29511
29511
  var codemirrorNode = Node.create({
29512
- name: 'code_block',
29512
+ name: 'codeBlock',
29513
29513
  content: 'text*',
29514
29514
  marks: '',
29515
29515
  group: 'block',
@@ -29736,12 +29736,10 @@ var script = defineComponent({
29736
29736
  editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
29737
29737
  } else if (item === 'codeBlock') {
29738
29738
  if (!isActive.value['codeBlock']) {
29739
- // isActive.value['codeBlock'] = true;
29740
- editor === null || editor === void 0 ? void 0 : editor.commands.setNode('code_block', {
29739
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
29741
29740
  language: 'javascript'
29742
29741
  });
29743
29742
  } else {
29744
- // isActive.value['codeBlock'] = false;
29745
29743
  editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
29746
29744
  }
29747
29745
  } else if (item === 'heading') {
@@ -29784,11 +29782,7 @@ var script = defineComponent({
29784
29782
  const setActiveFormats = () => {
29785
29783
  const toolbarList = props.toolbar.flat();
29786
29784
  toolbarList.forEach(item => {
29787
- if (item === 'codeBlock') {
29788
- isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive('code_block')) || false;
29789
- } else {
29790
- isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
29791
- }
29785
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
29792
29786
  });
29793
29787
  };
29794
29788
  // Styles
@@ -29949,8 +29943,8 @@ var __vue_staticRenderFns__ = [];
29949
29943
  /* style */
29950
29944
  const __vue_inject_styles__ = function (inject) {
29951
29945
  if (!inject) return;
29952
- inject("data-v-c32ab588_0", {
29953
- source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}.tiptap-editor .cm-editor{border:solid 1px #838990;border-radius:4px}.tiptap-editor .cm-editor.cm-focused{outline:0}.tiptap-editor .cm-editor .cm-line:hover{background-color:rgba(0,95,177,.08)}",
29946
+ inject("data-v-107095c6_0", {
29947
+ source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}.tiptap-editor .cm-editor{border:none;border-radius:4px}.tiptap-editor .cm-editor .cm-scroller{border-radius:4px}.tiptap-editor .cm-editor.cm-focused{outline:0}.tiptap-editor .cm-editor .cm-gutters{background-color:rgba(0,95,177,.08);border:none}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement{padding:0 10px}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter{background-color:rgba(0,95,177,.07)}",
29954
29948
  map: undefined,
29955
29949
  media: undefined
29956
29950
  });
@@ -1,4 +1,4 @@
1
- import { b as EditorState$1, E as EditorView, k as keymap } from './index-780d00b0.js';
1
+ import { b as EditorState$1, E as EditorView, Q as highlightActiveLine, I as highlightActiveLineGutter, H as lineNumbers, k as keymap } from './index-780d00b0.js';
2
2
 
3
3
  // ::- Persistent data structure representing an ordered mapping from
4
4
  // strings to values, with some convenient update methods.
@@ -6998,7 +6998,7 @@ class CodeMirrorView {
6998
6998
  this.dom = this.cm.dom;
6999
6999
  const cmState = EditorState$1.create({
7000
7000
  doc: this.node.textContent,
7001
- extensions: [changeFilter, keymap.of([{
7001
+ extensions: [changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
7002
7002
  key: 'ArrowUp',
7003
7003
  run: this.mayBeEscape('line', -1)
7004
7004
  }, {
@@ -96,7 +96,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-3a3d
96
96
  export { O as OrTooltip } from '../OrTooltip-dfea7af2.js';
97
97
  export { O as OrTooltipContent } from '../OrTooltipContent-f0fd5f75.js';
98
98
  export { O as OrTooltipV3 } from '../OrTooltip-fbfa05fd.js';
99
- export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-5843ecda.js';
99
+ export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-9e2535da.js';
100
100
  import '../index-fa6eb4ca.js';
101
101
  import 'vue';
102
102
  import '@vue/composition-api/dist/vue-composition-api.mjs';
@@ -120,5 +120,5 @@ import '../dropdown-open-e2a93aaf.js';
120
120
  import '../useOverflow-bae6342f.js';
121
121
  import 'portal-vue/dist/portal-vue.esm.js';
122
122
  import 'portal-vue';
123
- import '../codemirrorView-14f6685c.js';
123
+ import '../codemirrorView-77ce9187.js';
124
124
  import 'node:punycode';
@@ -1,8 +1,8 @@
1
- export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-5843ecda.js';
1
+ export { _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-9e2535da.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';
5
- import '../../codemirrorView-14f6685c.js';
5
+ import '../../codemirrorView-77ce9187.js';
6
6
  import '../../index-780d00b0.js';
7
7
  import 'node:punycode';
8
8
  import '../../index-46cc379c.js';
@@ -4,24 +4,6 @@ import { Node as ProsemirrorNode } from 'prosemirror-model';
4
4
  import { Transaction as CMTransaction } from '@codemirror/state';
5
5
  import { Command, EditorView as CMView } from '@codemirror/view';
6
6
  import { CodeMirrorViewOptions } from './types';
7
- declare module '@tiptap/core' {
8
- interface Commands<ReturnType> {
9
- codeBlock: {
10
- /**
11
- * Set a code block
12
- */
13
- setCodeBlock: (attributes?: {
14
- language: string;
15
- }) => ReturnType;
16
- /**
17
- * Toggle a code block
18
- */
19
- toggleCodeBlock: (attributes?: {
20
- language: string;
21
- }) => ReturnType;
22
- };
23
- }
24
- }
25
7
  declare class CodeMirrorView implements NodeView {
26
8
  name: string;
27
9
  node: ProsemirrorNode;
@@ -1,2 +1,2 @@
1
- export { I as CodeMirrorView } from '../../../../codemirrorView-14f6685c.js';
1
+ export { I as CodeMirrorView } from '../../../../codemirrorView-77ce9187.js';
2
2
  import '../../../../index-780d00b0.js';
@@ -99,7 +99,7 @@ export { _ as OrToastContainerV3, O as OrToastV3, t as TypesV3 } from './types-f
99
99
  export { O as OrTooltip } from './OrTooltip-dfea7af2.js';
100
100
  export { O as OrTooltipContent } from './OrTooltipContent-f0fd5f75.js';
101
101
  export { O as OrTooltipV3 } from './OrTooltip-fbfa05fd.js';
102
- export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-5843ecda.js';
102
+ export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-9e2535da.js';
103
103
  export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e2a93aaf.js';
104
104
  export { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
105
105
  export { u as useElevation } from './useElevation-aac032f4.js';
@@ -120,7 +120,7 @@ import './floating-ui.dom.esm-83eba816.js';
120
120
  import './v4-cf8987a3.js';
121
121
  import 'portal-vue/dist/portal-vue.esm.js';
122
122
  import 'portal-vue';
123
- import './codemirrorView-14f6685c.js';
123
+ import './codemirrorView-77ce9187.js';
124
124
  import 'node:punycode';
125
125
 
126
126
  function styleInject(css, ref) {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue';
2
- import { S as Schema, M as Mark$1, N as NodeSelection, T as TextSelection, a as Selection, b as Slice, d as dropPoint, F as Fragment, D as DOMSerializer, c as DOMParser$1, A as AllSelection, P as Plugin, e as NodeRange, f as findWrapping, R as ReplaceAroundStep, g as canSplit, l as liftTarget, h as canJoin, i as PluginKey, E as EditorState, j as createParagraphNear$1, k as deleteSelection$1, m as exitCode$1, n as joinUp$1, o as joinDown$1, p as joinBackward$1, q as joinForward$1, r as lift$1, s as liftEmptyBlock$1, t as newlineInCode$1, u as selectNodeBackward$1, v as selectNodeForward$1, w as selectParentNode$1, x as selectTextblockEnd$1, y as selectTextblockStart$1, z as Transform, B as setBlockType, C as wrapIn$1, G as ReplaceStep, H as Mapping, I as CodeMirrorView } from './codemirrorView-14f6685c.js';
2
+ import { S as Schema, M as Mark$1, N as NodeSelection, T as TextSelection, a as Selection, b as Slice, d as dropPoint, F as Fragment, D as DOMSerializer, c as DOMParser$1, A as AllSelection, P as Plugin, e as NodeRange, f as findWrapping, R as ReplaceAroundStep, g as canSplit, l as liftTarget, h as canJoin, i as PluginKey, E as EditorState, j as createParagraphNear$1, k as deleteSelection$1, m as exitCode$1, n as joinUp$1, o as joinDown$1, p as joinBackward$1, q as joinForward$1, r as lift$1, s as liftEmptyBlock$1, t as newlineInCode$1, u as selectNodeBackward$1, v as selectNodeForward$1, w as selectParentNode$1, x as selectTextblockEnd$1, y as selectTextblockStart$1, z as Transform, B as setBlockType, C as wrapIn$1, G as ReplaceStep, H as Mapping, I as CodeMirrorView } from './codemirrorView-77ce9187.js';
3
3
  import require$$8 from 'node:punycode';
4
4
  import { c as keyName, d as base } from './index-780d00b0.js';
5
5
  import { w as minimalSetup, g as javascript } from './index-44faad6a.js';
@@ -29510,7 +29510,7 @@ const Placeholder = Extension.create({
29510
29510
  });
29511
29511
 
29512
29512
  var codemirrorNode = Node.create({
29513
- name: 'code_block',
29513
+ name: 'codeBlock',
29514
29514
  content: 'text*',
29515
29515
  marks: '',
29516
29516
  group: 'block',
@@ -29737,12 +29737,10 @@ var script = defineComponent({
29737
29737
  editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
29738
29738
  } else if (item === 'codeBlock') {
29739
29739
  if (!isActive.value['codeBlock']) {
29740
- // isActive.value['codeBlock'] = true;
29741
- editor === null || editor === void 0 ? void 0 : editor.commands.setNode('code_block', {
29740
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
29742
29741
  language: 'javascript'
29743
29742
  });
29744
29743
  } else {
29745
- // isActive.value['codeBlock'] = false;
29746
29744
  editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
29747
29745
  }
29748
29746
  } else if (item === 'heading') {
@@ -29785,11 +29783,7 @@ var script = defineComponent({
29785
29783
  const setActiveFormats = () => {
29786
29784
  const toolbarList = props.toolbar.flat();
29787
29785
  toolbarList.forEach(item => {
29788
- if (item === 'codeBlock') {
29789
- isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive('code_block')) || false;
29790
- } else {
29791
- isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
29792
- }
29786
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
29793
29787
  });
29794
29788
  };
29795
29789
  // Styles
@@ -1,4 +1,4 @@
1
- import { b as EditorState$1, E as EditorView, k as keymap } from './index-780d00b0.js';
1
+ import { b as EditorState$1, E as EditorView, Q as highlightActiveLine, I as highlightActiveLineGutter, H as lineNumbers, k as keymap } from './index-780d00b0.js';
2
2
 
3
3
  // ::- Persistent data structure representing an ordered mapping from
4
4
  // strings to values, with some convenient update methods.
@@ -6998,7 +6998,7 @@ class CodeMirrorView {
6998
6998
  this.dom = this.cm.dom;
6999
6999
  const cmState = EditorState$1.create({
7000
7000
  doc: this.node.textContent,
7001
- extensions: [changeFilter, keymap.of([{
7001
+ extensions: [changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
7002
7002
  key: 'ArrowUp',
7003
7003
  run: this.mayBeEscape('line', -1)
7004
7004
  }, {
@@ -96,7 +96,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-4d43
96
96
  export { s as OrTooltip } from '../OrTooltip.vue_vue_type_script_lang-fa52d391.js';
97
97
  export { s as OrTooltipContent } from '../OrTooltipContent-b0dcb862.js';
98
98
  export { s as OrTooltipV3 } from '../OrTooltip.vue_vue_type_script_lang-67cc86ed.js';
99
- export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-e0dfd695.js';
99
+ export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-1aa9ad53.js';
100
100
  import 'vue';
101
101
  import 'lodash';
102
102
  import '../OrIcon-1cae8a64.js';
@@ -137,5 +137,5 @@ import '../useResponsive-9d397e2a.js';
137
137
  import '../useElevation-c8d5d3ba.js';
138
138
  import '../dropdown-open-293d2de2.js';
139
139
  import '../useOverflow-6dce216b.js';
140
- import '../codemirrorView-14f6685c.js';
140
+ import '../codemirrorView-77ce9187.js';
141
141
  import 'node:punycode';
@@ -1,6 +1,6 @@
1
- export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-e0dfd695.js';
1
+ export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-1aa9ad53.js';
2
2
  import 'vue';
3
- import '../../codemirrorView-14f6685c.js';
3
+ import '../../codemirrorView-77ce9187.js';
4
4
  import '../../index-780d00b0.js';
5
5
  import 'node:punycode';
6
6
  import '../../index-44faad6a.js';
@@ -4,24 +4,6 @@ import { Node as ProsemirrorNode } from 'prosemirror-model';
4
4
  import { Transaction as CMTransaction } from '@codemirror/state';
5
5
  import { Command, EditorView as CMView } from '@codemirror/view';
6
6
  import { CodeMirrorViewOptions } from './types';
7
- declare module '@tiptap/core' {
8
- interface Commands<ReturnType> {
9
- codeBlock: {
10
- /**
11
- * Set a code block
12
- */
13
- setCodeBlock: (attributes?: {
14
- language: string;
15
- }) => ReturnType;
16
- /**
17
- * Toggle a code block
18
- */
19
- toggleCodeBlock: (attributes?: {
20
- language: string;
21
- }) => ReturnType;
22
- };
23
- }
24
- }
25
7
  declare class CodeMirrorView implements NodeView {
26
8
  name: string;
27
9
  node: ProsemirrorNode;
@@ -1,2 +1,2 @@
1
- export { I as CodeMirrorView } from '../../../../codemirrorView-14f6685c.js';
1
+ export { I as CodeMirrorView } from '../../../../codemirrorView-77ce9187.js';
2
2
  import '../../../../index-780d00b0.js';