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
17 changes: 17 additions & 0 deletions .changeset/v1-final-patch.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="https://www.npmjs.com/package/@dynamix-layout/core">
<img src="https://img.shields.io/npm/v/@dynamix-layout/core?style=for-the-badge&label=Core" alt="NPM">
</a>
<img src="https://img.shields.io/github/license/akash-aman/dynamix-layout?style=for-the-badge" alt="License">
<img src="https://img.shields.io/github/license/xcode-studio/dynamix-layout?style=for-the-badge" alt="License">
</p>

<p align="center">
Expand Down Expand Up @@ -49,7 +49,7 @@ Dynamix Layout is a powerful JavaScript library designed to help you build compl

---

![Demo](https://raw.githubusercontent.com/akash-aman/dynamix-layout/main/assets/demo1.gif)
![Demo](https://raw.githubusercontent.com/xcode-studio/dynamix-layout/main/assets/demo1.gif)

---

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]**.

Expand Down
18 changes: 9 additions & 9 deletions apps/site/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Footer = () => {
<ul className="space-y-3 text-sm">
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/README.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -70,7 +70,7 @@ const Footer = () => {
</li>
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/tree/main/examples"
href="https://github.com/xcode-studio/dynamix-layout/tree/main/examples"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -80,7 +80,7 @@ const Footer = () => {
</li>
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/packages/core/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/packages/core/README.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -90,7 +90,7 @@ const Footer = () => {
</li>
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/packages/react/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/packages/react/README.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -107,7 +107,7 @@ const Footer = () => {
<ul className="space-y-3 text-sm">
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/issues"
href="https://github.com/xcode-studio/dynamix-layout/issues"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -117,7 +117,7 @@ const Footer = () => {
</li>
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/discussions/44"
href="https://github.com/xcode-studio/dynamix-layout/discussions/44"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -126,13 +126,13 @@ const Footer = () => {
</a>
</li>
{/* <li>
<a href="https://github.com/akash-aman/dynamix-layout/issues" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors">
<a href="https://github.com/xcode-studio/dynamix-layout/issues" target="_blank" rel="noopener noreferrer" className="text-muted-foreground hover:text-primary transition-colors">
Discord
</a>
</li> */}
<li>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/CONTRIBUTING.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/CONTRIBUTING.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand Down Expand Up @@ -228,7 +228,7 @@ const Footer = () => {
asChild
>
<a
href="http://github.com/akash-aman/dynamix-layout"
href="http://github.com/xcode-studio/dynamix-layout"
target="_blank"
rel="noopener noreferrer"
title="GitHub Repository"
Expand Down
14 changes: 7 additions & 7 deletions apps/site/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ const Header = () => {
Demo
</a>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/README.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
>
Docs
</a>
<a
href="https://github.com/akash-aman/dynamix-layout/discussions/44"
href="https://github.com/xcode-studio/dynamix-layout/discussions/44"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -62,7 +62,7 @@ const Header = () => {
{/* Actions */}
<div className="flex items-center gap-3">
<a
href="https://raw.githubusercontent.com/akash-aman/dynamix-layout/refs/heads/main/LICENSE"
href="https://raw.githubusercontent.com/xcode-studio/dynamix-layout/refs/heads/main/LICENSE"
target="_blank"
rel="noopener noreferrer"
>
Expand Down Expand Up @@ -93,7 +93,7 @@ const Header = () => {
asChild
>
<a
href="http://github.com/akash-aman/dynamix-layout"
href="http://github.com/xcode-studio/dynamix-layout"
target="_blank"
rel="noopener noreferrer"
>
Expand Down Expand Up @@ -133,15 +133,15 @@ const Header = () => {
Demo
</a>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/README.md"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
>
Installation
</a>
<a
href="https://github.com/akash-aman/dynamix-layout/issues"
href="https://github.com/xcode-studio/dynamix-layout/issues"
target="_blank"
rel="noopener noreferrer"
className="text-muted-foreground hover:text-primary transition-colors"
Expand All @@ -156,7 +156,7 @@ const Header = () => {
asChild
>
<a
href="http://github.com/akash-aman/dynamix-layout"
href="http://github.com/xcode-studio/dynamix-layout"
target="_blank"
rel="noopener noreferrer"
>
Expand Down
2 changes: 1 addition & 1 deletion apps/site/src/components/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const HeroSection = () => {
asChild
>
<a
href="http://github.com/akash-aman/dynamix-layout"
href="http://github.com/xcode-studio/dynamix-layout"
target="_blank"
rel="noopener noreferrer"
>
Expand Down
6 changes: 3 additions & 3 deletions apps/site/src/components/InstallationSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default App`
asChild
>
<a
href="https://github.com/akash-aman/dynamix-layout/blob/main/README.md"
href="https://github.com/xcode-studio/dynamix-layout/blob/main/README.md"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -314,15 +314,15 @@ export default App`
asChild
>
<a
href="https://github.com/akash-aman/dynamix-layout/tree/main/examples"
href="https://github.com/xcode-studio/dynamix-layout/tree/main/examples"
target="_blank"
rel="noopener noreferrer"
>
Browse Examples
</a>
</Button>
{/* <Button variant="ghost" className="hover:bg-primary/10" asChild>
<a href="https://github.com/akash-aman/dynamix-layout/issues" target="_blank" rel="noopener noreferrer">
<a href="https://github.com/xcode-studio/dynamix-layout/issues" target="_blank" rel="noopener noreferrer">
Join Discord
</a>
</Button> */}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

---

![alt text](https://raw.githubusercontent.com/akash-aman/dynamix-layout/main/assets/demo1.gif)
![alt text](https://raw.githubusercontent.com/xcode-studio/dynamix-layout/main/assets/demo1.gif)

---

Expand Down
19 changes: 11 additions & 8 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -53,8 +57,7 @@
},
"type": "module",
"engines": {
"node": ">=22.16.0",
"pnpm": ">=10.13.1"
"node": ">=18"
},
"scripts": {
"dev": "vite build --watch",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/app/comparator.ts
Original file line number Diff line number Diff line change
@@ -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<string, NodeOptions>,
mapB: Map<string, NodeOptions>
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/app/dom.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
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`
el.style.width = `${w}px`
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
Expand Down
8 changes: 7 additions & 1 deletion packages/core/src/app/drop-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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<DropPreview>,
b: DropPreview
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/app/dynamix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/app/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, { minWidth: number; minHeight: number }>(),
Expand Down Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/app/queue.ts
Original file line number Diff line number Diff line change
@@ -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<T> {
private buffer: (T | undefined)[]
private head: number = 0
Expand Down
Loading
Loading