Skip to content
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
27 changes: 0 additions & 27 deletions .changeset/v2-core.md

This file was deleted.

32 changes: 0 additions & 32 deletions .changeset/v2-react.md

This file was deleted.

20 changes: 0 additions & 20 deletions .changeset/v2-solid.md

This file was deleted.

8 changes: 8 additions & 0 deletions examples/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# shadcn

## 0.0.7

### Patch Changes

- Updated dependencies [[`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc), [`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc)]:
- @dynamix-layout/core@2.0.0
- @dynamix-layout/react@2.0.0

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@repo/react-example",
"private": true,
"version": "0.0.6",
"version": "0.0.7",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
8 changes: 8 additions & 0 deletions examples/solidstart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# solidstart

## 0.0.7

### Patch Changes

- Updated dependencies [[`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc), [`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc)]:
- @dynamix-layout/core@2.0.0
- @dynamix-layout/solid@2.0.0

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/solidstart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@repo/solidstart-example",
"type": "module",
"private": true,
"version": "0.0.6",
"version": "0.0.7",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
Expand Down
28 changes: 28 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# @dynamix-layout/core

## 2.0.0

### Major Changes

- [#87](https://github.com/xcode-studio/dynamix-layout/pull/87) [`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc) Thanks [@akash-aman](https://github.com/akash-aman)! - **v2: an instance-based, pure layout engine.** See the migration guide for every rename.

- **`createLayout(options)` replaces `new DynamixLayoutCore()`.** Each instance is independent: there is no module-level state, no static caches, no timers, and nothing touches the DOM. Two layouts on a page, or one per server request, no longer interfere.
- **Immutable snapshots** (`getSnapshot()` / `subscribe()`) share unchanged parts by reference: `tabsets`, `tabs`, `splitters`, `rects` and `drag`.
- **Typed actions** that return whether anything changed and never throw: `moveTab`, `moveTabset`, `selectTab`, `addTab`, `removeTab`, `setTabs`, `resizeSplitter`, `moveSplitterBy`, `maximize`/`restore`, `fold`/`unfold`, plus one drag model for tabs and splitters (`startDrag`, `updateDrag`, `endDrag`, `cancelDrag`) and hit testing (`getDropTarget`, `listDropTargets`).
- **`onLayoutChange(layout, reason)`** reports committed changes.
- **New saved format, `LayoutJSON`** (`version: 2`): readable names, explicit directions, and tab ids as the stable identity.
- **Old layouts:** v1 trees load automatically, or convert them with `migrateLayoutFromV1`. They render pixel-identically, as checked against layouts recorded from v1.
- **Deterministic ids**, safe for server rendering; no `crypto.randomUUID()`, which threw outside secure contexts.
- **Rects are relative to the layout root.** v1 misplaced layouts that weren't at the viewport's top-left.
- **No import-time side effects:** the console banner and `window.__DYNAMIX_LAYOUT__` are gone. Use `version` instead.
- **Fixed:**
- nested rows left behind after some moves;
- stale sizes when every open panel had weight 0;
- a row stuck at its minimum next to a folded tabset;
- the root staying oversized after the container shrank;
- center drops inserting before the last tab (they now append).
- **Packaging:** the CommonJS build loads with `require()` (it was ESM under a `.cjs.js` name), exports maps give each condition its own types, and the package installs on Node 18 and later (it required Node 22).

**Breaking:**
- `DynamixLayoutCore`, `Node`, `Bond`, `Node.cache`, `Queue`, `createReactiveState`, the comparators, the drop-preview and DOM helpers, and the `LayoutTree`/`NodeOptions` types are removed.
- `updateTree(src, des, area)` becomes `moveTab`/`moveTabset(id, target)`, with `'contain'` renamed to `'center'`.
- `updateDimension` becomes `setContainerRect`, and the debounce arguments are gone; throttle in the adapter instead.

## 1.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamix-layout/core",
"version": "1.2.0",
"version": "2.0.0",
"description": "Dynamix Layout/Core is a JavaScript package for creating dynamic layouts with ease.",
"keywords": [
"dynamix-layout",
Expand Down
38 changes: 38 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @dynamix-layout/react

## 2.0.0

### Major Changes

- [#87](https://github.com/xcode-studio/dynamix-layout/pull/87) [`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc) Thanks [@akash-aman](https://github.com/akash-aman)! - **v2: a small component API, headless hooks, accessibility and SSR.** See the migration guide for every rename.

- **`<DynamixLayout>`**:
- `tabs` is a list of objects (`{ id, title, content, closable, target }`);
- `defaultLayout` (uncontrolled) or `layout` (controlled) takes v1 or v2 JSON, and `onLayoutChange(layout, { reason })` reports changes;
- `components`, `classNames` and `styles` replace the wrapper and styling props;
- `ref` gives an imperative handle.
- **The engine is created once and never rebuilt by prop changes.** An inline `tabs` array with unchanged ids does no engine work and remounts nothing, and moving a tab never remounts its content.
- **Headless API:** `useDynamixLayout` + `DynamixLayoutProvider`, `useTabset`, `useTab`, `useSplitter`, `useLayoutState` (re-renders only for the selected value), `useLayoutActions` and `useDragState`. Prop getters merge your refs, classes, styles and handlers.
- **Pointer-event dragging** for tabs, tabsets and splitters: touch long-press, Escape cancels, and it works over iframes. Drags and resizes never re-render React.
- **ResizeObserver** follows the container, so sidebars and flex parents resize the layout.
- **Accessibility:** WAI-ARIA tabs and window splitter patterns, keyboard resizing, keyboard move mode (Mod+Shift+M), and a live region.
- **SSR-safe and deterministic**, with a `'use client'` entry for the Next.js App Router. Works with React 18 and 19; the bundle no longer inlines React 19's JSX runtime.
- **Fixed:** callback refs are honoured, `layoutTree` changes are no longer ignored, and duplicate DOM ids are gone.

- **Installs on Node 18 and later** (1.x required Node 22).

**Breaking:**
- Removed:
- the v1 props and wrapper components (`WrapTab*`, `SliderElement`, `HoverElement`, `RootSplitterHoverEl`);
- `getTabOutput`;
- the v1 `useDynamixLayout` return shape.
- `updateJSON` becomes `onLayoutChange`, which receives v2 JSON and is not called on mount.
- `ref` returns a `DynamixLayoutHandle` (`handle.element` is the root).
- Keyboard shortcuts only act when focus is inside the layout.
- Default classes are `.dx-*`, and data attributes are `data-dx-*`.
- The stylesheet is `@dynamix-layout/react/styles.css` (`style.css` still works).
- React 17 is no longer supported.

### Patch Changes

- Updated dependencies [[`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc)]:
- @dynamix-layout/core@2.0.0

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamix-layout/react",
"version": "1.1.0",
"version": "2.0.0",
"description": "A powerful React component for creating dynamic, resizable, and draggable layouts.",
"keywords": [
"react",
Expand Down
26 changes: 26 additions & 0 deletions packages/solid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @dynamix-layout/solid

## 2.0.0

### Major Changes

- [#87](https://github.com/xcode-studio/dynamix-layout/pull/87) [`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc) Thanks [@akash-aman](https://github.com/akash-aman)! - **Runs on the v2 core.** `<DynamixLayout>` keeps its props, default components and drag-and-drop, but each component now has its own engine instance. Two Solid layouts on a page no longer share state, and a layout away from the viewport's top-left is placed correctly.

- **Installs on Node 18 and later** (1.x required Node 22).

**New:**
- `tabs` is reactive: add an entry to open a tab, remove it to close one. Existing tabs keep their content mounted.
- Closable tabs: a third tuple element `{ title, closable }` and an `onTabClose` prop.
- `onReady(layout)` gives the engine for actions from code (`maximize`, `fold`, `selectTab`, `moveTab`, `reset`, `toJSON`, …).
- `updateJSON(layout, reason)` also says why it was called: `'move'`, `'resize'`, `'select'`, `'fold'`, `'maximize'`, `'tabs'`, `'reset'`, or `'mount'` for the first call (type `LayoutUpdateReason`).

**Breaking:**
- `layoutTree` accepts v2 JSON (v1 trees are migrated automatically), and `updateJSON` receives v2 `LayoutJSON`.
- `getTabOutput` and the `TabEntry`/`TabInput`/`TabOutput` types are removed, and tab ids are the tab labels.
- `useDynamixLayout` returns a new shape.
- The slider timeout options no longer apply; splitters update once per frame.
- `solid-js` is a peer dependency.

### Patch Changes

- Updated dependencies [[`a31dc4c`](https://github.com/xcode-studio/dynamix-layout/commit/a31dc4c2aef4facb8b80f94b9e3d97c36e148ccc)]:
- @dynamix-layout/core@2.0.0

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamix-layout/solid",
"version": "1.1.0",
"version": "2.0.0",
"description": "A powerful SolidJS component for creating dynamic, resizable, and draggable layouts.",
"keywords": [
"solid",
Expand Down
Loading