Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): Setup vitest and write tests for helpers #12

Merged
merged 26 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Utils tests

on:
push:
branches:
- 'main'
tags:
- 'v*'

pull_request:
types: [opened, synchronize, reopened]

jobs:
tests:
runs-on: ubuntu-22.04
permissions:
# Required to checkout the code
contents: read
strategy:
# If set to true, Github will cancel all other jobs if one of the jobs fails
fail-fast: false

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 22.1.0

- name: Install dependencies
run: yarn install

- name: Build utils
run: yarn build

- name: Run tests
run: yarn test
Binary file modified .yarn/install-state.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Utils useful for Editor.js tools development

## Packages
- Caret
- Dom
- Helpers
- Keyboard
- [Caret](https://github.com/editor-js/utils/tree/main/packages/caret)
- [Dom](https://github.com/editor-js/utils/tree/main/packages/dom)
- [Helpers](https://github.com/editor-js/utils/tree/main/packages/helpers)
- [Keyboard](https://github.com/editor-js/utils/tree/main/packages/keyboard)

You can use them via installing from npm:

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default [
rules: {
'n/no-missing-import': ['off'],
'n/no-extraneous-import': ['error', {
allowModules: ['nanoid'],
allowModules: ['nanoid', '@editorjs/caret', '@editorjs/dom', '@editorjs/helpers', '@editorjs/keyboard', 'vitest'],
}],
'n/no-unpublished-import': ['off'],
'n/no-unsupported-features/node-builtins': ['error', {
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:dom": "cd packages/dom && yarn build",
"build:caret": "cd packages/caret && yarn build",
"build:keyboard": "cd packages/keyboard && yarn build",
"test": "vitest run",
"lint": "eslint",
"lint:fix": "yarn lint --fix",
"generate-docs": "ts-node scripts/generateReadme.ts"
Expand All @@ -34,7 +35,9 @@
"fs-extra": "^11.2.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.9.0"
"typescript-eslint": "^7.9.0",
"vitest": "1.4.0"
},
"packageManager": "yarn@4.4.0"
"packageManager": "yarn@4.4.0",
"dependencies": {}
}
16 changes: 8 additions & 8 deletions packages/caret/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Utils useful for work with caret for Editor.js tools development
npm install @editorjs/caret
```
### Function list
- [checkContenteditableSliceForEmptiness](https://github.com/editor-js/utils/blob/main/packages/caret/src/checkContenteditableSliceForEmptiness.ts) - Checks content at left or right of the passed node for emptiness.
- [focus](https://github.com/editor-js/utils/blob/main/packages/caret/src/focus.ts) - Set focus to contenteditable or native input element
- [getCaretNodeAndOffset](https://github.com/editor-js/utils/blob/main/packages/caret/src/getCaretNodeAndOffset.ts) - Returns TextNode containing a caret and a caret offset in it
- [getContenteditableSlice](https://github.com/editor-js/utils/blob/main/packages/caret/src/getContenteditableSlice.ts) - Returns slice of the contenteditable html element from caret position to the start or end (depending on direction)
- [getRange](https://github.com/editor-js/utils/blob/main/packages/caret/src/getRange.ts) - Returns the first range
- [isCaretAtEndOfInput](https://github.com/editor-js/utils/blob/main/packages/caret/src/isCaretAtEndOfInput.ts) - Checks if caret is at the end of the passed input
- [isCaretAtStartOfInput](https://github.com/editor-js/utils/blob/main/packages/caret/src/isCaretAtStartOfInput.ts) - Checks if caret is at the start of the passed input
- [save](https://github.com/editor-js/utils/blob/main/packages/caret/src/save.ts) - Saves caret position using hidden <span>
- [checkContenteditableSliceForEmptiness](https://github.com/editor-js/utils/blob/main/packages/caret/src/checkContenteditableSliceForEmptiness/checkContenteditableSliceForEmptiness.ts) - Checks content at left or right of the passed node for emptiness.
- [focus](https://github.com/editor-js/utils/blob/main/packages/caret/src/focus/focus.ts) - Set focus to contenteditable or native input element
- [getCaretNodeAndOffset](https://github.com/editor-js/utils/blob/main/packages/caret/src/getCaretNodeAndOffset/getCaretNodeAndOffset.ts) - Returns TextNode containing a caret and a caret offset in it
- [getContenteditableSlice](https://github.com/editor-js/utils/blob/main/packages/caret/src/getContenteditableSlice/getContenteditableSlice.ts) - Returns slice of the contenteditable html element from caret position to the start or end (depending on direction)
- [getRange](https://github.com/editor-js/utils/blob/main/packages/caret/src/getRange/getRange.ts) - Returns the first range
- [isCaretAtEndOfInput](https://github.com/editor-js/utils/blob/main/packages/caret/src/isCaretAtEndOfInput/isCaretAtEndOfInput.ts) - Checks if caret is at the end of the passed input
- [isCaretAtStartOfInput](https://github.com/editor-js/utils/blob/main/packages/caret/src/isCaretAtStartOfInput/isCaretAtStartOfInput.ts) - Checks if caret is at the start of the passed input
- [save](https://github.com/editor-js/utils/blob/main/packages/caret/src/save/save.ts) - Saves caret position using hidden <span>
# About CodeX
<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isCollapsedWhitespaces } from '@editorjs/dom';
import { getContenteditableSlice } from './getContenteditableSlice';
import { getContenteditableSlice } from '../getContenteditableSlice/getContenteditableSlice';

/**
* Checks content at left or right of the passed node for emptiness.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { checkContenteditableSliceForEmptiness } from './checkContenteditableSliceForEmptiness';

export { checkContenteditableSliceForEmptiness };
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/caret/src/focus/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { focus } from './focus';

export { focus };
3 changes: 3 additions & 0 deletions packages/caret/src/getCaretNodeAndOffset/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getCaretNodeAndOffset } from './getCaretNodeAndOffset';

export { getCaretNodeAndOffset };
3 changes: 3 additions & 0 deletions packages/caret/src/getContenteditableSlice/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getContenteditableSlice } from './getContenteditableSlice';

export { getContenteditableSlice };
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/caret/src/getRange/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getRange } from './getRange';

export { getRange };
3 changes: 3 additions & 0 deletions packages/caret/src/isCaretAtEndOfInput/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isCaretAtEndOfInput } from './isCaretAtEndOfInput';

export { isCaretAtEndOfInput };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getDeepestNode, isNativeInput } from '@editorjs/dom';
import { getCaretNodeAndOffset } from './getCaretNodeAndOffset';
import { checkContenteditableSliceForEmptiness } from './checkContenteditableSliceForEmptiness';
import { getCaretNodeAndOffset } from '../getCaretNodeAndOffset';
import { checkContenteditableSliceForEmptiness } from '../checkContenteditableSliceForEmptiness';

/**
* Checks if caret is at the end of the passed input
Expand Down
3 changes: 3 additions & 0 deletions packages/caret/src/isCaretAtStartOfInput/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isCaretAtStartOfInput } from './isCaretAtStartOfInput';

export { isCaretAtStartOfInput };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getDeepestNode, isEmpty, isNativeInput } from '@editorjs/dom';
import { getCaretNodeAndOffset } from './getCaretNodeAndOffset';
import { checkContenteditableSliceForEmptiness } from './checkContenteditableSliceForEmptiness';
import { getCaretNodeAndOffset } from '../getCaretNodeAndOffset/getCaretNodeAndOffset';
import { checkContenteditableSliceForEmptiness } from '../checkContenteditableSliceForEmptiness/checkContenteditableSliceForEmptiness';

/**
* Checks if caret is at the start of the passed input
Expand Down
3 changes: 3 additions & 0 deletions packages/caret/src/save/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { save } from './save';

export { save };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { make } from '@editorjs/dom';
import { getRange } from './getRange';
import { getRange } from '../getRange/getRange';

/**
* Saves caret position using hidden <span>
Expand Down
50 changes: 25 additions & 25 deletions packages/dom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ Utils useful for work with dom for Editor.js tools development
npm install @editorjs/dom
```
### Function list
- [allInputsSelector](https://github.com/editor-js/utils/blob/main/packages/dom/src/allInputsSelector.ts) - Returns CSS selector for all text inputs
- [append](https://github.com/editor-js/utils/blob/main/packages/dom/src/append.ts) - Append one or several elements to the parent
- [blockElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/blockElements.ts) - Return array of names of block html elements
- [calculateBaseline](https://github.com/editor-js/utils/blob/main/packages/dom/src/calculateBaseline.ts) - Calculates the Y coordinate of the text baseline from the top of the element's margin box,
- [canSetCaret](https://github.com/editor-js/utils/blob/main/packages/dom/src/canSetCaret.ts) - Checks if we can set caret
- [containsOnlyInlineElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/containsOnlyInlineElements.ts) - Check if passed content includes only inline elements
- [findAllInputs](https://github.com/editor-js/utils/blob/main/packages/dom/src/findAllInputs.ts) - Find all contenteditable, textarea and editable input elements passed holder contains
- [fragmentToString](https://github.com/editor-js/utils/blob/main/packages/dom/src/fragmentToString.ts) - Returns the HTML content of passed Document Fragment
- [getContentLength](https://github.com/editor-js/utils/blob/main/packages/dom/src/getContentLength.ts) - Return length of node`s text content
- [getDeepestBlockElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/getDeepestBlockElements.ts) - Find and return all block elements in the passed parent (including subtree)
- [getDeepestNode](https://github.com/editor-js/utils/blob/main/packages/dom/src/getDeepestNode.ts) - Search for deepest node which is Leaf.
- [isCollapsedWhitespaces](https://github.com/editor-js/utils/blob/main/packages/dom/src/isCollapsedWhitespaces.ts) - Determine whether a passed text content is a collapsed whitespace.
- [isContentEditable](https://github.com/editor-js/utils/blob/main/packages/dom/src/isContentEditable.ts) - Check if passed element is contenteditable
- [isElement](https://github.com/editor-js/utils/blob/main/packages/dom/src/isElement.ts) - Check if object is DOM node
- [isEmpty](https://github.com/editor-js/utils/blob/main/packages/dom/src/isEmpty.ts) - breadth-first search (BFS)
- [isFragment](https://github.com/editor-js/utils/blob/main/packages/dom/src/isFragment.ts) - Check if object is DocumentFragment node
- [isHTMLString](https://github.com/editor-js/utils/blob/main/packages/dom/src/isHtmlString.ts) - Check if string contains html elements
- [isLeaf](https://github.com/editor-js/utils/blob/main/packages/dom/src/isLeaf.ts) - checks node if it is doesn't have any child nodes
- [isLineBreakTag](https://github.com/editor-js/utils/blob/main/packages/dom/src/isLineBreakTag.ts) - Check if element is BR or WBR
- [isNativeInput](https://github.com/editor-js/utils/blob/main/packages/dom/src/isNativeInput.ts) - Checks target if it is native input
- [isNodeEmpty](https://github.com/editor-js/utils/blob/main/packages/dom/src/isNodeEmpty.ts) - Checks node if it is empty
- [isSingleTag](https://github.com/editor-js/utils/blob/main/packages/dom/src/isSingleTag.ts) - Check if passed tag has no closed tag
- [make](https://github.com/editor-js/utils/blob/main/packages/dom/src/make.ts) - Helper for making Elements with class name and attributes
- [offset](https://github.com/editor-js/utils/blob/main/packages/dom/src/offset.ts) - Return element's offset related to the document
- [prepend](https://github.com/editor-js/utils/blob/main/packages/dom/src/prepend.ts) - Append element or a couple to the beginning of the parent elements
- [allInputsSelector](https://github.com/editor-js/utils/blob/main/packages/dom/src/allInputsSelector/allInputsSelector.ts) - Returns CSS selector for all text inputs
- [append](https://github.com/editor-js/utils/blob/main/packages/dom/src/append/append.ts) - Append one or several elements to the parent
- [blockElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/blockElements/blockElements.ts) - Return array of names of block html elements
- [calculateBaseline](https://github.com/editor-js/utils/blob/main/packages/dom/src/calculateBaseline/calculateBaseline.ts) - Calculates the Y coordinate of the text baseline from the top of the element's margin box,
- [canSetCaret](https://github.com/editor-js/utils/blob/main/packages/dom/src/canSetCaret/canSetCaret.ts) - Checks if we can set caret
- [containsOnlyInlineElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/containsOnlyInlineElements/containsOnlyInlineElements.ts) - Check if passed content includes only inline elements
- [findAllInputs](https://github.com/editor-js/utils/blob/main/packages/dom/src/findAllInputs/findAllInputs.ts) - Find all contenteditable, textarea and editable input elements passed holder contains
- [fragmentToString](https://github.com/editor-js/utils/blob/main/packages/dom/src/fragmentToString/fragmentToString.ts) - Returns the HTML content of passed Document Fragment
- [getContentLength](https://github.com/editor-js/utils/blob/main/packages/dom/src/getContentLength/getContentLength.ts) - Return length of node`s text content
- [getDeepestBlockElements](https://github.com/editor-js/utils/blob/main/packages/dom/src/getDeepestBlockElements/getDeepestBlockElements.ts) - Find and return all block elements in the passed parent (including subtree)
- [getDeepestNode](https://github.com/editor-js/utils/blob/main/packages/dom/src/getDeepestNode/getDeepestNode.ts) - Search for deepest node which is Leaf.
- [isCollapsedWhitespaces](https://github.com/editor-js/utils/blob/main/packages/dom/src/isCollapsedWhitespaces/isCollapsedWhitespaces.ts) - Determine whether a passed text content is a collapsed whitespace.
- [isContentEditable](https://github.com/editor-js/utils/blob/main/packages/dom/src/isContentEditable/isContentEditable.ts) - Check if passed element is contenteditable
- [isElement](https://github.com/editor-js/utils/blob/main/packages/dom/src/isElement/isElement.ts) - Check if object is DOM node
- [isEmpty](https://github.com/editor-js/utils/blob/main/packages/dom/src/isEmpty/isEmpty.ts) - breadth-first search (BFS)
- [isFragment](https://github.com/editor-js/utils/blob/main/packages/dom/src/isFragment/isFragment.ts) - Check if object is DocumentFragment node
- [isHTMLString](https://github.com/editor-js/utils/blob/main/packages/dom/src/isHtmlString/isHtmlString.ts) - Check if string contains html elements
- [isLeaf](https://github.com/editor-js/utils/blob/main/packages/dom/src/isLeaf/isLeaf.ts) - checks node if it is doesn't have any child nodes
- [isLineBreakTag](https://github.com/editor-js/utils/blob/main/packages/dom/src/isLineBreakTag/isLineBreakTag.ts) - Check if element is BR or WBR
- [isNativeInput](https://github.com/editor-js/utils/blob/main/packages/dom/src/isNativeInput/isNativeInput.ts) - Checks target if it is native input
- [isNodeEmpty](https://github.com/editor-js/utils/blob/main/packages/dom/src/isNodeEmpty/isNodeEmpty.ts) - Checks node if it is empty
- [isSingleTag](https://github.com/editor-js/utils/blob/main/packages/dom/src/isSingleTag/isSingleTag.ts) - Check if passed tag has no closed tag
- [make](https://github.com/editor-js/utils/blob/main/packages/dom/src/make/make.ts) - Helper for making Elements with class name and attributes
- [offset](https://github.com/editor-js/utils/blob/main/packages/dom/src/offset/offset.ts) - Return element's offset related to the document
- [prepend](https://github.com/editor-js/utils/blob/main/packages/dom/src/prepend/prepend.ts) - Append element or a couple to the beginning of the parent elements
# About CodeX
<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50">

Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/allInputsSelector/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { allInputsSelector } from './allInputsSelector';

export { allInputsSelector };
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/dom/src/append/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { append } from './append';

export { append };
3 changes: 3 additions & 0 deletions packages/dom/src/blockElements/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { blockElements } from './blockElements';

export { blockElements };
3 changes: 3 additions & 0 deletions packages/dom/src/calculateBaseline/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { calculateBaseline } from './calculateBaseline';

export { calculateBaseline };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isNativeInput } from './isNativeInput';
import { isContentEditable } from './isContentEditable';
import { isNativeInput } from '../isNativeInput';
import { isContentEditable } from '../isContentEditable';

/**
* Checks if we can set caret
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/canSetCaret/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { canSetCaret } from './canSetCaret';

export { canSetCaret };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isString } from '@editorjs/helpers';
import { blockElements } from './blockElements';
import { blockElements } from '../blockElements';

/**
* Check if passed content includes only inline elements
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/containsOnlyInlineElements/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { containsOnlyInlineElements } from './containsOnlyInlineElements';

export { containsOnlyInlineElements };
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { containsOnlyInlineElements } from './containsOnlyInlineElements';
import { getDeepestBlockElements } from './getDeepestBlockElements';
import { allInputsSelector } from './allInputsSelector';
import { isNativeInput } from './isNativeInput';
import { containsOnlyInlineElements } from '../containsOnlyInlineElements';
import { getDeepestBlockElements } from '../getDeepestBlockElements';
import { allInputsSelector } from '../allInputsSelector';
import { isNativeInput } from '../isNativeInput';

/**
* Find all contenteditable, textarea and editable input elements passed holder contains
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/findAllInputs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { findAllInputs } from './findAllInputs';

export { findAllInputs };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { make } from './make';
import { make } from '../make';

/**
* Returns the HTML content of passed Document Fragment
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/fragmentToString/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { fragmentToString } from './fragmentToString';

export { fragmentToString };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isNativeInput } from './isNativeInput';
import { isNativeInput } from '../isNativeInput';

/**
* Return length of node`s text content
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/getContentLength/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getContentLength } from './getContentLength';

export { getContentLength };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { containsOnlyInlineElements } from './containsOnlyInlineElements';
import { containsOnlyInlineElements } from '../containsOnlyInlineElements';

/**
* Find and return all block elements in the passed parent (including subtree)
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/getDeepestBlockElements/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getDeepestBlockElements } from './getDeepestBlockElements';

export { getDeepestBlockElements };
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isNativeInput } from './isNativeInput';
import { isLineBreakTag } from './isLineBreakTag';
import { isSingleTag } from './isSingleTag';
import { isNativeInput } from '../isNativeInput';
import { isLineBreakTag } from '../isLineBreakTag';
import { isSingleTag } from '../isSingleTag';

/**
* Search for deepest node which is Leaf.
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/getDeepestNode/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { getDeepestNode } from './getDeepestNode';

export { getDeepestNode };
3 changes: 3 additions & 0 deletions packages/dom/src/isCollapsedWhitespaces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isCollapsedWhitespaces } from './isCollapsedWhitespaces';

export { isCollapsedWhitespaces };
3 changes: 3 additions & 0 deletions packages/dom/src/isContentEditable/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isContentEditable } from './isContentEditable';

export { isContentEditable };
3 changes: 3 additions & 0 deletions packages/dom/src/isElement/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isElement } from './isElement';

export { isElement };
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/dom/src/isEmpty/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isEmpty } from './isEmpty';

export { isEmpty };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isLeaf } from './isLeaf';
import { isNodeEmpty } from './isNodeEmpty';
import { isLeaf } from '../isLeaf';
import { isNodeEmpty } from '../isNodeEmpty';

/**
* breadth-first search (BFS)
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/isFragment/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isFragment } from './isFragment';

export { isFragment };
3 changes: 3 additions & 0 deletions packages/dom/src/isHtmlString/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isHTMLString } from './isHtmlString';

export { isHTMLString };
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { make } from './make';
import { make } from '../make';

/**
* Check if string contains html elements
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/src/isLeaf/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isLeaf } from './isLeaf';

export { isLeaf };
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/dom/src/isLineBreakTag/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isLineBreakTag } from './isLineBreakTag';

export { isLineBreakTag };
3 changes: 3 additions & 0 deletions packages/dom/src/isNativeInput/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isNativeInput } from './isNativeInput';

export { isNativeInput };
3 changes: 3 additions & 0 deletions packages/dom/src/isNodeEmpty/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { isNodeEmpty } from './isNodeEmpty';

export { isNodeEmpty };
Loading
Loading