Refactoring

This commit is contained in:
Rainer Simon 2020-04-04 10:45:53 +02:00
parent f155c5751d
commit 08eff5a714
26 changed files with 23 additions and 11 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
dist
node_modules node_modules

View File

@ -1,8 +1,8 @@
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import setPosition from './setPosition'; import setPosition from './setPosition';
import TagWidget from './widgets/tags/TagWidget'; import TagWidget from './widgets/tag/TagWidget';
import TypeSelectorWidget from './widgets/type/TypeSelectorWidget'; import TypeSelectorWidget from './widgets/type/TypeSelectorWidget';
import CommentWidget from './widgets/comments/CommentWidget'; import CommentWidget from './widgets/comment/CommentWidget';
/** /**
* The popup editor component. * The popup editor component.

View File

@ -1,7 +1,11 @@
import Editor from './Editor'; import Editor from './Editor';
export { default as CommentWidget } from './widgets/comment/CommentWidget'; import CommentWidget from './widgets/comment/CommentWidget';
export { default as TagWidget } from './widgets/tag/TagWidget'; import TagWidget from './widgets/tag/TagWidget';
export { default as TagSelectorWidget } from './widgets/type/TypeSelectorWidget'; import TypeSelectorWidget from './widgets/type/TypeSelectorWidget';
export default Editor; Editor.CommentWidget = CommentWidget;
Editor.TagWidget = TagWidget;
Editor.TypeSelectorWidget = TypeSelectorWidget;
export { Editor };

View File

@ -1,4 +1,4 @@
import WebAnnotation from '../annotation/WebAnnotation'; import WebAnnotation from '../WebAnnotation';
const TEXT = 3; // HTML DOM node type for text nodes const TEXT = 3; // HTML DOM node type for text nodes

View File

@ -1,2 +1,7 @@
export { default as WebAnnotation } from './WebAnnotation'; export { default as WebAnnotation } from './WebAnnotation';
export { default as Selection } from './Selection';
export * from './editor';
export * from './highlighter';
export * from './relations';
export * from './selection';
export * from './utils';

View File

@ -1,8 +1,8 @@
import EventEmitter from 'tiny-emitter';
import Connection from '../Connection'; import Connection from '../Connection';
import HoverEmphasis from './HoverEmphasis'; import HoverEmphasis from './HoverEmphasis';
import { getNodeForEvent } from '../RelationUtils'; import { getNodeForEvent } from '../RelationUtils';
import EventEmitter from 'tiny-emitter'; import WebAnnotation from '../../WebAnnotation';
import { WebAnnotation } from 'recogito-client-common';
/** /**
* Wraps an event handler for event delegation. This way, we * Wraps an event handler for event delegation. This way, we

View File

@ -1,4 +1,4 @@
import WebAnnotation from './WebAnnotation'; import WebAnnotation from '../WebAnnotation';
import uuid from 'uuid/v1'; import uuid from 'uuid/v1';
/** /**

View File

@ -1 +1,2 @@
export { default as Selection } from './Selection';
export { default as SelectionHandler } from './SelectionHandler'; export { default as SelectionHandler } from './SelectionHandler';

1
themes/default/index.js Normal file
View File

@ -0,0 +1 @@
import './theme.scss';