taffy-layout 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taffy-layout",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "WebAssembly bindings for Taffy layout library",
5
5
  "keywords": [
6
6
  "layout",
@@ -52,10 +52,18 @@
52
52
  "devDependencies": {
53
53
  "@commitlint/cli": "^20.3.0",
54
54
  "@commitlint/config-conventional": "^20.3.0",
55
+ "@semantic-release/changelog": "^6.0.3",
56
+ "@semantic-release/commit-analyzer": "^13.0.1",
57
+ "@semantic-release/git": "^10.0.1",
58
+ "@semantic-release/github": "^12.0.2",
59
+ "@semantic-release/npm": "^13.1.3",
60
+ "@semantic-release/release-notes-generator": "^14.1.0",
55
61
  "@types/node": "^22.0.0",
62
+ "conventional-changelog-conventionalcommits": "^9.1.0",
56
63
  "husky": "^9.1.7",
57
64
  "lint-staged": "^16.2.7",
58
65
  "prettier": "^3.7.4",
66
+ "semantic-release": "^25.0.2",
59
67
  "tsx": "^4.0.0",
60
68
  "typedoc": "^0.28.15",
61
69
  "typedoc-plugin-markdown": "^4.9.0",
package/pkg/README.md CHANGED
@@ -56,7 +56,7 @@ const child1 = tree.newLeaf(childStyle);
56
56
  const child2 = tree.newLeaf(childStyle);
57
57
  const container = tree.newWithChildren(
58
58
  containerStyle,
59
- BigUint64Array.from([child1, child2])
59
+ BigUint64Array.from([child1, child2]),
60
60
  );
61
61
 
62
62
  // Compute layout
@@ -69,10 +69,10 @@ const child2Layout = tree.getLayout(child2);
69
69
 
70
70
  console.log(`Container: ${containerLayout.width}x${containerLayout.height}`);
71
71
  console.log(
72
- `Child 1: ${child1Layout.width}x${child1Layout.height} at (${child1Layout.x}, ${child1Layout.y})`
72
+ `Child 1: ${child1Layout.width}x${child1Layout.height} at (${child1Layout.x}, ${child1Layout.y})`,
73
73
  );
74
74
  console.log(
75
- `Child 2: ${child2Layout.width}x${child2Layout.height} at (${child2Layout.x}, ${child2Layout.y})`
75
+ `Child 2: ${child2Layout.width}x${child2Layout.height} at (${child2Layout.x}, ${child2Layout.y})`,
76
76
  );
77
77
  ```
78
78
 
@@ -128,7 +128,7 @@ tree.computeLayoutWithMeasure(
128
128
  return { width, height };
129
129
  }
130
130
  return { width: 0, height: 0 };
131
- }
131
+ },
132
132
  );
133
133
  ```
134
134
 
@@ -2004,11 +2004,11 @@ export class TaffyTree {
2004
2004
  */
2005
2005
  replaceChildAtIndex(parent: bigint, index: number, newChild: bigint): bigint;
2006
2006
  /**
2007
- * Computes layout with a custom measure function for leaf nodes
2007
+ * Updates the stored layout of the provided node and its children
2008
2008
  *
2009
- * Use this when you have leaf nodes with dynamic content (like text)
2010
- * that needs to be measured during layout. The measure function is
2011
- * called for each leaf node that needs measurement.
2009
+ * The measure function is called for leaf nodes (nodes without children) that
2010
+ * require measurement according to the layout algorithm (Flexbox/Grid).
2011
+ * For example, this is used for text nodes or other content that has intrinsic size.
2012
2012
  *
2013
2013
  * @param node - The root node ID to compute layout for
2014
2014
  * @param availableSpace - The available space constraints
package/pkg/taffy_wasm.js CHANGED
@@ -2739,11 +2739,11 @@ export class TaffyTree {
2739
2739
  return BigInt.asUintN(64, ret[0]);
2740
2740
  }
2741
2741
  /**
2742
- * Computes layout with a custom measure function for leaf nodes
2742
+ * Updates the stored layout of the provided node and its children
2743
2743
  *
2744
- * Use this when you have leaf nodes with dynamic content (like text)
2745
- * that needs to be measured during layout. The measure function is
2746
- * called for each leaf node that needs measurement.
2744
+ * The measure function is called for leaf nodes (nodes without children) that
2745
+ * require measurement according to the layout algorithm (Flexbox/Grid).
2746
+ * For example, this is used for text nodes or other content that has intrinsic size.
2747
2747
  *
2748
2748
  * @param node - The root node ID to compute layout for
2749
2749
  * @param availableSpace - The available space constraints
Binary file
@@ -1,13 +0,0 @@
1
- {
2
- "name": "taffy-wasm",
3
- "version": "0.9.10",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "taffy-wasm",
9
- "version": "0.9.10",
10
- "license": "MIT"
11
- }
12
- }
13
- }