Skip to content

Commit

Permalink
Merge pull request #599 from digabi/fix/dir-structure
Browse files Browse the repository at this point in the history
Fix/dir structure
  • Loading branch information
heeboA authored Oct 23, 2024
2 parents 6addd21 + 7803286 commit 3ffa7b2
Show file tree
Hide file tree
Showing 36 changed files with 169 additions and 349 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,3 @@ dist/
/playwright-report/
/blob-report/
/playwright/.cache/

## Parcel
.parcel-cache
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
10 changes: 0 additions & 10 deletions .parcelrc

This file was deleted.

464 changes: 151 additions & 313 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "8.0.2",
"description": "Rich text editor",
"homepage": "https://github.com/digabi/rich-text-editor",
"types": "dist/react/index.d.ts",
"main": "dist/react/index.js",
"types": "dist/app/index.d.ts",
"main": "dist/app/index.js",
"files": [
"dist/*",
"server/*"
Expand All @@ -27,11 +27,11 @@
"url": "https://github.com/digabi/rich-text-editor.git"
},
"devDependencies": {
"@digabi/eslint-config": "^3.2.0",
"@playwright/experimental-ct-react": "^1.47.2",
"@types/node": "^22.7.4",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@digabi/eslint-config": "^3.3.0",
"@playwright/experimental-ct-react": "^1.48.1",
"@types/node": "^22.7.9",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"buffer": "^6.0.3",
Expand All @@ -42,20 +42,20 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^7.1.0",
"express": "^4.21.0",
"express": "^4.21.1",
"prettier": "^3.3.3",
"process": "^0.11.10",
"sanitize-html": "^2.13.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tslib": "^2.7.0",
"typescript": "^5.6.2"
"tslib": "^2.8.0",
"typescript": "^5.6.3"
},
"dependencies": {
"@digabi/mathquill": "^0.10.12",
"@playwright/test": "^1.47.2",
"@playwright/test": "^1.48.1",
"@types/express": "^4.17.21",
"@types/jquery": "^3.5.31",
"@types/jquery": "^3.5.32",
"@types/sanitize-html": "^2.13.0",
"classnames": "^2.5.1",
"jquery": "^3.7.1",
Expand Down
4 changes: 2 additions & 2 deletions playwright/editor.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import {
selectAll,
copy,
} from './test-utils'
import RichTextEditor from '../src/react'
import { Answer, nbsp } from '../src/react/utility'
import RichTextEditor from '../src/app'
import { Answer, nbsp } from '../src/app/utility'
import fi from '../src/FI'

test.describe('Rich text editor', () => {
Expand Down
2 changes: 1 addition & 1 deletion playwright/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, Page, Locator } from '@playwright/test'
import { Answer } from '../src/react/utility'
import { Answer } from '../src/app/utility'

export const assertEditorTextContent = async (editor: Locator, content: string) => {
expect(await editor.textContent()).toBe(content)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { sanitize } from '../../utils/sanitization'
import { isAddMutation, isBr, isRemoveMutation, isTextNode, nbsp } from '../../utility'
import { useKeyboardEventListener } from '../../hooks/use-keyboard-events'
import useMutationObserver from '../../hooks/use-mutation-observer'
import { MATH_EDITOR_CLASS } from '../../../react/utils/create-math-stub'
import { MATH_EDITOR_CLASS } from '../../utils/create-math-stub'

export type TextAreaProps = {
ariaInvalid?: boolean
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/react/state/index.tsx → src/app/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import useHistory from './history'
import useMap, { MapHookHandle } from '../hooks/use-map'
import useMutationObserver from '../hooks/use-mutation-observer'

import { RichTextEditorProps } from '../../react'

import MathEditor, { MathEditorHandle, Props as MathEditorProps } from '../components/math-editor'
import { createMathStub, MATH_EDITOR_CLASS } from '../utils/create-math-stub'

import FI from '../../FI'
import SV from '../../SV'
import { createPortal } from 'react-dom'
import { getAnswer, nbsp } from '../utility'
import { RichTextEditorProps } from '../index'

const findWrapperParent = (currentElement: Element): Element | null => {
if (currentElement?.classList?.contains(MATH_EDITOR_CLASS)) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/rich-text-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ReactDOM from 'react-dom/client'
import RichTextEditor, { RichTextEditorProps } from './react'
import RichTextEditor, { RichTextEditorProps } from './app'

export type MakeRichTextProps = { container: HTMLElement } & RichTextEditorProps

Expand Down

0 comments on commit 3ffa7b2

Please sign in to comment.