{"id":"nightcycle/osiris","name":"osiris","scope":"nightcycle","platform":"roblox","description":"Opinionated Strict Iris","version":"0.1.10","latest":"0.1.10","versions":["0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.1.10"],"license":"Apache-2.0","licenseRating":"safe","licenseCaveats":["Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved."],"licenseVerified":true,"dependencies":{"sirmallard/iris":{"version":"^2.5.1","alias":"Iris"}},"integrity":"e98da8e3a027a0e2b85b4c3cabb23a858bffeaa8b2ec4101bb0a7129fdcea181","likes":0,"downloads":0,"install":"forest install nightcycle/osiris","url":"https://forest.dev/p/roblox/nightcycle/osiris","files":"https://api.forest.dev/ai/package/roblox/nightcycle/osiris/files","readme":"# Osiris\r\n\r\nOpinionated Strict [Iris](https://github.com/SirMallard/Iris).\r\n\r\n## Why make this?\r\n\r\nIris is very useful but I feel the syntax of Dear ImGui (the project it's based on + the direct source of most API syntax) is built around an ecosystem with better tooling and a more robust language. We're on Roblox, we can't be as clever. I spoke with the dev of Iris a while back, they're making something really cool - but my project is not meant to be as groundbreaking, it's meant to give me what I want in a couple of hours while utilizing the quality provided generously by them to the community.\r\n\r\n## What'd you do?\r\n\r\nI implemented two specific changes in the pursuit of type safety and auto indenting support.\r\n\r\n### React / Fusion Style Property Tables\r\n\r\nNo more mis-indexing fields.\r\n```luau\r\nOsiris.Widget.Text({\r\n\tArguments = {\r\n\t\tText = \"Hello!\", -- removing this will send you to red line hell\r\n\t},\r\n\tStates = {\r\n\t\ttext = textState,\r\n\t}\r\n})\r\n```\r\nIt also returns the handle with widget specific type annotations if you want to use events.\r\n\r\n### Death to .End()\r\n\r\nI consistently forget to place this damn thing, and even when I do I always had to put `do` / `end` blocks to get the auto code formatter to not flatten out my entire tree. So instead, when the widget has children, there's a mandatory callback function which runs between the construction of the widget and the .End() call internally. Now it formats cleanly, and it even passes itself in as a parameter!\r\n```luau\r\nOsiris.Widget.Window({\r\n\tArguments = {\r\n\t\tTitle = \"Abc123\",\r\n\t},\r\n\tStates = {\r\n\t\tisOpened = isOpenState,\r\n\t},\r\n}, function(windowWidget)\r\n\tOsiris.Widget.Text({\r\n\t\tArguments = {\r\n\t\t\tText = \"Hello!\",\r\n\t\t},\r\n\t\tStates = {\r\n\t\t\ttext = textState,\r\n\t\t}\r\n\t})\r\nend)\r\n```\r\nI'll be honest though, I usually just assign the internal parameter to `_`.\r\n\r\n## Goals\r\n\r\nMy goal is to never crash Iris again with a type error, and to have nice and clean hierarchies of components - thus allowing me to code quicker in a tool where the main selling point is speed of iteration.\r\n\r\n## Future\r\n\r\nI'll probably use this internally, I'll update it as I like. Once the next Iris version comes out I might scrap it as I know it implements some of the stuff I added here.\r\n","readmeTruncated":false}