taffy-layout 1.3.0 → 1.4.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/README.ja-JP.md +5 -5
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/package.json +1 -1
- package/pkg/README.md +5 -5
- package/pkg/taffy_wasm.d.ts +6 -4
- package/pkg/taffy_wasm.js +15 -3
- package/pkg/taffy_wasm_bg.wasm +0 -0
- package/pkg/taffy_wasm_bg.wasm.d.ts +1 -1
package/README.ja-JP.md
CHANGED
|
@@ -99,27 +99,27 @@ console.log(
|
|
|
99
99
|
|
|
100
100
|
レイアウトツリーを管理するメインクラス。
|
|
101
101
|
|
|
102
|
-
[ドキュメントを見る](./docs/classes/TaffyTree.md)
|
|
102
|
+
[ドキュメントを見る](./docs/api/classes/TaffyTree.md)
|
|
103
103
|
|
|
104
104
|
### Style
|
|
105
105
|
|
|
106
106
|
ノードのレイアウトプロパティを設定するオブジェクト。
|
|
107
107
|
|
|
108
|
-
[ドキュメントを見る](./docs/classes/Style.md)
|
|
108
|
+
[ドキュメントを見る](./docs/api/classes/Style.md)
|
|
109
109
|
|
|
110
110
|
### Layout
|
|
111
111
|
|
|
112
112
|
計算後のレイアウト結果 (読み取り専用)。
|
|
113
113
|
|
|
114
|
-
[ドキュメントを見る](./docs/classes/Layout.md)
|
|
114
|
+
[ドキュメントを見る](./docs/api/classes/Layout.md)
|
|
115
115
|
|
|
116
116
|
### 列挙型
|
|
117
117
|
|
|
118
|
-
[ドキュメントを見る](./docs/index.md#enumerations)
|
|
118
|
+
[ドキュメントを見る](./docs/api/index.md#enumerations)
|
|
119
119
|
|
|
120
120
|
### 型エイリアス
|
|
121
121
|
|
|
122
|
-
[ドキュメントを見る](./docs/index.md#type-aliases)
|
|
122
|
+
[ドキュメントを見る](./docs/api/index.md#type-aliases)
|
|
123
123
|
|
|
124
124
|
## 📐 カスタムテキスト計測
|
|
125
125
|
|
package/README.md
CHANGED
|
@@ -99,27 +99,27 @@ console.log(
|
|
|
99
99
|
|
|
100
100
|
The main class for managing layout trees.
|
|
101
101
|
|
|
102
|
-
[View Documentation](./docs/classes/TaffyTree.md)
|
|
102
|
+
[View Documentation](./docs/api/classes/TaffyTree.md)
|
|
103
103
|
|
|
104
104
|
### Style
|
|
105
105
|
|
|
106
106
|
Configuration object for node layout properties.
|
|
107
107
|
|
|
108
|
-
[View Documentation](./docs/classes/Style.md)
|
|
108
|
+
[View Documentation](./docs/api/classes/Style.md)
|
|
109
109
|
|
|
110
110
|
### Layout
|
|
111
111
|
|
|
112
112
|
Read-only computed layout result.
|
|
113
113
|
|
|
114
|
-
[View Documentation](./docs/classes/Layout.md)
|
|
114
|
+
[View Documentation](./docs/api/classes/Layout.md)
|
|
115
115
|
|
|
116
116
|
### Enums
|
|
117
117
|
|
|
118
|
-
[View Documentation](./docs/index.md#enumerations)
|
|
118
|
+
[View Documentation](./docs/api/index.md#enumerations)
|
|
119
119
|
|
|
120
120
|
### Types
|
|
121
121
|
|
|
122
|
-
[View Documentation](./docs/index.md#type-aliases)
|
|
122
|
+
[View Documentation](./docs/api/index.md#type-aliases)
|
|
123
123
|
|
|
124
124
|
## 📐 Custom Text Measurement
|
|
125
125
|
|
package/README.zh-CN.md
CHANGED
|
@@ -99,27 +99,27 @@ console.log(
|
|
|
99
99
|
|
|
100
100
|
管理布局树的核心类。
|
|
101
101
|
|
|
102
|
-
[查看文档](./docs/classes/TaffyTree.md)
|
|
102
|
+
[查看文档](./docs/api/classes/TaffyTree.md)
|
|
103
103
|
|
|
104
104
|
### Style
|
|
105
105
|
|
|
106
106
|
用于配置节点布局属性的对象。
|
|
107
107
|
|
|
108
|
-
[查看文档](./docs/classes/Style.md)
|
|
108
|
+
[查看文档](./docs/api/classes/Style.md)
|
|
109
109
|
|
|
110
110
|
### Layout
|
|
111
111
|
|
|
112
112
|
只读的布局计算结果。
|
|
113
113
|
|
|
114
|
-
[查看文档](./docs/classes/Layout.md)
|
|
114
|
+
[查看文档](./docs/api/classes/Layout.md)
|
|
115
115
|
|
|
116
116
|
### 枚举
|
|
117
117
|
|
|
118
|
-
[查看文档](./docs/index.md#enumerations)
|
|
118
|
+
[查看文档](./docs/api/index.md#enumerations)
|
|
119
119
|
|
|
120
120
|
### 类型别名
|
|
121
121
|
|
|
122
|
-
[查看文档](./docs/index.md#type-aliases)
|
|
122
|
+
[查看文档](./docs/api/index.md#type-aliases)
|
|
123
123
|
|
|
124
124
|
## 📐 自定义文本测量
|
|
125
125
|
|
package/package.json
CHANGED
package/pkg/README.md
CHANGED
|
@@ -99,27 +99,27 @@ console.log(
|
|
|
99
99
|
|
|
100
100
|
The main class for managing layout trees.
|
|
101
101
|
|
|
102
|
-
[View Documentation](./docs/classes/TaffyTree.md)
|
|
102
|
+
[View Documentation](./docs/api/classes/TaffyTree.md)
|
|
103
103
|
|
|
104
104
|
### Style
|
|
105
105
|
|
|
106
106
|
Configuration object for node layout properties.
|
|
107
107
|
|
|
108
|
-
[View Documentation](./docs/classes/Style.md)
|
|
108
|
+
[View Documentation](./docs/api/classes/Style.md)
|
|
109
109
|
|
|
110
110
|
### Layout
|
|
111
111
|
|
|
112
112
|
Read-only computed layout result.
|
|
113
113
|
|
|
114
|
-
[View Documentation](./docs/classes/Layout.md)
|
|
114
|
+
[View Documentation](./docs/api/classes/Layout.md)
|
|
115
115
|
|
|
116
116
|
### Enums
|
|
117
117
|
|
|
118
|
-
[View Documentation](./docs/index.md#enumerations)
|
|
118
|
+
[View Documentation](./docs/api/index.md#enumerations)
|
|
119
119
|
|
|
120
120
|
### Types
|
|
121
121
|
|
|
122
|
-
[View Documentation](./docs/index.md#type-aliases)
|
|
122
|
+
[View Documentation](./docs/api/index.md#type-aliases)
|
|
123
123
|
|
|
124
124
|
## 📐 Custom Text Measurement
|
|
125
125
|
|
package/pkg/taffy_wasm.d.ts
CHANGED
|
@@ -2229,15 +2229,17 @@ export class TaffyTree {
|
|
|
2229
2229
|
*
|
|
2230
2230
|
* @param node - The root node ID to print from
|
|
2231
2231
|
*
|
|
2232
|
+
* @returns - A string representation of the tree structure
|
|
2233
|
+
*
|
|
2232
2234
|
* @example
|
|
2233
2235
|
* ```typescript
|
|
2234
2236
|
* const tree = new TaffyTree();
|
|
2235
2237
|
* const rootId = tree.newLeaf(new Style());
|
|
2236
|
-
* tree.printTree(rootId);
|
|
2237
|
-
*
|
|
2238
|
+
* const output = tree.printTree(rootId);
|
|
2239
|
+
* console.log(output);
|
|
2238
2240
|
* ```
|
|
2239
2241
|
*/
|
|
2240
|
-
printTree(node: bigint):
|
|
2242
|
+
printTree(node: bigint): string;
|
|
2241
2243
|
/**
|
|
2242
2244
|
* Gets the number of children of a node
|
|
2243
2245
|
*
|
|
@@ -3131,7 +3133,7 @@ export interface InitOutput {
|
|
|
3131
3133
|
readonly taffytree_newLeafWithContext: (a: number, b: number, c: any) => [bigint, number, number];
|
|
3132
3134
|
readonly taffytree_newWithChildren: (a: number, b: number, c: number, d: number) => [bigint, number, number];
|
|
3133
3135
|
readonly taffytree_parent: (a: number, b: bigint) => [number, bigint];
|
|
3134
|
-
readonly taffytree_printTree: (a: number, b: bigint) =>
|
|
3136
|
+
readonly taffytree_printTree: (a: number, b: bigint) => [number, number];
|
|
3135
3137
|
readonly taffytree_remove: (a: number, b: bigint) => [bigint, number, number];
|
|
3136
3138
|
readonly taffytree_removeChild: (a: number, b: bigint, c: bigint) => [bigint, number, number];
|
|
3137
3139
|
readonly taffytree_removeChildAtIndex: (a: number, b: bigint, c: number) => [bigint, number, number];
|
package/pkg/taffy_wasm.js
CHANGED
|
@@ -3277,17 +3277,29 @@ export class TaffyTree {
|
|
|
3277
3277
|
*
|
|
3278
3278
|
* @param node - The root node ID to print from
|
|
3279
3279
|
*
|
|
3280
|
+
* @returns - A string representation of the tree structure
|
|
3281
|
+
*
|
|
3280
3282
|
* @example
|
|
3281
3283
|
* ```typescript
|
|
3282
3284
|
* const tree = new TaffyTree();
|
|
3283
3285
|
* const rootId = tree.newLeaf(new Style());
|
|
3284
|
-
* tree.printTree(rootId);
|
|
3285
|
-
*
|
|
3286
|
+
* const output = tree.printTree(rootId);
|
|
3287
|
+
* console.log(output);
|
|
3286
3288
|
* ```
|
|
3287
3289
|
* @param {bigint} node
|
|
3290
|
+
* @returns {string}
|
|
3288
3291
|
*/
|
|
3289
3292
|
printTree(node) {
|
|
3290
|
-
|
|
3293
|
+
let deferred1_0;
|
|
3294
|
+
let deferred1_1;
|
|
3295
|
+
try {
|
|
3296
|
+
const ret = wasm.taffytree_printTree(this.__wbg_ptr, node);
|
|
3297
|
+
deferred1_0 = ret[0];
|
|
3298
|
+
deferred1_1 = ret[1];
|
|
3299
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3300
|
+
} finally {
|
|
3301
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3302
|
+
}
|
|
3291
3303
|
}
|
|
3292
3304
|
/**
|
|
3293
3305
|
* Gets the number of children of a node
|
package/pkg/taffy_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -197,7 +197,7 @@ export const taffytree_newLeaf: (a: number, b: number) => [bigint, number, numbe
|
|
|
197
197
|
export const taffytree_newLeafWithContext: (a: number, b: number, c: any) => [bigint, number, number];
|
|
198
198
|
export const taffytree_newWithChildren: (a: number, b: number, c: number, d: number) => [bigint, number, number];
|
|
199
199
|
export const taffytree_parent: (a: number, b: bigint) => [number, bigint];
|
|
200
|
-
export const taffytree_printTree: (a: number, b: bigint) =>
|
|
200
|
+
export const taffytree_printTree: (a: number, b: bigint) => [number, number];
|
|
201
201
|
export const taffytree_remove: (a: number, b: bigint) => [bigint, number, number];
|
|
202
202
|
export const taffytree_removeChild: (a: number, b: bigint, c: bigint) => [bigint, number, number];
|
|
203
203
|
export const taffytree_removeChildAtIndex: (a: number, b: bigint, c: number) => [bigint, number, number];
|