From e12e841b82ccf00988dd39b4551ca4e9c716403c Mon Sep 17 00:00:00 2001 From: "ecoscript[bot]" <143032650+ecoscript[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:49:39 +0000 Subject: [PATCH] =?UTF-8?q?chore(format):=20=F0=9F=A4=96=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/buildMarksTree.ts | 3 +-- src/nestLists.ts | 11 +++++------ src/spanToPlainText.ts | 3 +-- test/buildMarksTree.test.ts | 3 +-- test/nestLists.test.ts | 3 +-- test/sortMarksByOccurences.test.ts | 3 +-- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/buildMarksTree.ts b/src/buildMarksTree.ts index 3b9059c..dcf7469 100644 --- a/src/buildMarksTree.ts +++ b/src/buildMarksTree.ts @@ -4,10 +4,9 @@ import type { PortableTextMarkDefinition, } from '@portabletext/types' -import type {ToolkitNestedPortableTextSpan, ToolkitTextNode} from './types' - import {isPortableTextSpan} from './asserters' import {sortMarksByOccurences} from './sortMarksByOccurences' +import type {ToolkitNestedPortableTextSpan, ToolkitTextNode} from './types' /** * Takes a Portable Text block and returns a nested tree of nodes optimized for rendering diff --git a/src/nestLists.ts b/src/nestLists.ts index bf7776f..fe4f9f9 100644 --- a/src/nestLists.ts +++ b/src/nestLists.ts @@ -1,5 +1,10 @@ import type {PortableTextBlock, PortableTextListItemBlock, TypedObject} from '@portabletext/types' +import { + isPortableTextListItemBlock, + isPortableTextSpan, + isPortableTextToolkitList, +} from './asserters' import type { ToolkitListNestMode, ToolkitPortableTextDirectList, @@ -8,12 +13,6 @@ import type { ToolkitPortableTextListItem, } from './types' -import { - isPortableTextListItemBlock, - isPortableTextSpan, - isPortableTextToolkitList, -} from './asserters' - export type ToolkitNestListsOutputNode = | T | ToolkitPortableTextHtmlList diff --git a/src/spanToPlainText.ts b/src/spanToPlainText.ts index d36b0d1..3981fbe 100644 --- a/src/spanToPlainText.ts +++ b/src/spanToPlainText.ts @@ -1,6 +1,5 @@ -import type {ToolkitNestedPortableTextSpan} from './types' - import {isPortableTextToolkitSpan, isPortableTextToolkitTextNode} from './asserters' +import type {ToolkitNestedPortableTextSpan} from './types' /** * Returns the plain-text representation of a diff --git a/test/buildMarksTree.test.ts b/test/buildMarksTree.test.ts index 9885fb9..c870ab2 100644 --- a/test/buildMarksTree.test.ts +++ b/test/buildMarksTree.test.ts @@ -1,6 +1,5 @@ -import type {PortableTextBlock} from '@portabletext/types' - import {buildMarksTree} from '@portabletext/toolkit' +import type {PortableTextBlock} from '@portabletext/types' import {expect, test} from 'vitest' test('buildMarksTree: returns empty tree on empty blocks', () => { diff --git a/test/nestLists.test.ts b/test/nestLists.test.ts index 20ce09c..7879f69 100644 --- a/test/nestLists.test.ts +++ b/test/nestLists.test.ts @@ -1,6 +1,5 @@ -import type {PortableTextListItemBlock} from '@portabletext/types' - import {LIST_NEST_MODE_DIRECT, LIST_NEST_MODE_HTML, nestLists} from '@portabletext/toolkit' +import type {PortableTextListItemBlock} from '@portabletext/types' import {expect, test} from 'vitest' test('nestLists: returns empty tree on no blocks', () => { diff --git a/test/sortMarksByOccurences.test.ts b/test/sortMarksByOccurences.test.ts index d1e6d3f..91e279f 100644 --- a/test/sortMarksByOccurences.test.ts +++ b/test/sortMarksByOccurences.test.ts @@ -1,6 +1,5 @@ -import type {PortableTextBlock} from '@portabletext/types' - import {sortMarksByOccurences} from '@portabletext/toolkit' +import type {PortableTextBlock} from '@portabletext/types' import {expect, test} from 'vitest' test('sortMarksByOccurences: sorts correctly', () => {