taffy-js 0.2.7 → 0.2.8

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/README.md CHANGED
@@ -325,7 +325,7 @@ interface Point<T> {
325
325
  }
326
326
 
327
327
  // Available space for layout computation
328
- type AvailableSpace = number | "MinContent" | "MaxContent";
328
+ type AvailableSpace = number | "minContent" | "maxContent";
329
329
 
330
330
  // Measure function for custom content measurement
331
331
  type MeasureFunction = (
@@ -346,7 +346,7 @@ const textNode = tree.newLeafWithContext(textStyle, { text: "Hello, World!" });
346
346
 
347
347
  tree.computeLayoutWithMeasure(
348
348
  rootNode,
349
- { width: 800, height: "MaxContent" },
349
+ { width: 800, height: "maxContent" },
350
350
  (known, available, node, context, style) => {
351
351
  if (context?.text) {
352
352
  // Your text measurement logic here
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taffy-js",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "WebAssembly bindings for Taffy layout library",
5
5
  "keywords": [
6
6
  "layout",
package/pkg/README.md CHANGED
@@ -325,7 +325,7 @@ interface Point<T> {
325
325
  }
326
326
 
327
327
  // Available space for layout computation
328
- type AvailableSpace = number | "MinContent" | "MaxContent";
328
+ type AvailableSpace = number | "minContent" | "maxContent";
329
329
 
330
330
  // Measure function for custom content measurement
331
331
  type MeasureFunction = (
@@ -346,7 +346,7 @@ const textNode = tree.newLeafWithContext(textStyle, { text: "Hello, World!" });
346
346
 
347
347
  tree.computeLayoutWithMeasure(
348
348
  rootNode,
349
- { width: 800, height: "MaxContent" },
349
+ { width: 800, height: "maxContent" },
350
350
  (known, available, node, context, style) => {
351
351
  if (context?.text) {
352
352
  // Your text measurement logic here
package/pkg/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "ByteLandTechnology <github@byteland.app>"
6
6
  ],
7
7
  "description": "WebAssembly bindings for Taffy layout library",
8
- "version": "0.9.5",
8
+ "version": "0.9.6",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -62,7 +62,7 @@ export type AvailableSpace = number | "minContent" | "maxContent";
62
62
  *
63
63
  * const availableSize: Size<AvailableSpace> = {
64
64
  * width: 800,
65
- * height: "MaxContent"
65
+ * height: "maxContent"
66
66
  * };
67
67
  * ```
68
68
  */
@@ -1345,10 +1345,10 @@ export class TaffyTree {
1345
1345
  * { width: 800, height: 600 }
1346
1346
  *
1347
1347
  * // Flexible width, fixed height
1348
- * { width: "MaxContent", height: 600 }
1348
+ * { width: "maxContent", height: 600 }
1349
1349
  *
1350
1350
  * // Minimum content size
1351
- * { width: "MinContent", height: "MinContent" }
1351
+ * { width: "minContent", height: "minContent" }
1352
1352
  * ```
1353
1353
  *
1354
1354
  * @throws `TaffyError` if the node does not exist or available space is invalid
@@ -1609,7 +1609,7 @@ export class TaffyTree {
1609
1609
  * ```typescript
1610
1610
  * tree.computeLayoutWithMeasure(
1611
1611
  * rootId,
1612
- * { width: 800, height: "MaxContent" },
1612
+ * { width: 800, height: "maxContent" },
1613
1613
  * (known, available, node, context, style) => {
1614
1614
  * if (context?.text) {
1615
1615
  * const measured = measureText(context.text, available.width);
package/pkg/taffy_wasm.js CHANGED
@@ -1787,10 +1787,10 @@ export class TaffyTree {
1787
1787
  * { width: 800, height: 600 }
1788
1788
  *
1789
1789
  * // Flexible width, fixed height
1790
- * { width: "MaxContent", height: 600 }
1790
+ * { width: "maxContent", height: 600 }
1791
1791
  *
1792
1792
  * // Minimum content size
1793
- * { width: "MinContent", height: "MinContent" }
1793
+ * { width: "minContent", height: "minContent" }
1794
1794
  * ```
1795
1795
  *
1796
1796
  * @throws `TaffyError` if the node does not exist or available space is invalid
@@ -2160,7 +2160,7 @@ export class TaffyTree {
2160
2160
  * ```typescript
2161
2161
  * tree.computeLayoutWithMeasure(
2162
2162
  * rootId,
2163
- * { width: 800, height: "MaxContent" },
2163
+ * { width: 800, height: "maxContent" },
2164
2164
  * (known, available, node, context, style) => {
2165
2165
  * if (context?.text) {
2166
2166
  * const measured = measureText(context.text, available.width);
@@ -2513,10 +2513,6 @@ function __wbg_get_imports() {
2513
2513
  const ret = Error(getStringFromWasm0(arg0, arg1));
2514
2514
  return ret;
2515
2515
  };
2516
- imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
2517
- const ret = Number(arg0);
2518
- return ret;
2519
- };
2520
2516
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
2521
2517
  const ret = String(arg1);
2522
2518
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -2681,7 +2677,7 @@ function __wbg_get_imports() {
2681
2677
  const ret = arg0.length;
2682
2678
  return ret;
2683
2679
  };
2684
- imports.wbg.__wbg_log_274c70cbdd825a00 = function(arg0, arg1) {
2680
+ imports.wbg.__wbg_log_9826028ea7e9105c = function(arg0, arg1) {
2685
2681
  console.log(getStringFromWasm0(arg0, arg1));
2686
2682
  };
2687
2683
  imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
Binary file