{"id":18269803,"url":"https://github.com/FluidGroup/TextureSwiftSupport","last_synced_at":"2025-04-04T23:31:31.860Z","repository":{"id":37366534,"uuid":"202891195","full_name":"FluidGroup/TextureSwiftSupport","owner":"FluidGroup","description":"A library that gains Texture(AsyncDisplayKit) more power in Swift.","archived":false,"fork":false,"pushed_at":"2024-04-08T16:19:26.000Z","size":5508,"stargazers_count":237,"open_issues_count":9,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-01T12:47:41.200Z","etag":null,"topics":["asyncdisplaykit","hacktoberfest","swiftui","texture"],"latest_commit_sha":null,"homepage":"https://medium.com/@muukii/creating-ui-with-like-swiftuis-syntax-by-the-power-of-texture-framework-4d6de571ee86","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluidGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-17T14:31:37.000Z","updated_at":"2024-06-18T15:35:10.203Z","dependencies_parsed_at":"2024-06-18T15:44:52.858Z","dependency_job_id":null,"html_url":"https://github.com/FluidGroup/TextureSwiftSupport","commit_stats":null,"previous_names":["texturecommunity/textureswiftsupport"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTextureSwiftSupport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTextureSwiftSupport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTextureSwiftSupport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FTextureSwiftSupport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/TextureSwiftSupport/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266476,"owners_count":20910831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncdisplaykit","hacktoberfest","swiftui","texture"],"created_at":"2024-11-05T11:37:16.022Z","updated_at":"2025-04-04T23:31:29.899Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","readme":"# TextureSwiftSupport - Gains up your productivity\n\nThis is a library to gain **[Texture(AsyncDisplayKit)](http://texturegroup.org/)** more power in Swift.\n\n* Readable Layout DSL\n* Composable components\n\nAnd you might need to use [`TextureBridging`](https://github.com/TextureCommunity/TextureBridging) to integrate with AutoLayout world in your applications.\n\n## Requirements\n\nSwiift 5.3+\n\n## The cases of usage in Production\n\n- the products of [eureka, Inc](https://eure.jp)\n  - [Pairs for Japan](https://apps.apple.com/jp/app/id583376064)\n  - [Pairs for Global](https://apps.apple.com/tw/app/id825433065)\n\n## Layout DSL\n\nUsing [`resultBuilders`](https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md), `ASLayoutSpec` can be more simply and readable it's like SwiftUI's decralations.\n\n\u003e 🕺🏻 [You want to use this in AutoLayout? ](https://github.com/muukii/MondrianLayout)\n\n**Before**\n\n```swift\n\noverride func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -\u003e ASLayoutSpec {\n\n  ASStackLayoutSpec(\n    direction: .vertical,\n    spacing: 0,\n    justifyContent: .start,\n    alignItems: .start,\n    children: [\n      self.textNode1,\n      self.textNode2,\n      self.textNode3,\n    ]\n  )\n  \n}\n```\n\n**After**\n\n```swift\noverride func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -\u003e ASLayoutSpec {\n\n  LayoutSpec {\n    VStackLayout {\n      self.textNode1\n      self.textNode2\n      self.textNode3\n    }\n  }\n  \n}\n```\n\nWrapping with `LayoutSpec` enables us to write DSL inside this block.\n\n\n**More complicated example**\n\n```swift\nLayoutSpec {\n  if flag {\n    VStackLayout {\n      HStackLayout(justifyContent: .center) {\n        iconNode\n          .padding(.top, 24)\n          .padding(.bottom, 16)\n      }\n      .background(gradientNode)\n    }\n  } else {\n    gradientNode\n  }\n}\n```\n\n\u003e ⚠️ Please take care of the differences between this DSL and SwiftUI.  \n\u003e This DSL just describes the node's layout. You should avoid to create a new node inside layout.  \n\u003e Since `layoutSpecThatFits` would be called multiple times.\n\n### Layouts\n\n* Basic Layouts\n  * **VStackLayout**\n  * **HStackLayout**\n  * **ZStackLayout**\n  * **WrapperLayout**\n  * **AbsoluteLayout**\n  * **CenterLayout**\n  * **RelativeLayout**\n  * **InsetLayout**\n  * **OverlayLayout**\n  * **BackgroundLayout**\n  * **AspectRatioLayout**\n  * **SpacerLayout**\n\n* Advanced Layouts\n  * **VGridLayout**\n  * **AnyLayout**\n  * **Switch**\n\n### Modifiers\n\n- WIP\n\n## Composable components\n\n`TextureSwiftSupport` provides us a lot of components that help to create a new component with compositioning from small components.\n\nTechnically, composing increases a number of view or layer in run-time. It might reduce the performance a bit.  \nBut most of the cases, that won't be matters.\n\n* MaskingNode\n* BackgroundNode\n* OverlayNode\n* PaddingNode\n* WrapperCellNode\n* WrapperNode\n* ShapeLayerNode\n* ShapeRenderingNode\n* InteractiveNode\n* AnyDisplayNode\n* GradientNode\n\n## Author\n\nMuukii \u003cmuukii.app@gmail.com\u003e\n","funding_links":[],"categories":["asyncdisplaykit"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFluidGroup%2FTextureSwiftSupport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFluidGroup%2FTextureSwiftSupport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFluidGroup%2FTextureSwiftSupport/lists"}