diff --git a/.changeset/initial-release.md b/.changeset/initial-release.md deleted file mode 100644 index 8509f95..0000000 --- a/.changeset/initial-release.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@overlapmark/core': minor -'@overlapmark/dom': minor -'@overlapmark/vue': minor -'@overlapmark/react': minor -'@overlapmark/svelte': minor ---- - -Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). - -`@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. - -`@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. - -`@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 0000000..8aeb812 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,13 @@ +# @overlapmark/core + +## 0.1.0 + +### Minor Changes + +- fa7509c: Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). + + `@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. + + `@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. + + `@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. diff --git a/packages/core/package.json b/packages/core/package.json index 0b926d0..787f296 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@overlapmark/core", - "version": "0.0.0", + "version": "0.1.0", "description": "Framework-agnostic core for overlapping text highlights", "license": "MIT", "author": "Donghyun Lee", diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md new file mode 100644 index 0000000..655b6d8 --- /dev/null +++ b/packages/dom/CHANGELOG.md @@ -0,0 +1,18 @@ +# @overlapmark/dom + +## 0.1.0 + +### Minor Changes + +- fa7509c: Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). + + `@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. + + `@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. + + `@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. + +### Patch Changes + +- Updated dependencies [fa7509c] + - @overlapmark/core@0.1.0 diff --git a/packages/dom/package.json b/packages/dom/package.json index 18219f5..f4b7528 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@overlapmark/dom", - "version": "0.0.0", + "version": "0.1.0", "description": "Vanilla JS adapter for overlapping text highlights", "license": "MIT", "author": "Donghyun Lee", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md new file mode 100644 index 0000000..9a25d22 --- /dev/null +++ b/packages/react/CHANGELOG.md @@ -0,0 +1,18 @@ +# @overlapmark/react + +## 0.1.0 + +### Minor Changes + +- fa7509c: Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). + + `@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. + + `@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. + + `@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. + +### Patch Changes + +- Updated dependencies [fa7509c] + - @overlapmark/core@0.1.0 diff --git a/packages/react/package.json b/packages/react/package.json index 5f89827..44aad89 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@overlapmark/react", - "version": "0.0.0", + "version": "0.1.0", "description": "React component for overlapping text highlights", "license": "MIT", "author": "Donghyun Lee", diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md new file mode 100644 index 0000000..18a24b7 --- /dev/null +++ b/packages/svelte/CHANGELOG.md @@ -0,0 +1,18 @@ +# @overlapmark/svelte + +## 0.1.0 + +### Minor Changes + +- fa7509c: Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). + + `@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. + + `@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. + + `@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. + +### Patch Changes + +- Updated dependencies [fa7509c] + - @overlapmark/core@0.1.0 diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 7541571..b13900b 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@overlapmark/svelte", - "version": "0.0.0", + "version": "0.1.0", "description": "Svelte 5 component for overlapping text highlights", "license": "MIT", "author": "Donghyun Lee", diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md new file mode 100644 index 0000000..5195d28 --- /dev/null +++ b/packages/vue/CHANGELOG.md @@ -0,0 +1,18 @@ +# @overlapmark/vue + +## 0.1.0 + +### Minor Changes + +- fa7509c: Initial release of overlapmark: overlapping text highlights for Vue 3, React, Svelte 5 and plain JS. The more highlights cover a spot, the darker it gets, even when every highlight has its own color, and a click, tap or Enter reports every highlight covering that spot. The text is rendered once and cut into segments, runs of text covered by the same set of highlights, so highlights stay aligned with the text however the layout wraps. Positions are JS string indices (UTF-16 code units, `end` exclusive). + + `@overlapmark/core` is the framework-agnostic part: segment computation, text search, the types and event details, DOM offset helpers in `@overlapmark/core/dom`, the shared render model and `segmentKey`/`decorationTarget` for adapter authors in `@overlapmark/core/adapter` (unstable; minor versions may change it), and the default stylesheet `styles.css`. The `overlap` option sets how overlaps look: `multiply` (default), `darken` or `none`. The `layers` and `depth` strategies draw overlaps, and `defaultColor` colors highlights without a `color`. Colors are validated (up to 64 characters), and ids must not contain whitespace; both are reported with a one-time development warning. Segments carry `data-om-ids` (space-separated), a focusable segment has `role="button"` and an `aria-description` (`describe` customizes its text, by default "1 highlight" or "n highlights"). `select` reports the selected range, and its `rect` is the bounding rect of the selected text inside the root, clipped to the root. + + `@overlapmark/dom` renders highlights into any element and returns a `Highlighter` with `update()`, `on()` and `destroy()`. It reports `select`, `click` and hover events with core's detail objects, keeps the selection and keyboard focus across updates (a selection is cleared when the text changed), and supports decorations through the `decorate` option. + + `@overlapmark/vue` (Vue 3.3 or later), `@overlapmark/react` (React 18 or later) and `@overlapmark/svelte` (Svelte 5) provide a `Highlighter` component each. They render the same DOM as `@overlapmark/dom`, report the same events with core's detail objects, render on the server and hydrate, and support decorations through a scoped slot, a render prop and a snippet. + +### Patch Changes + +- Updated dependencies [fa7509c] + - @overlapmark/core@0.1.0 diff --git a/packages/vue/package.json b/packages/vue/package.json index eb87652..3f79655 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@overlapmark/vue", - "version": "0.0.0", + "version": "0.1.0", "description": "Vue 3 component for overlapping text highlights", "license": "MIT", "author": "Donghyun Lee",