From daac958b311c56d5e155dfb4f652a425c67d3c7c Mon Sep 17 00:00:00 2001
From: akash-aman
Date: Mon, 5 Oct 2026 08:12:09 +0530
Subject: [PATCH 1/4] fix: React 18, CommonJS and type declarations in the 1.x
packages
- Externalize react/jsx-runtime and react-dom subpaths (the bundle
inlined React 19's runtime) and set the React peers to ^18 || ^19.
- Name the CommonJS builds .cjs so require() loads them as CommonJS in
these "type": "module" packages; drop core's browser field.
- Ship one rolled-up declaration file per package, importing
@dynamix-layout/core as a package instead of ../../../core/src, plus
index.d.cts for require.
- solid-js becomes a peer dependency of the Solid package, and the
packages install on Node 18+.
---
packages/core/package.json | 19 ++++++++++--------
packages/core/vite.config.ts | 13 ++++++++++++-
packages/react/package.json | 26 +++++++++++++++----------
packages/react/tsconfig.build.json | 9 +++++++++
packages/react/vite.config.ts | 22 ++++++++++++++++++---
packages/solid/package.json | 31 +++++++++++++++++++-----------
packages/solid/tsconfig.build.json | 9 +++++++++
packages/solid/vite.config.ts | 19 ++++++++++++++++--
pnpm-lock.yaml | 6 +++---
9 files changed, 116 insertions(+), 38 deletions(-)
create mode 100644 packages/react/tsconfig.build.json
create mode 100644 packages/solid/tsconfig.build.json
diff --git a/packages/core/package.json b/packages/core/package.json
index 4fbc59a..4677df3 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -21,23 +21,27 @@
],
"repository": {
"type": "git",
- "url": "https://github.com/xcode-studio/dynamix-layout.git",
+ "url": "git+https://github.com/xcode-studio/dynamix-layout.git",
"directory": "packages/core"
},
"bugs": {
"url": "https://github.com/xcode-studio/dynamix-layout/issues"
},
"homepage": "https://github.com/xcode-studio/dynamix-layout#readme",
- "main": "./dist/core.cjs.js",
+ "main": "./dist/core.cjs",
"module": "./dist/core.es.js",
- "browser": "./dist/core.iife.js",
"types": "./dist/types/index.d.ts",
"typings": "./dist/types/index.d.ts",
"exports": {
".": {
- "types": "./dist/types/index.d.ts",
- "import": "./dist/core.es.js",
- "require": "./dist/core.cjs.js"
+ "import": {
+ "types": "./dist/types/index.d.ts",
+ "default": "./dist/core.es.js"
+ },
+ "require": {
+ "types": "./dist/types/index.d.cts",
+ "default": "./dist/core.cjs"
+ }
}
},
"files": [
@@ -53,8 +57,7 @@
},
"type": "module",
"engines": {
- "node": ">=22.16.0",
- "pnpm": ">=10.13.1"
+ "node": ">=18"
},
"scripts": {
"dev": "vite build --watch",
diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts
index 5d6ece5..81ceec5 100644
--- a/packages/core/vite.config.ts
+++ b/packages/core/vite.config.ts
@@ -16,13 +16,24 @@ export default defineConfig({
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'dynamix.layout.core',
- fileName: (format) => `core.${format}.js`,
+ // `.cjs` so Node loads the CommonJS build as CommonJS in this `"type": "module"` package.
+ fileName: (format) => (format === 'cjs' ? 'core.cjs' : `core.${format}.js`),
formats: ['cjs', 'es', 'iife', 'umd'],
},
},
plugins: [
dts({
outDir: 'dist/types',
+ // Types-only modules never reach the bundle graph; list sources explicitly.
+ include: ['src'],
+ // One self-contained declaration file (Node16 resolution can't follow
+ // extensionless imports), copied to index.d.cts for `require`.
+ rollupTypes: true,
+ afterBuild: () =>
+ fs.copyFileSync(
+ resolve(__dirname, 'dist/types/index.d.ts'),
+ resolve(__dirname, 'dist/types/index.d.cts')
+ ),
exclude: ['node_modules/**', 'src/test/**'],
}),
visualizer({
diff --git a/packages/react/package.json b/packages/react/package.json
index cbae04f..4e42df2 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -27,25 +27,32 @@
],
"repository": {
"type": "git",
- "url": "https://github.com/xcode-studio/dynamix-layout",
+ "url": "git+https://github.com/xcode-studio/dynamix-layout.git",
"directory": "packages/react"
},
"bugs": {
"url": "https://github.com/xcode-studio/dynamix-layout/issues"
},
"homepage": "https://github.com/xcode-studio/dynamix-layout#readme",
- "main": "./dist/index.cjs.js",
+ "main": "./dist/index.cjs",
"module": "./dist/index.es.js",
"types": "./dist/types/index.d.ts",
"typings": "./dist/types/index.d.ts",
"style": "./dist/index.css",
"exports": {
".": {
- "types": "./dist/types/index.d.ts",
- "import": "./dist/index.es.js",
- "require": "./dist/index.cjs.js"
+ "import": {
+ "types": "./dist/types/index.d.ts",
+ "default": "./dist/index.es.js"
+ },
+ "require": {
+ "types": "./dist/types/index.d.cts",
+ "default": "./dist/index.cjs"
+ }
},
- "./style.css": "./dist/index.css"
+ "./style.css": "./dist/index.css",
+ "./styles.css": "./dist/index.css",
+ "./package.json": "./package.json"
},
"files": [
"dist",
@@ -62,8 +69,7 @@
},
"type": "module",
"engines": {
- "node": ">=22.16.0",
- "pnpm": ">=10.13.1"
+ "node": ">=18"
},
"scripts": {
"dev": "vite build --watch",
@@ -78,8 +84,8 @@
"@dynamix-layout/core": "workspace:*"
},
"peerDependencies": {
- "react": "^0.0.1",
- "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
diff --git a/packages/react/tsconfig.build.json b/packages/react/tsconfig.build.json
new file mode 100644
index 0000000..5a8c8d2
--- /dev/null
+++ b/packages/react/tsconfig.build.json
@@ -0,0 +1,9 @@
+{
+ // Declarations resolve @dynamix-layout/core from its built package, as users will.
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "paths": {},
+ "composite": false
+ },
+ "exclude": ["node_modules", "src/test"]
+}
diff --git a/packages/react/vite.config.ts b/packages/react/vite.config.ts
index 13b7b10..327a94b 100644
--- a/packages/react/vite.config.ts
+++ b/packages/react/vite.config.ts
@@ -29,6 +29,20 @@ export default defineConfig({
plugins: [
dts({
outDir: 'dist/types',
+ tsconfigPath: './tsconfig.build.json',
+ // Types-only modules never reach the bundle graph; list sources explicitly.
+ include: ['src'],
+ // One self-contained declaration file (Node16 resolution can't follow
+ // extensionless imports), copied to index.d.cts for `require`.
+ rollupTypes: true,
+ afterBuild: () =>
+ fs.copyFileSync(
+ resolve(__dirname, 'dist/types/index.d.ts'),
+ resolve(__dirname, 'dist/types/index.d.cts')
+ ),
+ // Keep `@dynamix-layout/core` as a package import in the .d.ts files.
+ aliasesExclude: [/^@dynamix-layout\/core/],
+ pathsToAliases: false,
exclude: ['node_modules/**', 'src/test/**'],
staticImport: true,
}),
@@ -46,12 +60,14 @@ export default defineConfig({
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'dynamix.layout.react',
- fileName: (format) => `index.${format}.js`,
- formats: ['cjs', 'es', 'iife', 'umd'],
+ // `.cjs` so Node loads the CommonJS build as CommonJS in this `"type": "module"` package.
+ fileName: (format) => (format === 'cjs' ? 'index.cjs' : `index.${format}.js`),
+ formats: ['cjs', 'es'],
},
cssCodeSplit: true,
rollupOptions: {
- external: ['react', 'react-dom', '@dynamix-layout/core'],
+ // Subpaths too: bundling `react/jsx-runtime` tied the package to React 19.
+ external: [/^react($|\/)/, /^react-dom($|\/)/, /^@dynamix-layout\/core($|\/)/],
output: {
globals: {
react: 'React',
diff --git a/packages/solid/package.json b/packages/solid/package.json
index 827996c..7506a25 100644
--- a/packages/solid/package.json
+++ b/packages/solid/package.json
@@ -26,25 +26,32 @@
],
"repository": {
"type": "git",
- "url": "https://github.com/xcode-studio/dynamix-layout",
+ "url": "git+https://github.com/xcode-studio/dynamix-layout.git",
"directory": "packages/solid"
},
"bugs": {
"url": "https://github.com/xcode-studio/dynamix-layout/issues"
},
"homepage": "https://github.com/xcode-studio/dynamix-layout#readme",
- "main": "./dist/index.cjs.js",
+ "main": "./dist/index.cjs",
"module": "./dist/index.es.js",
"types": "./dist/types/index.d.ts",
"typings": "./dist/types/index.d.ts",
"style": "./dist/index.css",
"exports": {
".": {
- "types": "./dist/types/index.d.ts",
- "import": "./dist/index.es.js",
- "require": "./dist/index.cjs.js"
+ "import": {
+ "types": "./dist/types/index.d.ts",
+ "default": "./dist/index.es.js"
+ },
+ "require": {
+ "types": "./dist/types/index.d.cts",
+ "default": "./dist/index.cjs"
+ }
},
- "./style.css": "./dist/index.css"
+ "./style.css": "./dist/index.css",
+ "./styles.css": "./dist/index.css",
+ "./package.json": "./package.json"
},
"files": [
"dist",
@@ -61,8 +68,7 @@
},
"type": "module",
"engines": {
- "node": ">=22.16.0",
- "pnpm": ">=10.13.1"
+ "node": ">=18"
},
"scripts": {
"dev": "vite build --watch",
@@ -84,10 +90,13 @@
"typescript": "^5.9.3",
"vite": "^7.3.6",
"vite-plugin-solid": "2.11.14",
- "vitest": "^4.1.11"
+ "vitest": "^4.1.11",
+ "solid-js": "^1.9.15"
},
"dependencies": {
- "@dynamix-layout/core": "workspace:*",
- "solid-js": "^1.9.15"
+ "@dynamix-layout/core": "workspace:*"
+ },
+ "peerDependencies": {
+ "solid-js": "^1.8.0"
}
}
diff --git a/packages/solid/tsconfig.build.json b/packages/solid/tsconfig.build.json
new file mode 100644
index 0000000..5a8c8d2
--- /dev/null
+++ b/packages/solid/tsconfig.build.json
@@ -0,0 +1,9 @@
+{
+ // Declarations resolve @dynamix-layout/core from its built package, as users will.
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "paths": {},
+ "composite": false
+ },
+ "exclude": ["node_modules", "src/test"]
+}
diff --git a/packages/solid/vite.config.ts b/packages/solid/vite.config.ts
index dfa1b7c..1b69acb 100644
--- a/packages/solid/vite.config.ts
+++ b/packages/solid/vite.config.ts
@@ -32,6 +32,20 @@ export default defineConfig({
solidPlugin(),
dts({
outDir: 'dist/types',
+ tsconfigPath: './tsconfig.build.json',
+ // Types-only modules never reach the bundle graph; list sources explicitly.
+ include: ['src'],
+ // One self-contained declaration file (Node16 resolution can't follow
+ // extensionless imports), copied to index.d.cts for `require`.
+ rollupTypes: true,
+ afterBuild: () =>
+ fs.copyFileSync(
+ resolve(__dirname, 'dist/types/index.d.ts'),
+ resolve(__dirname, 'dist/types/index.d.cts')
+ ),
+ // Keep `@dynamix-layout/core` as a package import in the .d.ts files.
+ aliasesExclude: [/^@dynamix-layout\/core/],
+ pathsToAliases: false,
exclude: ['node_modules/**', 'src/test/**'],
staticImport: true,
}),
@@ -49,12 +63,13 @@ export default defineConfig({
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'dynamix.layout.solid',
- fileName: (format) => `index.${format}.js`,
+ // `.cjs` so Node loads the CommonJS build as CommonJS in this `"type": "module"` package.
+ fileName: (format) => (format === 'cjs' ? 'index.cjs' : `index.${format}.js`),
formats: ['es', 'cjs'],
},
cssCodeSplit: true,
rollupOptions: {
- external: ['solid-js', 'solid-js/web', '@dynamix-layout/core'],
+ external: [/^solid-js($|\/)/, /^@dynamix-layout\/core($|\/)/],
output: {
globals: {
'solid-js': 'solidJs',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 74a57ee..42a584b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -580,9 +580,6 @@ importers:
'@dynamix-layout/core':
specifier: workspace:*
version: link:../core
- solid-js:
- specifier: ^1.9.15
- version: 1.9.15
devDependencies:
'@repo/eslint-config':
specifier: workspace:*
@@ -599,6 +596,9 @@ importers:
jsdom:
specifier: ^26.1.0
version: 26.1.0
+ solid-js:
+ specifier: ^1.9.15
+ version: 1.9.15
typescript:
specifier: ^5.9.3
version: 5.9.3
From bb342619bf4366ab70b869aa6eab4fdda2fbd433 Mon Sep 17 00:00:00 2001
From: akash-aman
Date: Mon, 5 Oct 2026 08:12:09 +0530
Subject: [PATCH 2/4] docs: correct the stylesheet import and repository links
---
CONTRIBUTING.md | 4 ++--
README.md | 6 +++---
SECURITY.md | 2 +-
apps/site/src/components/Footer.tsx | 18 +++++++++---------
apps/site/src/components/Header.tsx | 14 +++++++-------
apps/site/src/components/HeroSection.tsx | 2 +-
.../src/components/InstallationSection.tsx | 6 +++---
packages/core/README.md | 2 +-
packages/core/src/index.ts | 2 +-
packages/react/README.md | 6 +++---
10 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6bfa430..1c80565 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,11 +6,11 @@ First off, thank you for considering contributing to Dynamix Layout! It's people
### Reporting Bugs
-If you find a bug, please open an issue on our [GitHub Issues page](https://github.com/akash-aman/dynamix-layout/issues). Please include a clear title and description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
+If you find a bug, please open an issue on our [GitHub Issues page](https://github.com/xcode-studio/dynamix-layout/issues). Please include a clear title and description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
### Suggesting Enhancements
-If you have an idea for an enhancement, please open an issue on our [GitHub Issues page](https://github.com/akash-aman/dynamix-layout/issues). Please provide a clear title and a detailed description of your suggestion.
+If you have an idea for an enhancement, please open an issue on our [GitHub Issues page](https://github.com/xcode-studio/dynamix-layout/issues). Please provide a clear title and a detailed description of your suggestion.
### Pull Requests
diff --git a/README.md b/README.md
index 38ec780..9062275 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@
-
+
@@ -49,7 +49,7 @@ Dynamix Layout is a powerful JavaScript library designed to help you build compl
---
-
+
---
@@ -167,7 +167,7 @@ export default App
## 🤝 Contributing
-Contributions, issues, and feature requests are welcome\! Feel free to check the [issues page](https://github.com/akash-aman/dynamix-layout/issues).
+Contributions, issues, and feature requests are welcome\! Feel free to check the [issues page](https://github.com/xcode-studio/dynamix-layout/issues).
## 📝 License
diff --git a/SECURITY.md b/SECURITY.md
index ac75864..863b5c1 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -6,7 +6,7 @@ The team takes the security of our project seriously. We appreciate your efforts
If you discover a security vulnerability, please report it to us privately. **Do not create a public GitHub issue.**
-We encourage you to report vulnerabilities through **[GitHub's Private Vulnerability Reporting](https://github.com/akash-aman/dynamix-layout/security)** feature. You can do this by going to the "Security" tab of our repository and clicking on "Report a vulnerability".
+We encourage you to report vulnerabilities through **[GitHub's Private Vulnerability Reporting](https://github.com/xcode-studio/dynamix-layout/security)** feature. You can do this by going to the "Security" tab of our repository and clicking on "Report a vulnerability".
Alternatively, you can email us at **[sir.akashaman@gmail.com]**.
diff --git a/apps/site/src/components/Footer.tsx b/apps/site/src/components/Footer.tsx
index 96d5a91..0c13bce 100644
--- a/apps/site/src/components/Footer.tsx
+++ b/apps/site/src/components/Footer.tsx
@@ -60,7 +60,7 @@ const Footer = () => {
@@ -93,7 +93,7 @@ const Header = () => {
asChild
>
@@ -133,7 +133,7 @@ const Header = () => {
Demo
{
Installation
{
asChild
>
diff --git a/apps/site/src/components/HeroSection.tsx b/apps/site/src/components/HeroSection.tsx
index 7fa0c51..12c937a 100644
--- a/apps/site/src/components/HeroSection.tsx
+++ b/apps/site/src/components/HeroSection.tsx
@@ -58,7 +58,7 @@ const HeroSection = () => {
asChild
>
diff --git a/apps/site/src/components/InstallationSection.tsx b/apps/site/src/components/InstallationSection.tsx
index 6dff592..45eccc5 100644
--- a/apps/site/src/components/InstallationSection.tsx
+++ b/apps/site/src/components/InstallationSection.tsx
@@ -301,7 +301,7 @@ export default App`
asChild
>
@@ -314,7 +314,7 @@ export default App`
asChild
>
@@ -322,7 +322,7 @@ export default App`
{/* */}
diff --git a/packages/core/README.md b/packages/core/README.md
index 19e7cbb..8d89746 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -18,7 +18,7 @@
---
-
+
---
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 3fab1b4..33546ca 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -35,7 +35,7 @@ declare const __LICENSE__: string
console.log(`%c${asciiArt}`, titleStyle)
console.log('%c A powerful, dynamic layout system 🚀', textStyle)
console.log(
- '%c ⚡ For docs and more info, \n ⚡ visit: https://github.com/akash-aman/dynamix-layout',
+ '%c ⚡ For docs and more info, \n ⚡ visit: https://github.com/xcode-studio/dynamix-layout',
linkStyle
)
console.log(`%c${__LICENSE__}`, licenseStyle)
diff --git a/packages/react/README.md b/packages/react/README.md
index 0ebaaee..b35ab65 100644
--- a/packages/react/README.md
+++ b/packages/react/README.md
@@ -20,7 +20,7 @@
---
-
+
---
@@ -39,7 +39,7 @@ The easiest way to get started is by using the `` component. Pr
```jsx
import React from 'react'
import { DynamixLayout } from '@dynamix-layout/react'
-import '@dynamix-layout/react/dist/layout.css' // Don't forget to import the default styles
+import '@dynamix-layout/react/style.css' // Don't forget to import the default styles
function App() {
// 1. Define your tabs as an array of [id, component] tuples
@@ -180,7 +180,7 @@ The hook returns an object with everything you need to build your UI, including:
import { tabs } from './comp'
import { DynamixLayout } from '@dynamix-layout/react'
import type { LayoutTree } from '@dynamix-layout/core'
-import '@dynamix-layout/solid/style.css'
+import '@dynamix-layout/react/style.css'
function App() {
From 06510f2e44aeb5288764231cf90ea5f52980668d Mon Sep 17 00:00:00 2001
From: akash-aman
Date: Mon, 5 Oct 2026 08:12:09 +0530
Subject: [PATCH 3/4] docs(core, react, solid): deprecation notes for the APIs
2.0 changes
Marks the props and exports that 2.0 renames or removes as @deprecated,
each naming its replacement and linking the migration guide, so editors
show what to change before upgrading. Solid's props stay in 2.0, so only
updateJSON (new payload) and the slider timeouts are annotated there.
---
packages/core/src/app/comparator.ts | 2 +
packages/core/src/app/dom.ts | 6 ++-
packages/core/src/app/drop-preview.ts | 8 +++-
packages/core/src/app/dynamix.ts | 1 +
packages/core/src/app/node.ts | 2 +
packages/core/src/app/queue.ts | 1 +
packages/core/src/app/reactive-state.ts | 1 +
packages/core/src/type/index.ts | 3 ++
packages/react/src/components/Default.tsx | 7 ++++
packages/react/src/components/Layout.tsx | 1 +
packages/react/src/hooks/useLayout.ts | 1 +
packages/react/src/types/index.ts | 47 +++++++++++++++++++++++
packages/solid/src/types/index.ts | 3 ++
13 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/packages/core/src/app/comparator.ts b/packages/core/src/app/comparator.ts
index 6bd38d3..0782fac 100644
--- a/packages/core/src/app/comparator.ts
+++ b/packages/core/src/app/comparator.ts
@@ -1,5 +1,6 @@
import type { NodeOptions } from '../type'
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export function areNodeOptionsMapEqual(
mapA: Map,
mapB: Map
@@ -18,6 +19,7 @@ export function areNodeOptionsMapEqual(
return true
}
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export function areNodeOptionsEqual(a: NodeOptions, b: NodeOptions): boolean {
if (a.typNode !== b.typNode) return false
if (a.nodName !== b.nodName) return false
diff --git a/packages/core/src/app/dom.ts b/packages/core/src/app/dom.ts
index 7d5b305..3db119d 100644
--- a/packages/core/src/app/dom.ts
+++ b/packages/core/src/app/dom.ts
@@ -1,5 +1,6 @@
import type { Dimension } from '../type'
+/** @deprecated Replaced in 2.0 by `applyRect(element, rect)`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export function setElementRect(el: HTMLElement, { x, y, w, h }: Dimension) {
el.style.left = `${x}px`
el.style.top = `${y}px`
@@ -7,7 +8,10 @@ export function setElementRect(el: HTMLElement, { x, y, w, h }: Dimension) {
el.style.height = `${h}px`
}
-/** Area of a tabset below its tab bar; never negative when squeezed. */
+/**
+ * Area of a tabset below its tab bar; never negative when squeezed.
+ * @deprecated Replaced in 2.0 by `getTabContentRect(tabsetRect, tabBarHeight)`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md
+ */
export function getTabBodyRect(
tabset: Dimension,
tabbarHeight: number
diff --git a/packages/core/src/app/drop-preview.ts b/packages/core/src/app/drop-preview.ts
index 7c25fd9..cb206cc 100644
--- a/packages/core/src/app/drop-preview.ts
+++ b/packages/core/src/app/drop-preview.ts
@@ -22,6 +22,7 @@ const DEFAULT_TAB_GAP = 6
/**
* Splits a tabset into thirds: the outer thirds drop beside it, the middle
* drops into it as a tab.
+ * @deprecated Replaced in 2.0 by `layout.getDropTarget()` and `layout.getDropIndicatorRect()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md
*/
export function getTabsetDropPreview(
rect: PreviewRect,
@@ -60,7 +61,10 @@ export function getTabsetDropPreview(
}
}
-/** The half of the whole layout a root-edge drop would take. */
+/**
+ * The half of the whole layout a root-edge drop would take.
+ * @deprecated Replaced in 2.0 by `layout.getDropTarget()` and `layout.getDropIndicatorRect()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md
+ */
export function getRootSplitPreview(
container: Dimension,
side: RootSide
@@ -93,6 +97,7 @@ export function getRootSplitPreview(
/**
* Insertion marker between the tabs of a tab bar. `index` is the tab the
* marker sits next to. Returns null when the pointer is above or below the bar.
+ * @deprecated Replaced in 2.0 by `layout.getDropTarget()` and `layout.getDropIndicatorRect()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md
*/
export function getNavbarDropPreview(
navbarRect: PreviewRect,
@@ -157,6 +162,7 @@ export function getNavbarDropPreview(
}
}
+/** @deprecated Replaced in 2.0 by `layout.getDropTarget()` and `layout.getDropIndicatorRect()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export function isSameDropPreview(
a: Partial,
b: DropPreview
diff --git a/packages/core/src/app/dynamix.ts b/packages/core/src/app/dynamix.ts
index b593b90..55b8f87 100644
--- a/packages/core/src/app/dynamix.ts
+++ b/packages/core/src/app/dynamix.ts
@@ -17,6 +17,7 @@ import * as geometry from './geometry'
import * as slider from './slider'
import * as treeMutations from './tree-mutations'
+/** @deprecated Replaced in 2.0 by `createLayout(options)`, which returns an independent instance (no static state). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
class Layout {
static get _root(): Node {
return layoutState.root
diff --git a/packages/core/src/app/node.ts b/packages/core/src/app/node.ts
index 610c67e..d09276d 100644
--- a/packages/core/src/app/node.ts
+++ b/packages/core/src/app/node.ts
@@ -4,6 +4,7 @@ import { areNodeOptionsMapEqual } from './comparator'
import { layoutState } from './state'
import type { Dimension, LayoutTree, NodeCache, NodeOptions } from '../type'
+/** @deprecated Internal; removed in 2.0. Read layout state from `layout.getSnapshot()` / `subscribe()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export class Node {
static cache: NodeCache = {
dimMins: new Map(),
@@ -207,6 +208,7 @@ export class Node {
}
}
+/** @deprecated Internal; removed in 2.0. Splitters are `snapshot.splitters`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export class Bond {
dims: Dimension = { w: 0, h: 0, x: 0, y: 0 }
unId: string = layoutState.createId()
diff --git a/packages/core/src/app/queue.ts b/packages/core/src/app/queue.ts
index a554db2..c0e7246 100644
--- a/packages/core/src/app/queue.ts
+++ b/packages/core/src/app/queue.ts
@@ -1,3 +1,4 @@
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
class Queue {
private buffer: (T | undefined)[]
private head: number = 0
diff --git a/packages/core/src/app/reactive-state.ts b/packages/core/src/app/reactive-state.ts
index d973953..f071f55 100644
--- a/packages/core/src/app/reactive-state.ts
+++ b/packages/core/src/app/reactive-state.ts
@@ -1,5 +1,6 @@
import type { ReactiveValue, ChangeListener } from '../type'
+/** @deprecated Internal; removed in 2.0. Use `layout.subscribe()`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
function createReactiveState(
initialValue: T,
comparator: (a: T, b: T) => boolean = (a, b) => a === b
diff --git a/packages/core/src/type/index.ts b/packages/core/src/type/index.ts
index 97b2845..002ca1b 100644
--- a/packages/core/src/type/index.ts
+++ b/packages/core/src/type/index.ts
@@ -1,5 +1,6 @@
import { Node, Bond } from '../app/dynamix'
+/** @deprecated Replaced in 2.0 by `Rect { x, y, width, height }`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type Dimension = {
w: number
h: number
@@ -32,10 +33,12 @@ export interface BaseNode {
nodOpen?: string | boolean
}
+/** @deprecated Replaced in 2.0 by `LayoutJSON` (v1 trees load automatically; `LayoutTreeV1` describes this shape). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type LayoutTree = Omit & {
nodKids?: LayoutTree[]
}
+/** @deprecated Replaced in 2.0 by `TabsetState`, `SplitterState`, `TabState` and `snapshot.rects`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export interface NodeOptions extends BaseNode {
nodKids?: BaseNode[]
}
diff --git a/packages/react/src/components/Default.tsx b/packages/react/src/components/Default.tsx
index c76e70d..ebb5bea 100644
--- a/packages/react/src/components/Default.tsx
+++ b/packages/react/src/components/Default.tsx
@@ -5,6 +5,7 @@ type DefaultWrapTabLabelProps = HTMLAttributes & {
children?: ReactNode
}
+/** @deprecated Renamed in 2.0 to `Tab` (pass it as `components.Tab`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultWrapTabLabel = forwardRef<
HTMLDivElement,
DefaultWrapTabLabelProps
@@ -28,6 +29,7 @@ export const DefaultWrapTabLabel = forwardRef<
))
DefaultWrapTabLabel.displayName = 'DefaultWrapTabLabel'
+/** @deprecated Renamed in 2.0 to `TabContent` (pass it as `components.TabContent`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultWrapTabBody = forwardRef<
HTMLDivElement,
{ children?: ReactNode } & HTMLAttributes
@@ -52,6 +54,7 @@ export const DefaultWrapTabBody = forwardRef<
))
DefaultWrapTabBody.displayName = 'DefaultWrapTabBody'
+/** @deprecated Renamed in 2.0 to `TabBar` (pass it as `components.TabBar`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultWrapTabHead = forwardRef<
HTMLDivElement,
{ children?: ReactNode } & HTMLAttributes
@@ -83,6 +86,7 @@ export const DefaultWrapTabHead = forwardRef<
))
DefaultWrapTabHead.displayName = 'DefaultWrapTabHead'
+/** @deprecated Renamed in 2.0 to `Panel` (pass it as `components.Panel`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultWrapTabPanel = forwardRef<
HTMLDivElement,
{ children?: ReactNode } & HTMLAttributes
@@ -106,6 +110,7 @@ export const DefaultWrapTabPanel = forwardRef<
))
DefaultWrapTabPanel.displayName = 'DefaultWrapTabPanel'
+/** @deprecated Renamed in 2.0 to `DropIndicator` (pass it as `components.DropIndicator`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultHoverElement = forwardRef<
HTMLDivElement,
{ children?: ReactNode } & HTMLAttributes
@@ -141,6 +146,7 @@ type DefaultSliderElementProps = HTMLAttributes & {
direction?: boolean
}
+/** @deprecated Renamed in 2.0 to `Splitter` (pass it as `components.Splitter`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const DefaultSliderElement = forwardRef<
HTMLDivElement,
DefaultSliderElementProps
@@ -216,6 +222,7 @@ export const DefaultSliderElement = forwardRef<
))
DefaultSliderElement.displayName = 'DefaultSliderElement'
+/** @deprecated Renamed in 2.0 to `RootDropZone` (pass it as `components.RootDropZone`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const RootSplitterHoverEl = forwardRef<
HTMLDivElement,
{
diff --git a/packages/react/src/components/Layout.tsx b/packages/react/src/components/Layout.tsx
index 39dcb50..4200c7e 100644
--- a/packages/react/src/components/Layout.tsx
+++ b/packages/react/src/components/Layout.tsx
@@ -19,6 +19,7 @@ import {
} from './Default'
import './layout.css'
+/** @deprecated Internal; removed in 2.0 (tabs are objects with stable ids). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const getTabOutput = (input: TabInput): TabOutput => {
const keys: string[] = []
const maps: Map = new Map()
diff --git a/packages/react/src/hooks/useLayout.ts b/packages/react/src/hooks/useLayout.ts
index 65bbe6e..f8bcdab 100644
--- a/packages/react/src/hooks/useLayout.ts
+++ b/packages/react/src/hooks/useLayout.ts
@@ -16,6 +16,7 @@ import {
import React, { useState, useEffect } from 'react'
import { useDynamixLayoutOptions } from '../types'
+/** @deprecated Internal in 1.x. In 2.0 `useDynamixLayout` is a different, headless hook with prop getters. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export const useDynamixLayout = ({
tabOutput,
rootId,
diff --git a/packages/react/src/types/index.ts b/packages/react/src/types/index.ts
index 7477aa0..7985625 100644
--- a/packages/react/src/types/index.ts
+++ b/packages/react/src/types/index.ts
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react'
import type { LayoutTree, Dimension } from '@dynamix-layout/core'
+/** @deprecated Unused; removed in 2.0 (the name is reused for the 2.0 component props). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export interface DynamixLayoutProps {
children?: ReactNode
layoutTree?: LayoutTree
@@ -9,11 +10,13 @@ export interface DynamixLayoutProps {
style?: React.CSSProperties
}
+/** @deprecated Unused; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export interface UseDynamixLayoutOptions {
initialLayoutTree?: LayoutTree
tabs?: string[]
}
+/** @deprecated Unused; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export interface UseDynamixLayoutResult {
layoutTree: LayoutTree | undefined
tabs: string[]
@@ -21,40 +24,59 @@ export interface UseDynamixLayoutResult {
setLayoutTree: (layoutTree: LayoutTree) => void
}
+/** @deprecated Removed in 2.0; slot components receive typed props. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type DivFC = React.ForwardRefExoticComponent<
React.HTMLAttributes & React.RefAttributes
>
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type TabEntry = {
uqid: string
name: string
node: React.ReactNode
}
+/** @deprecated Replaced in 2.0 by `TabItem[]` (`{ id, title, content }`). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type TabInput = [string, React.ReactNode][]
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export type TabOutput = {
keys: string[]
maps: Map
name: Map
}
+/**
+ * Props of `` in 1.x. Most of them change in 2.0: each
+ * deprecated prop names its replacement, and the migration guide has the
+ * full list (saved layouts keep working): https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md
+ */
export interface LayoutProps {
tabs: [string, ReactNode][]
+ /** @deprecated Replaced in v2 by `showTabBar`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
enableTabbar?: boolean
+ /** @deprecated Replaced in v2 by `components.Panel`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
WrapTabPanel?: DivFC
+ /** @deprecated Replaced in v2 by `components.Tab`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
WrapTabLabel?: React.ForwardRefExoticComponent<
React.HTMLAttributes &
React.RefAttributes & { active?: boolean }
>
+ /** @deprecated Replaced in v2 by `components.TabBar`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
WrapTabHead?: DivFC
+ /** @deprecated Replaced in v2 by `components.TabContent`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
WrapTabBody?: DivFC
+ /** @deprecated Replaced in v2 by `components.DropIndicator`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
HoverElement?: DivFC
+ /** @deprecated Replaced in v2 by `components.Splitter`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
SliderElement?: React.ForwardRefExoticComponent<
React.HTMLAttributes &
React.RefAttributes & { direction?: boolean }
>
+ /** @deprecated Replaced in v2 by `tabBarHeight`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabHeadHeight?: number
+ /** @deprecated Replaced in v2 by `defaultLayout` (or `layout` for controlled mode). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
layoutTree?: LayoutTree
+ /** @deprecated Replaced in v2 by `padding: number | { top, right, bottom, left }`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
pad?: {
t: number
b: number
@@ -63,32 +85,57 @@ export interface LayoutProps {
}
className?: string
style?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `splitterSize`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
bondWidth?: number
+ /** @deprecated Replaced in v2 by `minPanelSize: { width, height }`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
minTabHeight?: number
+ /** @deprecated Replaced in v2 by `minPanelSize: { width, height }`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
minTabWidth?: number
+ /** @deprecated Replaced in v2 by `onLayoutChange(layout, { reason })`, which receives v2 `LayoutJSON` and is not called on mount. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
updateJSON?: (layoutTree: LayoutTree) => void
+ /** @deprecated Replaced in v2 by nothing: splitters update once per animation frame. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
sliderUpdateTimeout?: number
+ /** @deprecated Replaced in v2 by `resizeThrottleMs`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
windowResizeTimeout?: number
+ /** @deprecated Replaced in v2 by nothing: splitters update once per animation frame. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
disableSliderTimeout?: boolean
+ /** @deprecated Replaced in v2 by `resizeThrottleMs`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
disableResizeTimeout?: boolean
+ /** @deprecated Replaced in v2 by `styles.dropIndicator`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
hoverElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.splitter`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
sliderElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.panel`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabPanelElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.tabContent`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabBodyElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.tabBar`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabHeadElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.tab`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabLabelElementStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `styles.rootDropZone`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
RootSplitterHoverElStyles?: React.CSSProperties
+ /** @deprecated Replaced in v2 by `classNames.dropIndicator`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
hoverElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.splitter`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
sliderElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.panel`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabPanelElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.tabContent`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabBodyElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.tabBar`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabHeadElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.tab`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabLabelElementClass?: string
+ /** @deprecated Replaced in v2 by `classNames.rootDropZone`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
RootSplitterHoverElClass?: string
+ /** @deprecated Replaced in v2 by the standard `id` prop. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
rootId?: string
+ /** @deprecated Replaced in v2 by `tabs: { id, title, content }[]`. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
tabNames?: Map
}
+/** @deprecated Internal; removed in 2.0. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
export interface useDynamixLayoutOptions {
tabOutput: TabOutput
rootId?: string
diff --git a/packages/solid/src/types/index.ts b/packages/solid/src/types/index.ts
index aa60099..a997dd8 100644
--- a/packages/solid/src/types/index.ts
+++ b/packages/solid/src/types/index.ts
@@ -68,11 +68,14 @@ export interface LayoutProps {
class?: string
style?: JSX.CSSProperties
bondWidth?: number
+ /** In 2.0 this receives the v2 `LayoutJSON` format instead of `LayoutTree` (v1 layouts passed to `layoutTree` keep loading). See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
updateJSON?: (layoutTree: LayoutTree) => void
minTabHeight?: number
minTabWidth?: number
+ /** @deprecated No effect in 2.0: splitters update once per animation frame. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
sliderUpdateTimeout?: number
windowResizeTimeout?: number
+ /** @deprecated No effect in 2.0: splitters update once per animation frame. See https://github.com/xcode-studio/dynamix-layout/blob/main/docs/migration-v1-to-v2.md */
disableSliderTimeout?: boolean
disableResizeTimeout?: boolean
hoverElementStyles?: JSX.CSSProperties
From a8295a790a99cbf522ca68acd8057b666b401de4 Mon Sep 17 00:00:00 2001
From: akash-aman
Date: Mon, 5 Oct 2026 08:12:09 +0530
Subject: [PATCH 4/4] chore: changeset for the final 1.x patch release
---
.changeset/v1-final-patch.md | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 .changeset/v1-final-patch.md
diff --git a/.changeset/v1-final-patch.md b/.changeset/v1-final-patch.md
new file mode 100644
index 0000000..02937f5
--- /dev/null
+++ b/.changeset/v1-final-patch.md
@@ -0,0 +1,17 @@
+---
+'@dynamix-layout/core': patch
+'@dynamix-layout/react': patch
+'@dynamix-layout/solid': patch
+---
+
+Packaging fixes for 1.x, and deprecation notes ahead of 2.0.
+
+- **React 18 works.** The React bundle no longer inlines React 19's `react/jsx-runtime`, and the peer dependencies are `react` and `react-dom` `^18.0.0 || ^19.0.0` (the `react` peer was `^0.0.1`). The React package's unused IIFE/UMD builds are gone; they weren't reachable through `exports`.
+- **Types resolve.** The published declarations of the React and Solid packages imported `../../../core/src`, a path that doesn't exist in the package, so core types were `any`. Each package now ships one self-contained declaration file, plus `index.d.cts` for CommonJS.
+- **`require()` works.** The CommonJS builds were named `*.cjs.js` in `"type": "module"` packages, so Node loaded them as ESM. They're now `*.cjs`. Core's `browser` field, which pointed at an IIFE without exports, is removed.
+- **Installs on Node 18 and later** (it required Node 22).
+- **Solid:** `solid-js` is a peer dependency, so apps don't end up with two copies.
+- **Docs:**
+ - The README now gives the correct stylesheet path, `@dynamix-layout/react/style.css` (`styles.css` also works).
+ - Repository links point to `xcode-studio/dynamix-layout`.
+- **Deprecations:** the props and exports that 2.0 renames or removes are marked `@deprecated`, each naming its replacement and linking the migration guide. Behaviour is unchanged.