{"name":"yoga-layout","version":"2.0.0","author":{"name":"Meta Open Source"},"license":"MIT","_id":"yoga-layout@2.0.0","maintainers":[{"name":"fb","email":"opensource+npm@fb.com"},{"name":"danielbuechele","email":"daniel@buechele.cc"}],"homepage":"https://yogalayout.com/","dist":{"shasum":"bc16073cf82ab0dca3d733a95323ecf3b77d8e85","tarball":"http://registry-npm.ywwl.com/yoga-layout/download/yoga-layout-2.0.0.tgz","fileCount":84,"integrity":"sha512-APqtuj6IOnf4sQ0zqEiob4vw/m4MXSiFplafG3/d3WvzEYRCDl+wedFpprx80pM85UEmw1MlJ+6soid/EykPSg==","signatures":[{"sig":"MEYCIQC2GpOrxfJazZglTg9elHHWI95UYqeXAsFv1jLoP1PziAIhAMl6TE1PEwVsya4ST3nn91xH3m0zVdCio/d4bc7WgM1M","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1480042,"size":474996,"noattachment":false,"key":"/yoga-layout/-/yoga-layout-2.0.0.tgz"},"exports":{".":{"node":"./src/entrypoint/wasm-async-node.ts","browser":"./src/entrypoint/wasm-async-web.ts","default":"./src/entrypoint/asmjs-async-web.ts"},"./sync":{"node":"./src/entrypoint/wasm-sync-node.ts","browser":"./src/entrypoint/asmjs-sync-web.ts","default":"./src/entrypoint/asmjs-sync-web.ts"},"./wasm-sync":{"node":"./src/entrypoint/wasm-sync-node.ts","browser":"./src/entrypoint/wasm-sync-web.ts","default":"./src/entrypoint/wasm-async-web.ts"},"./asmjs-sync":{"node":"./src/entrypoint/asmjs-sync-node.ts","browser":"./src/entrypoint/asmjs-sync-web.ts","default":"./src/entrypoint/asmjs-sync-web.ts"},"./wasm-async":{"node":"./src/entrypoint/wasm-async-node.ts","browser":"./src/entrypoint/wasm-async-web.ts","default":"./src/entrypoint/wasm-async-web.ts"},"./asmjs-async":{"node":"./src/entrypoint/asmjs-async-node.ts","browser":"./src/entrypoint/asmjs-async-web.ts","default":"./src/entrypoint/asmjs-async-web.ts"}},"scripts":{"lint":"just lint","test":"just test","build":"just build","clean":"just clean","prepack":"just prepack","lint:fix":"just lint --fix","benchmark":"just benchmark"},"_npmUser":{"name":"fb","email":"opensource+npm@fb.com"},"repository":{"url":"git@github.com:facebook/yoga.git","type":"git"},"description":"An embeddable and performant flexbox layout engine with bindings for multiple languages","directories":{},"_hasShrinkwrap":false,"devDependencies":{"glob":"^8.0.3","jest":"^29.3.1","which":"^3.0.0","eslint":"^8.30.0","ts-node":"^10.9.1","prettier":"2.8.8","@babel/cli":"^7.20.7","typescript":"5.0.4","@babel/core":"^7.20.7","@babel/node":"^7.20.7","@types/glob":"^8.1.0","@types/jest":"^29.5.1","@types/node":"^16.18.25","@types/which":"^3.0.0","clang-format":"^1.8.0","just-scripts":"^2.1.0","@babel/preset-env":"^7.20.2","eslint-plugin-jest":"^27.1.7","@babel/eslint-parser":"^7.19.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@babel/preset-typescript":"^7.21.4","@typescript-eslint/parser":"^5.30.5","@typescript-eslint/eslint-plugin":"^5.30.5"},"_npmOperationalInternal":{"tmp":"tmp/yoga-layout_2.0.0_1690436107323_0.6276908937275201","host":"s3://npm-registry-packages"},"readme":"# yoga-layout\n\nThis package provides prebuilt WebAssembly bindings for the Yoga layout engine.\n\nSee more at https://yogalayout.dev\n\n## Usage\n\n```ts\nimport {Yoga, Align} from 'yoga-layout';\n\nconst node = Yoga.Node.create();\nnode.setAlignContent(Align.Center);\n```\n\nObjects created by `Yoga.<>.create()` are not automatically garbage collected and should be freed once they are no longer in use.\n\n```ts\n// Free a config\nconfig.free();\n\n// Free a tree of Nodes\nnode.freeRecursive();\n\n// Free a single Node\nnode.free();\n```\n\n## Requirements\n\n`yoga-layout` requires a toolchain that supports ES Modules and top-level await.\n\nIf top-level-await is not supported, use the `yoga-layout/load` entry point instead. This requires to load yoga manually:\n\n```ts\nimport {loadYoga, Align} from 'yoga-layout/load';\n\nconst node = (await loadYoga).Node.create();\nnode.setAlignContent(Align.Center);\n```\n","publish_time":1690436107615,"_cnpm_publish_time":1690436107615,"dist-tags":{"latest":"3.2.1"}}