vdc-editor 0.1.24 → 0.1.26

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.
@@ -1,5 +1,5 @@
1
1
  import { Editor } from '@tiptap/vue-3';
2
- import { EditorMode } from '../type';
2
+ import { EditorMode } from '../constants';
3
3
 
4
4
  interface Props {
5
5
  editor: Editor | null;
@@ -3,17 +3,11 @@ interface Props {
3
3
  pageNumber: number;
4
4
  superTextStore?: any;
5
5
  }
6
- declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
7
- pageId: string;
8
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
7
  updateWidth: (...args: any[]) => void;
10
- }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
11
- pageId: string;
12
- }>>> & Readonly<{
8
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
13
9
  onUpdateWidth?: ((...args: any[]) => any) | undefined;
14
- }>, {
15
- pageId: string;
16
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
11
  export default _default;
18
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
13
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -24,11 +18,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
24
18
  required: true;
25
19
  };
26
20
  };
27
- type __VLS_WithDefaults<P, D> = {
28
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
29
- default: D[K];
30
- }> : P[K];
31
- };
32
- type __VLS_Prettify<T> = {
33
- [K in keyof T]: T[K];
34
- } & {};
@@ -1,4 +1,4 @@
1
- import { EditorMode } from '../type';
1
+ import { EditorMode } from '../constants';
2
2
  import { Editor } from '@tiptap/core';
3
3
 
4
4
  interface Props {
@@ -1,4 +1,5 @@
1
- import { EditorProps, EditorMode } from '../../type';
1
+ import { EditorProps } from '../../type';
2
+ import { EditorMode } from '../../constants';
2
3
 
3
4
  interface Props extends EditorProps {
4
5
  mode: EditorMode.REPORT | EditorMode.STRAIGHT;
@@ -49,6 +49,11 @@ export declare const HOTKEYS: {
49
49
  SAVE: string;
50
50
  TAB: string;
51
51
  };
52
+ export declare enum EditorMode {
53
+ EDITOR = "editor",
54
+ STRAIGHT = "straight",
55
+ REPORT = "report"
56
+ }
52
57
  export declare const fontFamilies: {
53
58
  label: string;
54
59
  value: string;
@@ -1,4 +1,9 @@
1
+ export declare enum SuperTextStatus {
2
+ RENDERED = 1,
3
+ NOT_RENDERED = 0
4
+ }
1
5
  export declare function useConfigTiptap(): {
2
6
  defaultExtensions: globalThis.ComputedRef<(import('@tiptap/core').Extension<import('../extensions').BaseKitOptions, any> | import('@tiptap/core').Node<import('../extensions').ClearOptions, any> | import('@tiptap/core').Mark<import('../extensions').LinkOptions, any> | import('@tiptap/core').Extension<import('../extensions').HistoryOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-image').ImageOptions, any> | import('@tiptap/core').Node<import('../extensions').TableOptions, any> | import('@tiptap/core').Extension<import('../extensions').FormatPainterOptions, any> | import('@tiptap/core').Node<import('../extensions').ColumnsOptions, any>)[]>;
3
7
  content: globalThis.Ref<string, string>;
8
+ dispatchUpdateStatusSuperText: (nodeId: string, status: SuperTextStatus) => void;
4
9
  };
package/lib/src/type.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Editor as CoreEditor, Extension, JSONContent, AnyExtension } from '@tip
2
2
  import { Editor, EditorOptions } from '@tiptap/vue-3';
3
3
  import { icons } from './components/icons';
4
4
  import { SplitContext } from './extensions/Page/computed';
5
+ import { EditorMode } from './constants';
5
6
 
6
7
  export type { Editor, JSONContent } from '@tiptap/core';
7
8
  /**
@@ -146,11 +147,6 @@ export interface PageOption {
146
147
  export interface Config {
147
148
  sidebar: boolean;
148
149
  }
149
- export declare enum EditorMode {
150
- EDITOR = "editor",
151
- STRAIGHT = "straight",
152
- REPORT = "report"
153
- }
154
150
  export interface ITextWithPosition {
155
151
  startIndex: number;
156
152
  length: number;
@@ -1,4 +1,9 @@
1
1
  export declare enum EventKey {
2
2
  TOGGLE_SUPER_TEXT = "toggle-super-text",
3
- SUPER_TEXT_UPDATE_POSITION = "SUPER_TEXT_UPDATE_POSITION"
3
+ SUPER_TEXT_UPDATE_POSITION = "SUPER_TEXT_UPDATE_POSITION",
4
+ RENDER_SUPER_TEXT = "RENDER_SUPER_TEXT"
4
5
  }
6
+ export type EventBusAction<T> = {
7
+ action: 'render' | 'hover' | 'remove' | 'status';
8
+ payload: T;
9
+ };
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .umo-page-node-view[data-v-729728a4]{box-sizing:border-box;background-color:var(--umo-page-ed-background);overflow:hidden}.umo-page-node-view[data-v-729728a4]:not(:first-child){margin-top:15px}.umo-page-node-view[data-v-729728a4]:not(:last-child){margin-bottom:15px}@media print{.umo-page-node-view[data-v-729728a4]{position:relative;margin:0!important;overflow:hidden}}.umo-page-node-view .umo-page-node-view-handler[data-v-729728a4]{position:absolute;width:100%;height:20px;cursor:row-resize;margin-top:-20px;z-index:5}@media print{.umo-page-node-view .umo-page-node-view-handler[data-v-729728a4]{display:none}}.umo-page-node-view .umo-page-watermark[data-v-729728a4]{position:unset!important;width:var(--umo-page-width);height:var(--umo-page-height);display:flex;flex-direction:column}.umo-page-node-view .umo-page-node-content[data-v-729728a4]{flex:1;box-sizing:border-box;padding:var(--umo-page-margin-top) var(--umo-page-margin-right) var(--umo-page-margin-bottom) var(--umo-page-margin-right)}.tiptap .vue-component{background-color:var(--purple-light);border:2px solid var(--purple);border-radius:.5rem;margin:2rem 0;position:relative}.tiptap .vue-component label{background-color:var(--purple);border-radius:0 0 .5rem;color:var(--white);font-size:.75rem;font-weight:700;padding:.25rem .5rem;position:absolute;top:0}.tiptap .vue-component .content{margin-top:1.5rem;padding:1rem}.image-view[data-v-849d7462]{max-width:100%}.image-view__body[data-v-849d7462]{position:relative;display:inline-block;max-width:100%;outline:transparent solid 2px;transition:all .2s ease-in}.image-view__body--focused[data-v-849d7462]{outline-color:hsl(var(--ed-primary))}.image-view__body__image[data-v-849d7462]{margin:0;cursor:pointer!important}.image-resizer[data-v-849d7462]{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;border-width:1px;border-color:hsl(var(--ed-border))}.image-resizer__handler[data-v-849d7462]{position:absolute;z-index:2;box-sizing:border-box;display:block;width:12px;height:12px;border:1px solid #fff;border-radius:2px;background-color:hsl(var(--ed-primary))}.image-resizer__handler--tl[data-v-849d7462]{top:-6px;left:-6px;cursor:nw-resize}.image-resizer__handler--tr[data-v-849d7462]{top:-6px;right:-6px;cursor:ne-resize}.image-resizer__handler--bl[data-v-849d7462]{bottom:-6px;left:-6px;cursor:sw-resize}.image-resizer__handler--br[data-v-849d7462]{right:-6px;bottom:-6px;cursor:se-resize}
1
+ .umo-page-node-view[data-v-d6455d4b]{box-sizing:border-box;background-color:var(--umo-page-ed-background);overflow:hidden}.umo-page-node-view[data-v-d6455d4b]:not(:first-child){margin-top:15px}.umo-page-node-view[data-v-d6455d4b]:not(:last-child){margin-bottom:15px}@media print{.umo-page-node-view[data-v-d6455d4b]{position:relative;margin:0!important;overflow:hidden}}.umo-page-node-view .umo-page-node-view-handler[data-v-d6455d4b]{position:absolute;width:100%;height:20px;cursor:row-resize;margin-top:-20px;z-index:5}@media print{.umo-page-node-view .umo-page-node-view-handler[data-v-d6455d4b]{display:none}}.umo-page-node-view .umo-page-watermark[data-v-d6455d4b]{position:unset!important;width:var(--umo-page-width);height:var(--umo-page-height);display:flex;flex-direction:column}.umo-page-node-view .umo-page-node-content[data-v-d6455d4b]{flex:1;box-sizing:border-box;padding:var(--umo-page-margin-top) var(--umo-page-margin-right) var(--umo-page-margin-bottom) var(--umo-page-margin-right)}.tiptap .vue-component{background-color:var(--purple-light);border:2px solid var(--purple);border-radius:.5rem;margin:2rem 0;position:relative}.tiptap .vue-component label{background-color:var(--purple);border-radius:0 0 .5rem;color:var(--white);font-size:.75rem;font-weight:700;padding:.25rem .5rem;position:absolute;top:0}.tiptap .vue-component .content{margin-top:1.5rem;padding:1rem}.image-view[data-v-849d7462]{max-width:100%}.image-view__body[data-v-849d7462]{position:relative;display:inline-block;max-width:100%;outline:transparent solid 2px;transition:all .2s ease-in}.image-view__body--focused[data-v-849d7462]{outline-color:hsl(var(--ed-primary))}.image-view__body__image[data-v-849d7462]{margin:0;cursor:pointer!important}.image-resizer[data-v-849d7462]{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;border-width:1px;border-color:hsl(var(--ed-border))}.image-resizer__handler[data-v-849d7462]{position:absolute;z-index:2;box-sizing:border-box;display:block;width:12px;height:12px;border:1px solid #fff;border-radius:2px;background-color:hsl(var(--ed-primary))}.image-resizer__handler--tl[data-v-849d7462]{top:-6px;left:-6px;cursor:nw-resize}.image-resizer__handler--tr[data-v-849d7462]{top:-6px;right:-6px;cursor:ne-resize}.image-resizer__handler--bl[data-v-849d7462]{bottom:-6px;left:-6px;cursor:sw-resize}.image-resizer__handler--br[data-v-849d7462]{right:-6px;bottom:-6px;cursor:se-resize}