From b7b1eaa44468f3710309bb0fa647429fde51923a Mon Sep 17 00:00:00 2001 From: "pedroapfilho-release[bot]" <342524536+pedroapfilho-release[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 02:08:47 +0000 Subject: [PATCH] chore: version packages --- .changeset/core-drop-intent.md | 5 --- .changeset/docking-focus-rule.md | 5 --- .changeset/document-owned-drops.md | 8 ---- .changeset/drag-import-guard.md | 4 -- .changeset/drag-root-in-layout-root.md | 5 --- .changeset/drop-intent-one-measurement.md | 5 --- .changeset/external-source-no-root-warning.md | 5 --- .changeset/float-gesture-decision.md | 4 -- .changeset/float-layer-drop-global.md | 5 --- .changeset/history-explicit-names.md | 5 --- .changeset/normalize-owns-selected.md | 5 --- .changeset/react-shallow-module-cleanup.md | 4 -- .changeset/reducer-structural-no-op.md | 5 --- .changeset/remove-document-machine.md | 5 --- .changeset/reserve-float-ids.md | 5 --- .changeset/responsive-layout-hook.md | 8 ---- .changeset/selection-after-removal.md | 6 --- .changeset/shared-console-warnings.md | 6 --- .changeset/store-owns-persistence.md | 7 ---- .changeset/trim-core-surface.md | 5 --- packages/core/CHANGELOG.md | 29 ++++++++++++++ packages/core/package.json | 2 +- packages/react/CHANGELOG.md | 38 +++++++++++++++++++ packages/react/package.json | 2 +- 24 files changed, 69 insertions(+), 109 deletions(-) delete mode 100644 .changeset/core-drop-intent.md delete mode 100644 .changeset/docking-focus-rule.md delete mode 100644 .changeset/document-owned-drops.md delete mode 100644 .changeset/drag-import-guard.md delete mode 100644 .changeset/drag-root-in-layout-root.md delete mode 100644 .changeset/drop-intent-one-measurement.md delete mode 100644 .changeset/external-source-no-root-warning.md delete mode 100644 .changeset/float-gesture-decision.md delete mode 100644 .changeset/float-layer-drop-global.md delete mode 100644 .changeset/history-explicit-names.md delete mode 100644 .changeset/normalize-owns-selected.md delete mode 100644 .changeset/react-shallow-module-cleanup.md delete mode 100644 .changeset/reducer-structural-no-op.md delete mode 100644 .changeset/remove-document-machine.md delete mode 100644 .changeset/reserve-float-ids.md delete mode 100644 .changeset/responsive-layout-hook.md delete mode 100644 .changeset/selection-after-removal.md delete mode 100644 .changeset/shared-console-warnings.md delete mode 100644 .changeset/store-owns-persistence.md delete mode 100644 .changeset/trim-core-surface.md diff --git a/.changeset/core-drop-intent.md b/.changeset/core-drop-intent.md deleted file mode 100644 index be5a8385..00000000 --- a/.changeset/core-drop-intent.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": minor ---- - -Add `resolveDropIntent` and `dropIndicator`: pure drop-intent resolution over a measured tabset. They decide self-drops from the drag subject, strip versus body, the insertion index and the `splitDock` override, and derive the insertion line or split zone from the same measurement. diff --git a/.changeset/docking-focus-rule.md b/.changeset/docking-focus-rule.md deleted file mode 100644 index 255d3435..00000000 --- a/.changeset/docking-focus-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": patch ---- - -Every docking action now activates the tabset that received the moved content. `moveNode`, `moveTabset` and `addNode` onto a tabset's center used to leave focus where it was, so merging the active tabset away dropped focus to the first tabset. `addNode` with a tab id already in the layout is ignored with a `[dashfoo]` warning instead of creating a duplicate. diff --git a/.changeset/document-owned-drops.md b/.changeset/document-owned-drops.md deleted file mode 100644 index 51ef8272..00000000 --- a/.changeset/document-owned-drops.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@dashfoo/core": minor -"@dashfoo/react": minor ---- - -Bind internal drag subjects to their owning document and namespace draggable registrations and tab/panel accessibility IDs. Sibling and nested layouts sharing a provider reject foreign internal drops while main/float moves and external tab factories keep working. Internal `DragSubject` values now require `documentId`, and `COMMIT`/`dropAction` include the original subject for commit-time validation. - -Enforce the resolved structural permission at both drop resolution and commit, preventing external widgets and gestures started before compact mode from bypassing its docking lock. Center-only docking remains available when split docking is disabled. diff --git a/.changeset/drag-import-guard.md b/.changeset/drag-import-guard.md deleted file mode 100644 index c0cdd37f..00000000 --- a/.changeset/drag-import-guard.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Confine `@dnd-kit` imports to `packages/react/src/drag` with an oxlint `no-restricted-imports` guard. diff --git a/.changeset/drag-root-in-layout-root.md b/.changeset/drag-root-in-layout-root.md deleted file mode 100644 index 1dfd5773..00000000 --- a/.changeset/drag-root-in-layout-root.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/react": minor ---- - -`Layout.Root` now mounts the drag root, so every layout gets exactly one drag manager and drag actor, shared by the main tree and its floats. Hand-built layouts with `Layout.FloatLayer` can now drag between floats and the main tree; before, each float mounted its own root and those drops failed silently. A root nested inside another (a layout under `DashfooDragProvider`, or a layout in a tab) reuses the outer one. `Layout.DragLayer` no longer mounts a root of its own: it must sit inside a `Layout.Root`, warns when it does not, and drops its undocumented `onCommit` and `splitDock` props in favour of the layout store. diff --git a/.changeset/drop-intent-one-measurement.md b/.changeset/drop-intent-one-measurement.md deleted file mode 100644 index 46b2dc4f..00000000 --- a/.changeset/drop-intent-one-measurement.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/react": patch ---- - -Drop intents and the dock indicator now come from one tab-strip measurement through `resolveDropIntent` and `dropIndicator` in `@dashfoo/core`, so the insertion index and the insertion line always mark the same slot. The index is measured against whole tab items (label plus close button), the item wrapper (`data-dashfoo="tab-item"`) carries `data-tab-id`, a layout nested in a tab no longer leaks its strip into the outer tabset's measurement, and only the layer that resolved a drop paints its indicator. diff --git a/.changeset/external-source-no-root-warning.md b/.changeset/external-source-no-root-warning.md deleted file mode 100644 index 840c5da2..00000000 --- a/.changeset/external-source-no-root-warning.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/react": patch ---- - -`useExternalTabSource` warns once when it has no drag root above it instead of silently registering nothing. diff --git a/.changeset/float-gesture-decision.md b/.changeset/float-gesture-decision.md deleted file mode 100644 index e4434c55..00000000 --- a/.changeset/float-gesture-decision.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Record why floating panels keep a hand-written move and resize gesture instead of a dnd-kit draggable. diff --git a/.changeset/float-layer-drop-global.md b/.changeset/float-layer-drop-global.md deleted file mode 100644 index 56149703..00000000 --- a/.changeset/float-layer-drop-global.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/react": minor ---- - -Remove the unused `global` prop from `Layout.FloatLayer`. Floating panels already inherit their capabilities from the layout above them; drop `global={...}` from any hand-built ``. diff --git a/.changeset/history-explicit-names.md b/.changeset/history-explicit-names.md deleted file mode 100644 index a14ac879..00000000 --- a/.changeset/history-explicit-names.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": major ---- - -Give the history functions explicit names: `dispatch` is now `dispatchToHistory`, `undo` is `undoHistory`, `redo` is `redoHistory`, `canUndo` is `canUndoHistory` and `canRedo` is `canRedoHistory`. `createHistory` now normalizes the model it receives, so every history holds a canonical document. diff --git a/.changeset/normalize-owns-selected.md b/.changeset/normalize-owns-selected.md deleted file mode 100644 index 369ab805..00000000 --- a/.changeset/normalize-owns-selected.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": major ---- - -`normalize` clamps every tabset's `selected` into its strip. `tabsetNodeSchema` now checks shape only, so `tabsetNodeSchema.parse` and `dashfooSchema.parse` keep an out-of-range `selected` for `normalize` (and `parseModel`) to clamp. `tabsetNodeObjectSchema` is removed: `tabsetNodeSchema` has no transform left to bypass. diff --git a/.changeset/react-shallow-module-cleanup.md b/.changeset/react-shallow-module-cleanup.md deleted file mode 100644 index d7ef6834..00000000 --- a/.changeset/react-shallow-module-cleanup.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Give the snap-resize states a pure, unit-tested transition, fold the `Panel.*` parts into one module, and pass the float resize edge directly. Runtime behavior and the public interface are unchanged. diff --git a/.changeset/reducer-structural-no-op.md b/.changeset/reducer-structural-no-op.md deleted file mode 100644 index 0b6a04a5..00000000 --- a/.changeset/reducer-structural-no-op.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": patch ---- - -The reducer detects a no-op once, by comparing the normalized result with its input, and returns the input object when they match. Maximizing a float's tabset or an unknown id, and re-sending an identical `min`, `max`, `snap` or `config`, no longer record an undo step or clear the redo stack. diff --git a/.changeset/remove-document-machine.md b/.changeset/remove-document-machine.md deleted file mode 100644 index b794a66d..00000000 --- a/.changeset/remove-document-machine.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": major ---- - -Remove `dashfooMachine`. It had one state and mapped each event onto a history function, so it added indirection without a lifecycle. Hold a `History` from `createHistory` and step it with `dispatchToHistory`, `undoHistory` and `redoHistory`. `dragDockMachine` is unchanged. diff --git a/.changeset/reserve-float-ids.md b/.changeset/reserve-float-ids.md deleted file mode 100644 index 79104d55..00000000 --- a/.changeset/reserve-float-ids.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": patch ---- - -Reject occupied caller-supplied float IDs before detaching tabs or tabsets, leaving the document and undo history unchanged. diff --git a/.changeset/responsive-layout-hook.md b/.changeset/responsive-layout-hook.md deleted file mode 100644 index 3e35cc70..00000000 --- a/.changeset/responsive-layout-hook.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@dashfoo/core": major -"@dashfoo/react": minor ---- - -One responsive projection. `useResponsiveLayout(model, { maxWidth, orientation? })` measures the layout's own container and returns the compact view of the model plus the lock that goes with it (`restructurable: false`, which also disables floating, and `maximizable: false`). `DashfooLayout`'s `responsive` prop runs on the same hook, so a hand-built `Layout.Root` compacts exactly like the built-in layout, keeping row ancestors so nested widget state survives the breakpoint. - -Breaking: `useResponsiveModel`, `useContainerWidth`, `matchBreakpoint`, `activeBreakpoint` and the `Breakpoint`, `ResponsiveModel` and `UseResponsiveModelOptions` types are removed from `@dashfoo/react`, and `stackModel` is removed from `@dashfoo/core`. Flattening reparented nested tabsets and remounted their content; use `useResponsiveLayout` instead. diff --git a/.changeset/selection-after-removal.md b/.changeset/selection-after-removal.md deleted file mode 100644 index 47d380e9..00000000 --- a/.changeset/selection-after-removal.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@dashfoo/core": minor -"@dashfoo/react": patch ---- - -Removing a tab from a strip keeps the selection on the tab that was selected; removing a tab before it used to shift the selection onto its neighbour. Core exports the rule as `fallbackSelectedIndex`, and the tab strip's drag preview uses it instead of its own copy. diff --git a/.changeset/shared-console-warnings.md b/.changeset/shared-console-warnings.md deleted file mode 100644 index da71a9d3..00000000 --- a/.changeset/shared-console-warnings.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@dashfoo/core": minor -"@dashfoo/react": patch ---- - -Export `warn` and `warnOnce` from `@dashfoo/core`. Both packages now report degraded paths through them, so every developer-console warning carries the same `[dashfoo]` prefix, and a missing tab component warns once per component key across layouts. diff --git a/.changeset/store-owns-persistence.md b/.changeset/store-owns-persistence.md deleted file mode 100644 index 7f24adc9..00000000 --- a/.changeset/store-owns-persistence.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@dashfoo/react": minor ---- - -`useDashfooStore` now owns the whole document lifecycle. It takes a `persist` option (the same `string | { key, storage?, debounceMs? }` that `DashfooLayout` accepts) that loads once after hydration, restores without an undo entry or a save, debounce-saves every change and flushes on page hide and unmount. The store also returns `reset()`, which clears the saved copy and restores `defaultModel`. Hand-built layouts get the same persistence as `DashfooLayout` from the hook alone. - -Breaking: `usePersistence` and its `Persistence` and `PersistConfig` types are removed; pass `persist` to `useDashfooStore` instead. The persist input type is exported as `PersistInput`. With `persist` set, `setModel` now saves the replacement like any other change. The store no longer runs an XState actor. diff --git a/.changeset/trim-core-surface.md b/.changeset/trim-core-surface.md deleted file mode 100644 index 0d11a63f..00000000 --- a/.changeset/trim-core-surface.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@dashfoo/core": major ---- - -Remove exports nothing consumed: `findRootContaining`, the `TabContainer` alias (`TabLocation.container` is a `TabsetNode`), and the snap internals `snapSizes`, `resolveSnapTargets`, `DEFAULT_SNAP_THRESHOLD` and `SnapResult`. Snap through `resolveSnapGrid`, `decideSnap` and `settleSnap`. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 520953cd..710737ce 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,34 @@ # @dashfoo/core +## 2.0.0 + +### Major Changes + +- 9eec182: Give the history functions explicit names: `dispatch` is now `dispatchToHistory`, `undo` is `undoHistory`, `redo` is `redoHistory`, `canUndo` is `canUndoHistory` and `canRedo` is `canRedoHistory`. `createHistory` now normalizes the model it receives, so every history holds a canonical document. +- 9eec182: `normalize` clamps every tabset's `selected` into its strip. `tabsetNodeSchema` now checks shape only, so `tabsetNodeSchema.parse` and `dashfooSchema.parse` keep an out-of-range `selected` for `normalize` (and `parseModel`) to clamp. `tabsetNodeObjectSchema` is removed: `tabsetNodeSchema` has no transform left to bypass. +- 9eec182: Remove `dashfooMachine`. It had one state and mapped each event onto a history function, so it added indirection without a lifecycle. Hold a `History` from `createHistory` and step it with `dispatchToHistory`, `undoHistory` and `redoHistory`. `dragDockMachine` is unchanged. +- 9eec182: One responsive projection. `useResponsiveLayout(model, { maxWidth, orientation? })` measures the layout's own container and returns the compact view of the model plus the lock that goes with it (`restructurable: false`, which also disables floating, and `maximizable: false`). `DashfooLayout`'s `responsive` prop runs on the same hook, so a hand-built `Layout.Root` compacts exactly like the built-in layout, keeping row ancestors so nested widget state survives the breakpoint. + + Breaking: `useResponsiveModel`, `useContainerWidth`, `matchBreakpoint`, `activeBreakpoint` and the `Breakpoint`, `ResponsiveModel` and `UseResponsiveModelOptions` types are removed from `@dashfoo/react`, and `stackModel` is removed from `@dashfoo/core`. Flattening reparented nested tabsets and remounted their content; use `useResponsiveLayout` instead. + +- 9eec182: Remove exports nothing consumed: `findRootContaining`, the `TabContainer` alias (`TabLocation.container` is a `TabsetNode`), and the snap internals `snapSizes`, `resolveSnapTargets`, `DEFAULT_SNAP_THRESHOLD` and `SnapResult`. Snap through `resolveSnapGrid`, `decideSnap` and `settleSnap`. + +### Minor Changes + +- 9eec182: Add `resolveDropIntent` and `dropIndicator`: pure drop-intent resolution over a measured tabset. They decide self-drops from the drag subject, strip versus body, the insertion index and the `splitDock` override, and derive the insertion line or split zone from the same measurement. +- 86ae424: Bind internal drag subjects to their owning document and namespace draggable registrations and tab/panel accessibility IDs. Sibling and nested layouts sharing a provider reject foreign internal drops while main/float moves and external tab factories keep working. Internal `DragSubject` values now require `documentId`, and `COMMIT`/`dropAction` include the original subject for commit-time validation. + + Enforce the resolved structural permission at both drop resolution and commit, preventing external widgets and gestures started before compact mode from bypassing its docking lock. Center-only docking remains available when split docking is disabled. + +- 9eec182: Removing a tab from a strip keeps the selection on the tab that was selected; removing a tab before it used to shift the selection onto its neighbour. Core exports the rule as `fallbackSelectedIndex`, and the tab strip's drag preview uses it instead of its own copy. +- 6d86c96: Export `warn` and `warnOnce` from `@dashfoo/core`. Both packages now report degraded paths through them, so every developer-console warning carries the same `[dashfoo]` prefix, and a missing tab component warns once per component key across layouts. + +### Patch Changes + +- 9eec182: Every docking action now activates the tabset that received the moved content. `moveNode`, `moveTabset` and `addNode` onto a tabset's center used to leave focus where it was, so merging the active tabset away dropped focus to the first tabset. `addNode` with a tab id already in the layout is ignored with a `[dashfoo]` warning instead of creating a duplicate. +- 9eec182: The reducer detects a no-op once, by comparing the normalized result with its input, and returns the input object when they match. Maximizing a float's tabset or an unknown id, and re-sending an identical `min`, `max`, `snap` or `config`, no longer record an undo step or clear the redo stack. +- 86ae424: Reject occupied caller-supplied float IDs before detaching tabs or tabsets, leaving the document and undo history unchanged. + ## 1.1.4 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 1fd42770..8097ff23 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@dashfoo/core", - "version": "1.1.4", + "version": "2.0.0", "description": "Headless docking-layout engine: model, actions, reducer, serialization, geometry, and the XState actor system. No React.", "license": "MIT", "author": "Pedro Filho ", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index a328e83e..56cd6ca7 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,43 @@ # @dashfoo/react +## 0.10.0 + +### Minor Changes + +- 86ae424: Bind internal drag subjects to their owning document and namespace draggable registrations and tab/panel accessibility IDs. Sibling and nested layouts sharing a provider reject foreign internal drops while main/float moves and external tab factories keep working. Internal `DragSubject` values now require `documentId`, and `COMMIT`/`dropAction` include the original subject for commit-time validation. + + Enforce the resolved structural permission at both drop resolution and commit, preventing external widgets and gestures started before compact mode from bypassing its docking lock. Center-only docking remains available when split docking is disabled. + +- 9eec182: `Layout.Root` now mounts the drag root, so every layout gets exactly one drag manager and drag actor, shared by the main tree and its floats. Hand-built layouts with `Layout.FloatLayer` can now drag between floats and the main tree; before, each float mounted its own root and those drops failed silently. A root nested inside another (a layout under `DashfooDragProvider`, or a layout in a tab) reuses the outer one. `Layout.DragLayer` no longer mounts a root of its own: it must sit inside a `Layout.Root`, warns when it does not, and drops its undocumented `onCommit` and `splitDock` props in favour of the layout store. +- 9eec182: Remove the unused `global` prop from `Layout.FloatLayer`. Floating panels already inherit their capabilities from the layout above them; drop `global={...}` from any hand-built ``. +- 9eec182: One responsive projection. `useResponsiveLayout(model, { maxWidth, orientation? })` measures the layout's own container and returns the compact view of the model plus the lock that goes with it (`restructurable: false`, which also disables floating, and `maximizable: false`). `DashfooLayout`'s `responsive` prop runs on the same hook, so a hand-built `Layout.Root` compacts exactly like the built-in layout, keeping row ancestors so nested widget state survives the breakpoint. + + Breaking: `useResponsiveModel`, `useContainerWidth`, `matchBreakpoint`, `activeBreakpoint` and the `Breakpoint`, `ResponsiveModel` and `UseResponsiveModelOptions` types are removed from `@dashfoo/react`, and `stackModel` is removed from `@dashfoo/core`. Flattening reparented nested tabsets and remounted their content; use `useResponsiveLayout` instead. + +- 9eec182: `useDashfooStore` now owns the whole document lifecycle. It takes a `persist` option (the same `string | { key, storage?, debounceMs? }` that `DashfooLayout` accepts) that loads once after hydration, restores without an undo entry or a save, debounce-saves every change and flushes on page hide and unmount. The store also returns `reset()`, which clears the saved copy and restores `defaultModel`. Hand-built layouts get the same persistence as `DashfooLayout` from the hook alone. + + Breaking: `usePersistence` and its `Persistence` and `PersistConfig` types are removed; pass `persist` to `useDashfooStore` instead. The persist input type is exported as `PersistInput`. With `persist` set, `setModel` now saves the replacement like any other change. The store no longer runs an XState actor. + +### Patch Changes + +- 9eec182: Drop intents and the dock indicator now come from one tab-strip measurement through `resolveDropIntent` and `dropIndicator` in `@dashfoo/core`, so the insertion index and the insertion line always mark the same slot. The index is measured against whole tab items (label plus close button), the item wrapper (`data-dashfoo="tab-item"`) carries `data-tab-id`, a layout nested in a tab no longer leaks its strip into the outer tabset's measurement, and only the layer that resolved a drop paints its indicator. +- 9eec182: `useExternalTabSource` warns once when it has no drag root above it instead of silently registering nothing. +- 9eec182: Removing a tab from a strip keeps the selection on the tab that was selected; removing a tab before it used to shift the selection onto its neighbour. Core exports the rule as `fallbackSelectedIndex`, and the tab strip's drag preview uses it instead of its own copy. +- 6d86c96: Export `warn` and `warnOnce` from `@dashfoo/core`. Both packages now report degraded paths through them, so every developer-console warning carries the same `[dashfoo]` prefix, and a missing tab component warns once per component key across layouts. +- Updated dependencies [9eec182] +- Updated dependencies [9eec182] +- Updated dependencies [86ae424] +- Updated dependencies [9eec182] +- Updated dependencies [9eec182] +- Updated dependencies [9eec182] +- Updated dependencies [9eec182] +- Updated dependencies [86ae424] +- Updated dependencies [9eec182] +- Updated dependencies [9eec182] +- Updated dependencies [6d86c96] +- Updated dependencies [9eec182] + - @dashfoo/core@2.0.0 + ## 0.9.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 96122f8f..fe874b9a 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@dashfoo/react", - "version": "0.9.1", + "version": "0.10.0", "description": "Headless React layer for dashfoo: DashfooLayout, hooks, slots, and the react-resizable-panels + dnd-kit adapters.", "license": "MIT", "author": "Pedro Filho ",