diff --git a/Documentation/JSON schema guide.md b/Documentation/JSON schema guide.md new file mode 100644 index 0000000..5cfae9d --- /dev/null +++ b/Documentation/JSON schema guide.md @@ -0,0 +1,92 @@ +# JSON schema guide + +This is a reference for the JSON schema provided by Matrioska, which should be followed in order to register `Component`s and build the provided standard components. + +## JSON schemas for `Component` and `ComponentMeta` + +Below you can find a detailed schema for `Component`s and for each configuration (`ComponentMeta`). + +### Component schema + +| Key | Type | Description | +| --- | ---- | ----------- | +| `type` | `String` | The type of the component. Used for factory registration. | + +### StackConfig schema + +| Key | Type | Description | Maps to | Optional | Default value | +| --- | ---- | ----------- | ------- | -------- | ------------- | +| `title` | `String` | The title of the stack. | `title` | Yes | `nil` | +| `spacing` | `Float` | The spacing of the components inside the stack. | `spacing` | Yes | `10` | +| `axis` | `Int` | The orientation of the stack. Can be either `0`(horizontal) or `1`(vertical). | `axis` | Yes | `1` | +| `preserve_parent_width` | `Bool` | Whether the arranged subviews should preserve the parent width or their own intrinsicContentSize. | `preserveParentWidth` | Yes | `false` | +| `background_color` | `String` | The background color of the stack. Alpha and compact forms are not supported. Valid formats: `0x123456` or `123456`. | `backgroundColor` | Yes | `ffffff`(white) | + +### TabBarConfig schema + +| Key | Type | Description | Maps to | Optional | Default value | +| --- | ---- | ----------- | ------- | -------- | ------------- | +| `selected_index` | `Int` | The selected index of the tab bar. | `selectedIndex` | No | . | + +### Tab schema + +| Key | Type | Description | Maps to | Optional | Default value | +| --- | ---- | ----------- | ------- | -------- | ------------- | +| `title` | `String` | The title to display on the tab. | `title` | No | . | +| `icon_name` | `Int` | The name of the icon to display on the tab. | `iconName` | No | . | + +## Example JSON + +``` +{ + "structure": { + "type": "tabbar", + "meta": { + "selected_index": 1 + }, + "children": [{ + "type": "navigation", + "meta": { + "title": "history_title", + "icon_name": "history_tab_icon" + }, + "children": [{ + "type": "stack", + "meta": { + "axis": 1, + "preserve_parent_width": true, + "background_color": "0x123456" + }, + "children": [{ + "type": "table_view" + }] + }] + }, { + "type": "navigation", + "meta": { + "title": "main_tab_title", + "icon_name": "main_tab_icon" + }, + "children": [{ + "type": "stack", + "meta": { + "axis": 1, + "title": "Main stack", + "preserve_parent_width": true, + "spacing": "5" + }, + "children": [{ + "type": "label", + "meta": { + } + }, { + "type": "test_feature", + "meta": { + } + } + ] + }] + }] + } +} +``` diff --git a/Example/MatrioskaExample/TileViewController.swift b/Example/MatrioskaExample/TileViewController.swift index 9be8a29..5a37821 100644 --- a/Example/MatrioskaExample/TileViewController.swift +++ b/Example/MatrioskaExample/TileViewController.swift @@ -9,7 +9,7 @@ import UIKit import Matrioska -struct TileConfig: MaterializableComponentMeta { +struct TileConfig: ExpressibleByComponentMeta { let text: String? let color: UIColor? diff --git a/Example/Podfile.lock b/Example/Podfile.lock index eb8328d..1a59260 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - Matrioska (0.1.0): + - Matrioska (0.1.0-alpha1): - SnapKit (~> 3.0) - - SnapKit (3.0.2) + - SnapKit (3.1.2) DEPENDENCIES: - Matrioska (from `../Matrioska.podspec`) @@ -12,8 +12,8 @@ EXTERNAL SOURCES: :path: "../Matrioska.podspec" SPEC CHECKSUMS: - Matrioska: 872321eb578deb7af60323aa61126ee13e0d3fbd - SnapKit: 2e456761aa92d4d4067a7a5594c18769d451a8ad + Matrioska: b070c1ad36e64bdf7ab9d847033e2a5e4d2b8ec7 + SnapKit: 12b24f569cb7c143acc9c22b9d91b23e7b1c84a2 PODFILE CHECKSUM: b63a58336b9471a5dbe1ffe7ea7d0b94f6dbf667 diff --git a/Example/Pods/Local Podspecs/Matrioska.podspec.json b/Example/Pods/Local Podspecs/Matrioska.podspec.json index 0dae4f0..794e896 100644 --- a/Example/Pods/Local Podspecs/Matrioska.podspec.json +++ b/Example/Pods/Local Podspecs/Matrioska.podspec.json @@ -1,19 +1,19 @@ { "name": "Matrioska", - "version": "0.1.0", - "summary": "Dynamically build UI like if you were playing with dolls 🎎", - "description": "Dynamically build UI like if you were playing with dolls 🎎", + "version": "0.1.0-alpha1", + "summary": "🎎 create your layout and define the content of your app in a simple way", + "description": "The vision of Matrioska is to let you build and prototype your app easily, reusing views and layouts as well as dynamically define the content of your app. With Matrioska you can go as far as specifing the content and layout of your views from an external source (e.g. JSON). With this power you can easily change the structure of your app, do A/B testing, staged rollout or prototype.", "homepage": "https://github.com/runtastic/Matrioska", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { - "Alex Manzella": "alex.manzella@runtastic.com" + "Alex Manzella": "manzopower@icloud.com" }, "source": { "git": "https://github.com/runtastic/Matrioska.git", - "tag": "0.1.0" + "tag": "0.1.0-alpha1" }, "platforms": { "ios": "9.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index eb8328d..1a59260 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,7 +1,7 @@ PODS: - - Matrioska (0.1.0): + - Matrioska (0.1.0-alpha1): - SnapKit (~> 3.0) - - SnapKit (3.0.2) + - SnapKit (3.1.2) DEPENDENCIES: - Matrioska (from `../Matrioska.podspec`) @@ -12,8 +12,8 @@ EXTERNAL SOURCES: :path: "../Matrioska.podspec" SPEC CHECKSUMS: - Matrioska: 872321eb578deb7af60323aa61126ee13e0d3fbd - SnapKit: 2e456761aa92d4d4067a7a5594c18769d451a8ad + Matrioska: b070c1ad36e64bdf7ab9d847033e2a5e4d2b8ec7 + SnapKit: 12b24f569cb7c143acc9c22b9d91b23e7b1c84a2 PODFILE CHECKSUM: b63a58336b9471a5dbe1ffe7ea7d0b94f6dbf667 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index fefea45..ae25a81 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,55 +7,57 @@ objects = { /* Begin PBXBuildFile section */ - 0AE1158E0CDCA687184BB93545E2DDC4 /* ConstraintLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */; }; - 0CA1CC90071A7A0A0FA8AABF9DE4C78A /* ConstraintLayoutSupportDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */; }; - 0D48ACF815644E224F72B7A581662BD6 /* ConstraintMakerRelatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */; }; - 0FF2EDB3BB8E87FC07C96081E1151BC5 /* Matrioska-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F60AEA88E3CE0D8713B97C1DEBA53EBB /* Matrioska-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 153FE752F6AF4C2F16B4251EA307E36E /* ConstraintRelatableTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */; }; + 06416811072A1D77899513B3DD03D435 /* ConstraintConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA8A26EF51D384D2D1E8867E5B73F417 /* ConstraintConfig.swift */; }; + 0A256F0A8255C779467C3F4AC772C548 /* ConstraintMakerRelatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE182E16C1C28038C682A2C6788FAF4E /* ConstraintMakerRelatable.swift */; }; + 0E4D0255D61511AF58C0827A8F6526A9 /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BCB532E3C41609856ED2472531853EC /* ConstraintDescription.swift */; }; + 116A4337585A520E126E822BE0AC0854 /* ClusterLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D91E122D0C780D351532ACDDF7560AFA /* ClusterLayout.swift */; }; + 16DDC2F28AB6C514E860101B5E996793 /* JSONFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBEE224188F8E33F19948160CBAA00EC /* JSONFactory.swift */; }; 181680AEA668ED74498F47D277AFBB65 /* Pods-MatrioskaExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B6EE3F460D1600FAF881B500AD8D239C /* Pods-MatrioskaExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 18F16A18266B47F8F124DFD74D5EED9C /* TabBarCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86396F85619BF19FD0D1DDD19B866116 /* TabBarCluster.swift */; }; - 19B56E02D5A84F8D16A28AE334574232 /* StackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77668395D8EFB67C5E715D53C2A08AEE /* StackViewController.swift */; }; 1A10510204E489B1C3185EF8040C3DDA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 857837F254F449F3BC19F608228401E0 /* Foundation.framework */; }; - 29F69BAABA4AC1D0CF9E6CA60F609CCC /* UILayoutGuide+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */; }; - 2C0043A1DDA0AE4E4294901853AF22B3 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */; }; - 2CC672E1B7B37EB84F9A02F734E53879 /* ConstraintMakerPriortizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */; }; - 38E2ED33D11D9549728E6CEF28CA7194 /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */; }; - 3F5AE1A2680C6E54D7768E00B1344BDF /* Matrioska-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C42CD47B20D9D5D793C8E970404B33AE /* Matrioska-dummy.m */; }; - 40F142876B84DAB8920417AFB8688109 /* UILayoutSupport+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */; }; - 41ACC6E4E446072BB2C881E7D3EB7ABB /* ConstraintView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */; }; - 4D7672BBA85792C78D61FC6B17A785D8 /* ConstraintMakerEditable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */; }; - 509E10C066B9A1A0C78C3A54CBC27503 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */; }; - 5BF4021D104E9A957C93626DE0F638A9 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */; }; - 676D2726F3703B6142FEAD40BD3F29DD /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */; }; - 710422761F48315DFD4EBE7EF2E68A6B /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */; }; - 748B048208C24C3B98FB3C5F933EB165 /* ConstraintViewDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */; }; - 7E355F591692F0A1016762C3601266A0 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90B4839DF75CDC9F2CE552657CFE7D8E /* Component.swift */; }; - 7FC7F65533BF08F10D4782A416FC6F50 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 857837F254F449F3BC19F608228401E0 /* Foundation.framework */; }; - 80341FF83EA6DD4610E49A91E1DB1701 /* ConstraintOffsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */; }; - 874962696034DA9CE3961C347846DC90 /* ClusterLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = C464D9E357EA77A27389A13795C2E4B6 /* ClusterLayout.swift */; }; - 8B7CE694DD754553A38EF971D5A438A3 /* ConstraintLayoutSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */; }; - 919B11B0542F0A0F1941B5498CACA01C /* ConstraintPriorityTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */; }; - 9238134062D063B69407121DDB578C71 /* ConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */; }; - 9E34921BA6D014779714DAA6E21CC611 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 857837F254F449F3BC19F608228401E0 /* Foundation.framework */; }; - A112CD92A536944FE8A8A3CD535F218A /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */; }; - A4DACCE945A0F967C929B82012BF6CA8 /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */; }; - A4FCC43261400C01A901083D79F24471 /* UIColor+HEX.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF73CD5DB0A1A54717A1D51A96F5D7B9 /* UIColor+HEX.swift */; }; - A86DA18E9DD3AF69DBA246F2D1BFE6EA /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */; }; - B068DFA1C842BD5271F562E6703C3CCC /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */; }; - B69B6ED614FBE22D362BA3252D9C0B14 /* IntrinsicSizeAwareScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB9AD5B4352D254970FAAC4B20243037 /* IntrinsicSizeAwareScrollView.swift */; }; - C7AE922401F61979E14738D4FDB0E911 /* ConstraintInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */; }; + 1B1D2DD205BF61F5B07180619C0543BE /* StackCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43962A108464EC534C7D0B705DD5A155 /* StackCluster.swift */; }; + 28BA3D9A1DEBCFD9D48E2E3D25448CC3 /* ConstraintConstantTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 932F64317CB085F5AF53C6822F3EFBC3 /* ConstraintConstantTarget.swift */; }; + 3C61CF88B55F87AC54688F8C0995FBF5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 857837F254F449F3BC19F608228401E0 /* Foundation.framework */; }; + 42342A2A0158936E08C934ACDBA02B06 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F159460515FBA865D897FD0807CDD29 /* ConstraintMaker.swift */; }; + 4924C7266548F0EC3A73D2FA37809D42 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28BB436A3869B5D170660943395D24F6 /* LayoutConstraint.swift */; }; + 4A94F52AEF44432234C1697E69408B14 /* ConstraintMakerPriortizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BA64B4AA54CB104E0213313D7D6D934 /* ConstraintMakerPriortizable.swift */; }; + 4BFEE56751888452EABAD895D3534CB9 /* Matrioska-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E3355B0BCCC9EDD3676AE09A24AC5FFE /* Matrioska-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5749C705A069BE4601E50D3E416B99E3 /* ConstraintMultiplierTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = BADAC8FC48CC6E183B88F09C368DD793 /* ConstraintMultiplierTarget.swift */; }; + 5AC8959915ACEA64DEBA60081B87EF38 /* ConstraintInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F065F60C461CF91942D20D1FF687316 /* ConstraintInsets.swift */; }; + 5B4C918A5B6AEC0FE70E99458443A171 /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 93BBA53E5359D7752DB98E36BC10384F /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5EA2D73E925409110465303E14951E77 /* ConstraintRelatableTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9912385FCF71D8E097B5978DD988FA6B /* ConstraintRelatableTarget.swift */; }; + 6538FE3F4ABE4DA4B2D476B30B061B07 /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCBBA7FFB185B57819C967D8B5AE699E /* Debugging.swift */; }; + 6FBA68991ADF848CD716332D87F684A8 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */; }; + 71B01FA7E17AC528750486C6EE82BA5D /* ConstraintLayoutSupportDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F525860135BB4B15140D581DDBC96C /* ConstraintLayoutSupportDSL.swift */; }; + 74BCA628291BD1F1D4E57A6F77EE914F /* ConstraintLayoutGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B7CD84D6E9F6A3E62717314BF109323 /* ConstraintLayoutGuide.swift */; }; + 7E92628EBEEF5EC1DBE141CE4A484749 /* ConstraintLayoutGuide+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAD45F99697AA414586E26D357E9FA2 /* ConstraintLayoutGuide+Extensions.swift */; }; + 838038DFBA3CE21C79F5B72246FFE6B1 /* TabBarCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8A47693B9CDD5AD4665CBA69F28FEB9 /* TabBarCluster.swift */; }; + 847340DC7B98EA7FB9FBAA59FE084A81 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73DD5EE1A1A00711D127BB0AC7F0CD22 /* ConstraintAttributes.swift */; }; + 880218E912CDFE3A815AB775675C70A5 /* UIColor+HEX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E13A60704984FFCE2EAF3EC6B388889 /* UIColor+HEX.swift */; }; + 89475FD8A492C5A798A98A8F6CD55A1F /* ConstraintMakerExtendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41EF2450D46E21B236466CE3E0CA379D /* ConstraintMakerExtendable.swift */; }; + 96AC89E25C14E0D79ECDD33457BBEDEB /* ConstraintViewDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E30F7EABFBAB46D74E7B19A06B1D7AD /* ConstraintViewDSL.swift */; }; + 9AE3696936FBD5DA311D4CCF51A83D1A /* ConstraintMakerEditable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D5DAD773273C4A7AC377B281E0C0CBB /* ConstraintMakerEditable.swift */; }; + 9C958D72748612ED2520F42C3B61CB36 /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1148FFA3A5A25B895091BDA89E8B6CCF /* SnapKit-dummy.m */; }; + A40E4284C5D1F4D6A8904A4A3EF994E3 /* UILayoutSupport+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393CCE5B4F3EF728057923184C9FD2F9 /* UILayoutSupport+Extensions.swift */; }; + B02ECA8C67AE5F61034993F859285E00 /* ConstraintPriorityTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03E48C3C03E21DAF8B6499ABDA6B1497 /* ConstraintPriorityTarget.swift */; }; + BB5EDFEC222EC5254AD2F4353F1C77A9 /* ConstraintDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 806B03EAD3E4480C34089B4D666AAEF8 /* ConstraintDSL.swift */; }; + BC8E6AB7927C5B26AB8FB33466D36A13 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 857837F254F449F3BC19F608228401E0 /* Foundation.framework */; }; + BCF331A96BE0E6C0C78A9163B678011B /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54AFDD7F5B3230CC0AD71D1A5F8B1315 /* Constraint.swift */; }; + BDB5ACCACD76A93A14353E0877D70D3F /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CFC0E627DA51A2EB7FBFC86ECF8F156 /* Component.swift */; }; + BF9167DBD5A23B820E4584E1B77061B5 /* IntrinsicSizeAwareScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4425C1059FCCD8D526EFE336FBC1DD6D /* IntrinsicSizeAwareScrollView.swift */; }; + C01BE735C49AFBCB4CDAEF9C13DA763C /* LayoutConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A7F8AAA627053DF20188AE787C733CF /* LayoutConstraintItem.swift */; }; + C0A5B37C01480DF77D4ECAF261066231 /* ConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A33EE95C11878E65CD0F5BCF9596B5 /* ConstraintView.swift */; }; + C446120EC4ED3233678F6E3B82BBFEEE /* ConstraintMakerFinalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13798C9B8EAA1DB4A2FB46ED0492D860 /* ConstraintMakerFinalizable.swift */; }; + C8BF641BEDC20159B138EA5CCBA7D9C5 /* ComponentMeta.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3CDF0F230BCF4AE09F8F50427936928 /* ComponentMeta.swift */; }; + CB04034352789C17BB1AC56353242618 /* ConstraintInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22CFC62BB626BFC290A3EB675D0CDB46 /* ConstraintInsetTarget.swift */; }; CBB7C95969423BCFBA41023336DAAAC0 /* Pods-MatrioskaExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5821DC17623EC5E1BCAD99DE87342DB1 /* Pods-MatrioskaExample-dummy.m */; }; - D01597BF824BEBCC49EF670825FF664B /* ConstraintMakerFinalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */; }; - D82C32804457457AAF787544E194BF0F /* ConstraintConstantTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */; }; - E36849B6B379820626DB8E98CD77AEBE /* ConstraintConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */; }; - E8045B16631DC3D0D89AF98CB937E98E /* StackCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 996B2CFA945E1ECA2E39EFCC886C0D9E /* StackCluster.swift */; }; - E8836C5914A7CF593D95540AC88152B6 /* ConstraintMultiplierTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */; }; - E9294CC2D46E7EC701F8D69D0D2BB360 /* ComponentMeta.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CE616969B59014211F07875DEBE4D1A /* ComponentMeta.swift */; }; - EBD364FC2D77B0CEBD95739176AC7554 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */; }; - F42A10C39F9C4369E0097D5F80CAC633 /* ConstraintMakerExtendable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */; }; - F74AF1EEA6215F5DF102CF506E367C2F /* ConstraintInsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */; }; - FACA306DB85B47868AB77D9BA699ED9D /* SnapKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */; }; - FAE12DA5B87E48A626E5D555C9DC925F /* SnapKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CF0DBA68E4F1AB070A87F2197B32107A /* Matrioska-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 215A66ADFE65824C82A3344F1E219AC7 /* Matrioska-dummy.m */; }; + D0199EAB499FD82A471A683D4278DF30 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2FA711CC2C368EEDA5BAD45D4010DA /* ConstraintRelation.swift */; }; + D4E3986BE7F3BB4D2954555A3CB21D14 /* ConstraintLayoutSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2763A0EA2E6A0033D53DCA17D4FAEF8E /* ConstraintLayoutSupport.swift */; }; + D733D8E5668299A4DCE25F2FB732C2D7 /* StackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C594D22569A20B2DD4FD2F791DE3A1F7 /* StackViewController.swift */; }; + DE90136D51F6E27D29B43681CB182D73 /* ConstraintLayoutGuideDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DD880268101FA8A8A4BB8D1395A495E /* ConstraintLayoutGuideDSL.swift */; }; + ED12DB1CA6E5C8F2AD96E5B3CEAD956B /* ConstraintView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7734A45CA95170CC2638E6071C63FD1 /* ConstraintView+Extensions.swift */; }; + F684E98433A87DD19E44C8F30E158204 /* ConstraintOffsetTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7024DC2A56FCE4EA02DEDE4CA4EE46CE /* ConstraintOffsetTarget.swift */; }; + FE669EFBD3F03F1B1F1879D766279766 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81A3F8BE1268CF6F9A6210219DF1712 /* ConstraintItem.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -63,199 +65,189 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 7F92267D248C0DC51DD67F04A8C88D7F; + remoteGlobalIDString = 33CA0B8CC847E9FBE27CFE805028FA4D; remoteInfo = SnapKit; }; 7440F439AF8645D02B61F20D1643A885 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 3816F883EEBF086538810087AE362D33; + remoteGlobalIDString = 40B2396439A10813D8A9CD85474093DC; remoteInfo = Matrioska; }; - 9E1E9DC91E501879E381666B58BCCF73 /* PBXContainerItemProxy */ = { + D4760210B9F94EC3F99F1012282087D6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 7F92267D248C0DC51DD67F04A8C88D7F; + remoteGlobalIDString = 33CA0B8CC847E9FBE27CFE805028FA4D; remoteInfo = SnapKit; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Source/ConstraintAttributes.swift; sourceTree = ""; }; - 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Source/ConstraintMultiplierTarget.swift; sourceTree = ""; }; - 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutSupport+Extensions.swift"; path = "Source/UILayoutSupport+Extensions.swift"; sourceTree = ""; }; - 1367C6F5311D05FDFBA37E96EE514019 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 14426FA5248A96FBC6A531879E24CFA5 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; - 1CE616969B59014211F07875DEBE4D1A /* ComponentMeta.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ComponentMeta.swift; sourceTree = ""; }; - 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Source/ConstraintInsetTarget.swift; sourceTree = ""; }; - 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupport.swift; path = Source/ConstraintLayoutSupport.swift; sourceTree = ""; }; - 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPriortizable.swift; path = Source/ConstraintMakerPriortizable.swift; sourceTree = ""; }; + 02EADA41EDCFDB812BF4ED7298724198 /* SnapKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.xcconfig; sourceTree = ""; }; + 03E48C3C03E21DAF8B6499ABDA6B1497 /* ConstraintPriorityTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriorityTarget.swift; path = Source/ConstraintPriorityTarget.swift; sourceTree = ""; }; + 0DD880268101FA8A8A4BB8D1395A495E /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuideDSL.swift; path = Source/ConstraintLayoutGuideDSL.swift; sourceTree = ""; }; + 0F38C8F99B3F5DB491B0EE1D96B6A068 /* Matrioska.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Matrioska.xcconfig; sourceTree = ""; }; + 1148FFA3A5A25B895091BDA89E8B6CCF /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; + 1367C6F5311D05FDFBA37E96EE514019 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SnapKit.framework; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 13798C9B8EAA1DB4A2FB46ED0492D860 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Source/ConstraintMakerFinalizable.swift; sourceTree = ""; }; + 1BCB532E3C41609856ED2472531853EC /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Source/ConstraintDescription.swift; sourceTree = ""; }; + 1CFC0E627DA51A2EB7FBFC86ECF8F156 /* Component.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = ""; }; + 215A66ADFE65824C82A3344F1E219AC7 /* Matrioska-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Matrioska-dummy.m"; sourceTree = ""; }; + 22CFC62BB626BFC290A3EB675D0CDB46 /* ConstraintInsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsetTarget.swift; path = Source/ConstraintInsetTarget.swift; sourceTree = ""; }; + 248AEA2F21F6DE9363E552EA098662E3 /* SnapKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-prefix.pch"; sourceTree = ""; }; 265D2639CCA0F9886680E5E6CA7A3943 /* Pods-MatrioskaExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MatrioskaExample.release.xcconfig"; sourceTree = ""; }; - 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Source/ConstraintMaker.swift; sourceTree = ""; }; - 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; - 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDSL.swift; path = Source/ConstraintDSL.swift; sourceTree = ""; }; - 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuideDSL.swift; path = Source/ConstraintLayoutGuideDSL.swift; sourceTree = ""; }; - 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; + 2763A0EA2E6A0033D53DCA17D4FAEF8E /* ConstraintLayoutSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupport.swift; path = Source/ConstraintLayoutSupport.swift; sourceTree = ""; }; + 28BB436A3869B5D170660943395D24F6 /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; + 2C2FA711CC2C368EEDA5BAD45D4010DA /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Source/ConstraintRelation.swift; sourceTree = ""; }; + 2D5DAD773273C4A7AC377B281E0C0CBB /* ConstraintMakerEditable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerEditable.swift; path = Source/ConstraintMakerEditable.swift; sourceTree = ""; }; + 34761C5FA66E36E3AA4C0D5643435A84 /* Matrioska.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Matrioska.modulemap; sourceTree = ""; }; + 393CCE5B4F3EF728057923184C9FD2F9 /* UILayoutSupport+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutSupport+Extensions.swift"; path = "Source/UILayoutSupport+Extensions.swift"; sourceTree = ""; }; + 41EF2450D46E21B236466CE3E0CA379D /* ConstraintMakerExtendable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerExtendable.swift; path = Source/ConstraintMakerExtendable.swift; sourceTree = ""; }; + 43962A108464EC534C7D0B705DD5A155 /* StackCluster.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StackCluster.swift; sourceTree = ""; }; + 4425C1059FCCD8D526EFE336FBC1DD6D /* IntrinsicSizeAwareScrollView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeAwareScrollView.swift; sourceTree = ""; }; + 45A33EE95C11878E65CD0F5BCF9596B5 /* ConstraintView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintView.swift; path = Source/ConstraintView.swift; sourceTree = ""; }; + 4BA64B4AA54CB104E0213313D7D6D934 /* ConstraintMakerPriortizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerPriortizable.swift; path = Source/ConstraintMakerPriortizable.swift; sourceTree = ""; }; + 4E13A60704984FFCE2EAF3EC6B388889 /* UIColor+HEX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+HEX.swift"; sourceTree = ""; }; + 4F065F60C461CF91942D20D1FF687316 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Source/ConstraintInsets.swift; sourceTree = ""; }; + 506613B752A33A3A806FA930A7CF602B /* Matrioska-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Matrioska-prefix.pch"; sourceTree = ""; }; + 54AFDD7F5B3230CC0AD71D1A5F8B1315 /* Constraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Constraint.swift; path = Source/Constraint.swift; sourceTree = ""; }; 5821DC17623EC5E1BCAD99DE87342DB1 /* Pods-MatrioskaExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MatrioskaExample-dummy.m"; sourceTree = ""; }; - 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConfig.swift; path = Source/ConstraintConfig.swift; sourceTree = ""; }; - 59EB19EA9AA726833FC7C108CBCEC446 /* Matrioska-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Matrioska-prefix.pch"; sourceTree = ""; }; - 5BA6CD5E29F1E7C8AEC6D24F61B848F4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupportDSL.swift; path = Source/ConstraintLayoutSupportDSL.swift; sourceTree = ""; }; - 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Source/Debugging.swift; sourceTree = ""; }; - 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraint.swift; path = Source/LayoutConstraint.swift; sourceTree = ""; }; - 77668395D8EFB67C5E715D53C2A08AEE /* StackViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StackViewController.swift; sourceTree = ""; }; - 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILayoutGuide+Extensions.swift"; path = "Source/UILayoutGuide+Extensions.swift"; sourceTree = ""; }; - 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Source/ConstraintItem.swift; sourceTree = ""; }; - 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Source/ConstraintRelatableTarget.swift; sourceTree = ""; }; + 64F525860135BB4B15140D581DDBC96C /* ConstraintLayoutSupportDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutSupportDSL.swift; path = Source/ConstraintLayoutSupportDSL.swift; sourceTree = ""; }; + 7024DC2A56FCE4EA02DEDE4CA4EE46CE /* ConstraintOffsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintOffsetTarget.swift; path = Source/ConstraintOffsetTarget.swift; sourceTree = ""; }; + 73DD5EE1A1A00711D127BB0AC7F0CD22 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintAttributes.swift; path = Source/ConstraintAttributes.swift; sourceTree = ""; }; + 798A7BCB4028F09A0F4E7D42CDC35520 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 806B03EAD3E4480C34089B4D666AAEF8 /* ConstraintDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDSL.swift; path = Source/ConstraintDSL.swift; sourceTree = ""; }; 857837F254F449F3BC19F608228401E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 86396F85619BF19FD0D1DDD19B866116 /* TabBarCluster.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TabBarCluster.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerExtendable.swift; path = Source/ConstraintMakerExtendable.swift; sourceTree = ""; }; - 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerRelatable.swift; path = Source/ConstraintMakerRelatable.swift; sourceTree = ""; }; - 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintViewDSL.swift; path = Source/ConstraintViewDSL.swift; sourceTree = ""; }; - 90B4839DF75CDC9F2CE552657CFE7D8E /* Component.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintPriorityTarget.swift; path = Source/ConstraintPriorityTarget.swift; sourceTree = ""; }; - 996B2CFA945E1ECA2E39EFCC886C0D9E /* StackCluster.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StackCluster.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SnapKit-dummy.m"; sourceTree = ""; }; - 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerEditable.swift; path = Source/ConstraintMakerEditable.swift; sourceTree = ""; }; - A15769852F30012902C538DCBE3CDDF7 /* Matrioska.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Matrioska.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8A7F8AAA627053DF20188AE787C733CF /* LayoutConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayoutConstraintItem.swift; path = Source/LayoutConstraintItem.swift; sourceTree = ""; }; + 8B7CD84D6E9F6A3E62717314BF109323 /* ConstraintLayoutGuide.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuide.swift; path = Source/ConstraintLayoutGuide.swift; sourceTree = ""; }; + 8E30F7EABFBAB46D74E7B19A06B1D7AD /* ConstraintViewDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintViewDSL.swift; path = Source/ConstraintViewDSL.swift; sourceTree = ""; }; + 8F159460515FBA865D897FD0807CDD29 /* ConstraintMaker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMaker.swift; path = Source/ConstraintMaker.swift; sourceTree = ""; }; + 932F64317CB085F5AF53C6822F3EFBC3 /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Source/ConstraintConstantTarget.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93BBA53E5359D7752DB98E36BC10384F /* SnapKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SnapKit-umbrella.h"; sourceTree = ""; }; + 9912385FCF71D8E097B5978DD988FA6B /* ConstraintRelatableTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelatableTarget.swift; path = Source/ConstraintRelatableTarget.swift; sourceTree = ""; }; + A15769852F30012902C538DCBE3CDDF7 /* Matrioska.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Matrioska.framework; path = Matrioska.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A77A10AC741F15F2412809F03C82B8FD /* Pods-MatrioskaExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MatrioskaExample.debug.xcconfig"; sourceTree = ""; }; - AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintOffsetTarget.swift; path = Source/ConstraintOffsetTarget.swift; sourceTree = ""; }; - B4E3E0231330567ABB197F1F0DA70261 /* Pods-MatrioskaExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-MatrioskaExample.modulemap"; sourceTree = ""; }; - B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintLayoutGuide.swift; path = Source/ConstraintLayoutGuide.swift; sourceTree = ""; }; + AA8A26EF51D384D2D1E8867E5B73F417 /* ConstraintConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConfig.swift; path = Source/ConstraintConfig.swift; sourceTree = ""; }; + ACAD45F99697AA414586E26D357E9FA2 /* ConstraintLayoutGuide+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintLayoutGuide+Extensions.swift"; path = "Source/ConstraintLayoutGuide+Extensions.swift"; sourceTree = ""; }; + B242F3B275EB519225548E9F142B62AC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B4E3E0231330567ABB197F1F0DA70261 /* Pods-MatrioskaExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-MatrioskaExample.modulemap"; sourceTree = ""; }; + B595FA2F9D098E7C46DFFFAE53FA999D /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SnapKit.modulemap; sourceTree = ""; }; B6EE3F460D1600FAF881B500AD8D239C /* Pods-MatrioskaExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MatrioskaExample-umbrella.h"; sourceTree = ""; }; - B7D4645BD3C0100FB7E1B4A6FDC96E0B /* SnapKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SnapKit.modulemap; sourceTree = ""; }; - BBE9F7101D1F60A5A61A31D6CF1FEB9F /* Pods_MatrioskaExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MatrioskaExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B7734A45CA95170CC2638E6071C63FD1 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Source/ConstraintView+Extensions.swift"; sourceTree = ""; }; + BADAC8FC48CC6E183B88F09C368DD793 /* ConstraintMultiplierTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMultiplierTarget.swift; path = Source/ConstraintMultiplierTarget.swift; sourceTree = ""; }; + BBE9F7101D1F60A5A61A31D6CF1FEB9F /* Pods_MatrioskaExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_MatrioskaExample.framework; path = "Pods-MatrioskaExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; BF2B524D7E160AA0C293D6D884CE4537 /* Pods-MatrioskaExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MatrioskaExample-acknowledgements.plist"; sourceTree = ""; }; - BF6FD1FF6B76CA2F5ED2E314D51E53CF /* Matrioska.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Matrioska.xcconfig; sourceTree = ""; }; - BF73CD5DB0A1A54717A1D51A96F5D7B9 /* UIColor+HEX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+HEX.swift"; sourceTree = ""; }; - C42CD47B20D9D5D793C8E970404B33AE /* Matrioska-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Matrioska-dummy.m"; sourceTree = ""; }; C42E6B36692CB79785C933E25719FA6F /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C464D9E357EA77A27389A13795C2E4B6 /* ClusterLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClusterLayout.swift; sourceTree = ""; }; - C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintRelation.swift; path = Source/ConstraintRelation.swift; sourceTree = ""; }; - CA274E8C59BA433F4975D535FA594EFA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintDescription.swift; path = Source/ConstraintDescription.swift; sourceTree = ""; }; + C594D22569A20B2DD4FD2F791DE3A1F7 /* StackViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StackViewController.swift; sourceTree = ""; }; CCA5B74A364868C16F69B955B38B05DD /* Pods-MatrioskaExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MatrioskaExample-acknowledgements.markdown"; sourceTree = ""; }; CFE99A1044589BB7662A737268BCD6E7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D59F8E5674A96129F9CF53C24D3B27BC /* Matrioska.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Matrioska.modulemap; sourceTree = ""; }; D61CFA974F0733418729D3C1AB335DFA /* Pods-MatrioskaExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MatrioskaExample-frameworks.sh"; sourceTree = ""; }; - D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerFinalizable.swift; path = Source/ConstraintMakerFinalizable.swift; sourceTree = ""; }; - E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ConstraintView+Extensions.swift"; path = "Source/ConstraintView+Extensions.swift"; sourceTree = ""; }; + D81A3F8BE1268CF6F9A6210219DF1712 /* ConstraintItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintItem.swift; path = Source/ConstraintItem.swift; sourceTree = ""; }; + D91E122D0C780D351532ACDDF7560AFA /* ClusterLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ClusterLayout.swift; sourceTree = ""; }; + DBEE224188F8E33F19948160CBAA00EC /* JSONFactory.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = JSONFactory.swift; sourceTree = ""; }; + DE182E16C1C28038C682A2C6788FAF4E /* ConstraintMakerRelatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintMakerRelatable.swift; path = Source/ConstraintMakerRelatable.swift; sourceTree = ""; }; + E3355B0BCCC9EDD3676AE09A24AC5FFE /* Matrioska-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Matrioska-umbrella.h"; sourceTree = ""; }; E6FE901FA384639511979F981151B3D6 /* Pods-MatrioskaExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MatrioskaExample-resources.sh"; sourceTree = ""; }; - E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintInsets.swift; path = Source/ConstraintInsets.swift; sourceTree = ""; }; - E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SnapKit.xcconfig; sourceTree = ""; }; - EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintView.swift; path = Source/ConstraintView.swift; sourceTree = ""; }; - F60AEA88E3CE0D8713B97C1DEBA53EBB /* Matrioska-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Matrioska-umbrella.h"; sourceTree = ""; }; - F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConstraintConstantTarget.swift; path = Source/ConstraintConstantTarget.swift; sourceTree = ""; }; - FB9AD5B4352D254970FAAC4B20243037 /* IntrinsicSizeAwareScrollView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeAwareScrollView.swift; sourceTree = ""; }; + E8A47693B9CDD5AD4665CBA69F28FEB9 /* TabBarCluster.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TabBarCluster.swift; sourceTree = ""; }; + F3CDF0F230BCF4AE09F8F50427936928 /* ComponentMeta.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ComponentMeta.swift; sourceTree = ""; }; + FCBBA7FFB185B57819C967D8B5AE699E /* Debugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debugging.swift; path = Source/Debugging.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 59C3216DA3D2FBFB7F34533B021AB54A /* Frameworks */ = { + 1F4473C9E2AC00059452FCA8E1F17E04 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9E34921BA6D014779714DAA6E21CC611 /* Foundation.framework in Frameworks */, + BC8E6AB7927C5B26AB8FB33466D36A13 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7CAEAACF7FD05F5B0349138336B8858E /* Frameworks */ = { + D0154D10D1FE463563CCBBB532BB1775 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7FC7F65533BF08F10D4782A416FC6F50 /* Foundation.framework in Frameworks */, - 710422761F48315DFD4EBE7EF2E68A6B /* SnapKit.framework in Frameworks */, + 1A10510204E489B1C3185EF8040C3DDA /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D0154D10D1FE463563CCBBB532BB1775 /* Frameworks */ = { + E6EAD0AC8395C49D2A663F921B60D844 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1A10510204E489B1C3185EF8040C3DDA /* Foundation.framework in Frameworks */, + 3C61CF88B55F87AC54688F8C0995FBF5 /* Foundation.framework in Frameworks */, + 6FBA68991ADF848CD716332D87F684A8 /* SnapKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 011F47FBF71151B2B1B20E8272D644CF /* Matrioska */ = { - isa = PBXGroup; - children = ( - 5330007F28B2347B26BAC22427735B72 /* Source */, - 9FBE26A282F72AA8D9B2F668D58BBBF3 /* Support Files */, - ); - name = Matrioska; - path = ../..; - sourceTree = ""; - }; - 05703C849B29D1EF8195C8FE0EC6AF9E /* SnapKit */ = { + 07C9D799D977ED30993956E6822041F4 /* Support Files */ = { isa = PBXGroup; children = ( - 3B90EF7CA55AE01CE50EAF5C3C574CDD /* Constraint.swift */, - 041C7DFD4E40027278BABCCCD69743B2 /* ConstraintAttributes.swift */, - 597734A7EDE6E13F6D1939A7C7373CD1 /* ConstraintConfig.swift */, - F9319AF949935BC0602093E0830E8B10 /* ConstraintConstantTarget.swift */, - CB70FEBA9EF66CAAA461E6F3F819716B /* ConstraintDescription.swift */, - 3FE15693153A62AC79B129BA5FFB7C3D /* ConstraintDSL.swift */, - E855200DC6085FF07EBD87301AD370C9 /* ConstraintInsets.swift */, - 1F2B728DCF7E9F88008827314C2AE823 /* ConstraintInsetTarget.swift */, - 7BEA23F4393572EE30AED50A651CD185 /* ConstraintItem.swift */, - B525F7008B3760076D71FE29C0859BDC /* ConstraintLayoutGuide.swift */, - 446C79107F482F7B2D7E4061657DCA44 /* ConstraintLayoutGuideDSL.swift */, - 212E2771F1CD458D21A0FB3CA1C914F3 /* ConstraintLayoutSupport.swift */, - 6CC7FF80150FA3840AD57BCE994C9FAB /* ConstraintLayoutSupportDSL.swift */, - 3A6167E299BA9862893D87DDBF170B70 /* ConstraintMaker.swift */, - 9F8ECEBD49CA569FC524CB77465180B6 /* ConstraintMakerEditable.swift */, - 8705AFD8FF18225FA8BB0228A69E72AA /* ConstraintMakerExtendable.swift */, - D8AA583273C076DD4A1EBAFDDA0E89A8 /* ConstraintMakerFinalizable.swift */, - 261BC3C65CE6EBBED920977848212F6F /* ConstraintMakerPriortizable.swift */, - 87CCF4DB7EFBDC070B92BFC0BC0D2C8C /* ConstraintMakerRelatable.swift */, - 0729DC38B02A17974FD7A7238FCB1836 /* ConstraintMultiplierTarget.swift */, - AF1BDEFD46348EE8C41DE053AEDBFD1B /* ConstraintOffsetTarget.swift */, - 97F0138AE8EA08984375344610BE7E1E /* ConstraintPriorityTarget.swift */, - 813C2A5263E149C889A2DF40FFDD89BA /* ConstraintRelatableTarget.swift */, - C4C807430C3A7B9A82E2DDD844C58759 /* ConstraintRelation.swift */, - EBCF77FFA89397B4F19B5CD8A7BDB0A3 /* ConstraintView.swift */, - E11295210FBB75091BE22529081A2720 /* ConstraintView+Extensions.swift */, - 8B78113584563565B18CD0248D9D0A93 /* ConstraintViewDSL.swift */, - 737B1700C2C19AD11C2872C1C46EC8D4 /* Debugging.swift */, - 73878F9931EAA78C3DAAF7DDA048218E /* LayoutConstraint.swift */, - 7B4759EEB4180EAF3DA189AAE28199AC /* UILayoutGuide+Extensions.swift */, - 0AB21FA0A2E5B45AB133215CC241236D /* UILayoutSupport+Extensions.swift */, - 458932A7F6390E9028454F0A27A50A13 /* Support Files */, + B242F3B275EB519225548E9F142B62AC /* Info.plist */, + 34761C5FA66E36E3AA4C0D5643435A84 /* Matrioska.modulemap */, + 0F38C8F99B3F5DB491B0EE1D96B6A068 /* Matrioska.xcconfig */, + 215A66ADFE65824C82A3344F1E219AC7 /* Matrioska-dummy.m */, + 506613B752A33A3A806FA930A7CF602B /* Matrioska-prefix.pch */, + E3355B0BCCC9EDD3676AE09A24AC5FFE /* Matrioska-umbrella.h */, ); - path = SnapKit; + name = "Support Files"; + path = "Example/Pods/Target Support Files/Matrioska"; sourceTree = ""; }; - 458932A7F6390E9028454F0A27A50A13 /* Support Files */ = { + 1BD1630D000327EFCD41F9D49FFD154E /* Views */ = { isa = PBXGroup; children = ( - CA274E8C59BA433F4975D535FA594EFA /* Info.plist */, - B7D4645BD3C0100FB7E1B4A6FDC96E0B /* SnapKit.modulemap */, - E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */, - 9F675DF8551ECAD72F0C6D96084C6DD4 /* SnapKit-dummy.m */, - 14426FA5248A96FBC6A531879E24CFA5 /* SnapKit-prefix.pch */, - 50BF4E341DC91F918DC3DD74CA4ADC22 /* SnapKit-umbrella.h */, + 4425C1059FCCD8D526EFE336FBC1DD6D /* IntrinsicSizeAwareScrollView.swift */, + C594D22569A20B2DD4FD2F791DE3A1F7 /* StackViewController.swift */, ); - name = "Support Files"; - path = "../Target Support Files/SnapKit"; + name = Views; + path = Views; sourceTree = ""; }; - 5330007F28B2347B26BAC22427735B72 /* Source */ = { + 4129BAA359D40A3B04EDC388EBCCC7FB /* SnapKit */ = { isa = PBXGroup; children = ( - C464D9E357EA77A27389A13795C2E4B6 /* ClusterLayout.swift */, - 90B4839DF75CDC9F2CE552657CFE7D8E /* Component.swift */, - 1CE616969B59014211F07875DEBE4D1A /* ComponentMeta.swift */, - 996B2CFA945E1ECA2E39EFCC886C0D9E /* StackCluster.swift */, - 86396F85619BF19FD0D1DDD19B866116 /* TabBarCluster.swift */, - 8A1E1FBD297185C40000233E7909F3FB /* Helpers */, - D0642A2099E4BAF3C79FBF2A587950B7 /* Views */, + 54AFDD7F5B3230CC0AD71D1A5F8B1315 /* Constraint.swift */, + 73DD5EE1A1A00711D127BB0AC7F0CD22 /* ConstraintAttributes.swift */, + AA8A26EF51D384D2D1E8867E5B73F417 /* ConstraintConfig.swift */, + 932F64317CB085F5AF53C6822F3EFBC3 /* ConstraintConstantTarget.swift */, + 1BCB532E3C41609856ED2472531853EC /* ConstraintDescription.swift */, + 806B03EAD3E4480C34089B4D666AAEF8 /* ConstraintDSL.swift */, + 4F065F60C461CF91942D20D1FF687316 /* ConstraintInsets.swift */, + 22CFC62BB626BFC290A3EB675D0CDB46 /* ConstraintInsetTarget.swift */, + D81A3F8BE1268CF6F9A6210219DF1712 /* ConstraintItem.swift */, + 8B7CD84D6E9F6A3E62717314BF109323 /* ConstraintLayoutGuide.swift */, + ACAD45F99697AA414586E26D357E9FA2 /* ConstraintLayoutGuide+Extensions.swift */, + 0DD880268101FA8A8A4BB8D1395A495E /* ConstraintLayoutGuideDSL.swift */, + 2763A0EA2E6A0033D53DCA17D4FAEF8E /* ConstraintLayoutSupport.swift */, + 64F525860135BB4B15140D581DDBC96C /* ConstraintLayoutSupportDSL.swift */, + 8F159460515FBA865D897FD0807CDD29 /* ConstraintMaker.swift */, + 2D5DAD773273C4A7AC377B281E0C0CBB /* ConstraintMakerEditable.swift */, + 41EF2450D46E21B236466CE3E0CA379D /* ConstraintMakerExtendable.swift */, + 13798C9B8EAA1DB4A2FB46ED0492D860 /* ConstraintMakerFinalizable.swift */, + 4BA64B4AA54CB104E0213313D7D6D934 /* ConstraintMakerPriortizable.swift */, + DE182E16C1C28038C682A2C6788FAF4E /* ConstraintMakerRelatable.swift */, + BADAC8FC48CC6E183B88F09C368DD793 /* ConstraintMultiplierTarget.swift */, + 7024DC2A56FCE4EA02DEDE4CA4EE46CE /* ConstraintOffsetTarget.swift */, + 03E48C3C03E21DAF8B6499ABDA6B1497 /* ConstraintPriorityTarget.swift */, + 9912385FCF71D8E097B5978DD988FA6B /* ConstraintRelatableTarget.swift */, + 2C2FA711CC2C368EEDA5BAD45D4010DA /* ConstraintRelation.swift */, + 45A33EE95C11878E65CD0F5BCF9596B5 /* ConstraintView.swift */, + B7734A45CA95170CC2638E6071C63FD1 /* ConstraintView+Extensions.swift */, + 8E30F7EABFBAB46D74E7B19A06B1D7AD /* ConstraintViewDSL.swift */, + FCBBA7FFB185B57819C967D8B5AE699E /* Debugging.swift */, + 28BB436A3869B5D170660943395D24F6 /* LayoutConstraint.swift */, + 8A7F8AAA627053DF20188AE787C733CF /* LayoutConstraintItem.swift */, + 393CCE5B4F3EF728057923184C9FD2F9 /* UILayoutSupport+Extensions.swift */, + ED78B8B0724B3FE8B8EEF081A87A318E /* Support Files */, ); - path = Source; + name = SnapKit; + path = SnapKit; sourceTree = ""; }; 6FBBCFDAAB509CB53C9C9421A31BD9FA /* Pods-MatrioskaExample */ = { @@ -276,13 +268,38 @@ path = "Target Support Files/Pods-MatrioskaExample"; sourceTree = ""; }; + 7032839191F8C749414D3AFF4C0AFEFC /* Source */ = { + isa = PBXGroup; + children = ( + 73D084BF9297A29629B7482820E11C9C /* Components */, + 91FACC9FA1CF9266C5175FBEE29EA99D /* Factories */, + BCBFECAA49762A6A2019D199ABA1F49D /* Helpers */, + 1BD1630D000327EFCD41F9D49FFD154E /* Views */, + ); + name = Source; + path = Source; + sourceTree = ""; + }; + 73D084BF9297A29629B7482820E11C9C /* Components */ = { + isa = PBXGroup; + children = ( + D91E122D0C780D351532ACDDF7560AFA /* ClusterLayout.swift */, + 1CFC0E627DA51A2EB7FBFC86ECF8F156 /* Component.swift */, + F3CDF0F230BCF4AE09F8F50427936928 /* ComponentMeta.swift */, + 43962A108464EC534C7D0B705DD5A155 /* StackCluster.swift */, + E8A47693B9CDD5AD4665CBA69F28FEB9 /* TabBarCluster.swift */, + ); + name = Components; + path = Components; + sourceTree = ""; + }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 9396AC7FE706F8EC15E2DB9C156DE03F /* Development Pods */, D8B25C6DF01BE2C3F2FA6A25AEE6417A /* Frameworks */, - FCB3E800ADEFE141C46C6B85E298DF53 /* Pods */, + C9326120DE4E11AA3972219A55E1A8DA /* Pods */, 89FF8C24D82A3BBAAF0E3412465917A7 /* Products */, 9946F224DC42175BA82CE42F1C19DB92 /* Targets Support Files */, ); @@ -298,18 +315,19 @@ name = Products; sourceTree = ""; }; - 8A1E1FBD297185C40000233E7909F3FB /* Helpers */ = { + 91FACC9FA1CF9266C5175FBEE29EA99D /* Factories */ = { isa = PBXGroup; children = ( - BF73CD5DB0A1A54717A1D51A96F5D7B9 /* UIColor+HEX.swift */, + DBEE224188F8E33F19948160CBAA00EC /* JSONFactory.swift */, ); - path = Helpers; + name = Factories; + path = Factories; sourceTree = ""; }; 9396AC7FE706F8EC15E2DB9C156DE03F /* Development Pods */ = { isa = PBXGroup; children = ( - 011F47FBF71151B2B1B20E8272D644CF /* Matrioska */, + B567BDE2AA326D2D2A3773C9A2ACBB04 /* Matrioska */, ); name = "Development Pods"; sourceTree = ""; @@ -322,18 +340,23 @@ name = "Targets Support Files"; sourceTree = ""; }; - 9FBE26A282F72AA8D9B2F668D58BBBF3 /* Support Files */ = { + B567BDE2AA326D2D2A3773C9A2ACBB04 /* Matrioska */ = { isa = PBXGroup; children = ( - 5BA6CD5E29F1E7C8AEC6D24F61B848F4 /* Info.plist */, - D59F8E5674A96129F9CF53C24D3B27BC /* Matrioska.modulemap */, - BF6FD1FF6B76CA2F5ED2E314D51E53CF /* Matrioska.xcconfig */, - C42CD47B20D9D5D793C8E970404B33AE /* Matrioska-dummy.m */, - 59EB19EA9AA726833FC7C108CBCEC446 /* Matrioska-prefix.pch */, - F60AEA88E3CE0D8713B97C1DEBA53EBB /* Matrioska-umbrella.h */, + 7032839191F8C749414D3AFF4C0AFEFC /* Source */, + 07C9D799D977ED30993956E6822041F4 /* Support Files */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/Matrioska"; + name = Matrioska; + path = ../..; + sourceTree = ""; + }; + BCBFECAA49762A6A2019D199ABA1F49D /* Helpers */ = { + isa = PBXGroup; + children = ( + 4E13A60704984FFCE2EAF3EC6B388889 /* UIColor+HEX.swift */, + ); + name = Helpers; + path = Helpers; sourceTree = ""; }; C75C61F59D5032C1A587740F37062DA5 /* iOS */ = { @@ -344,13 +367,12 @@ name = iOS; sourceTree = ""; }; - D0642A2099E4BAF3C79FBF2A587950B7 /* Views */ = { + C9326120DE4E11AA3972219A55E1A8DA /* Pods */ = { isa = PBXGroup; children = ( - FB9AD5B4352D254970FAAC4B20243037 /* IntrinsicSizeAwareScrollView.swift */, - 77668395D8EFB67C5E715D53C2A08AEE /* StackViewController.swift */, + 4129BAA359D40A3B04EDC388EBCCC7FB /* SnapKit */, ); - path = Views; + name = Pods; sourceTree = ""; }; D8B25C6DF01BE2C3F2FA6A25AEE6417A /* Frameworks */ = { @@ -362,30 +384,36 @@ name = Frameworks; sourceTree = ""; }; - FCB3E800ADEFE141C46C6B85E298DF53 /* Pods */ = { + ED78B8B0724B3FE8B8EEF081A87A318E /* Support Files */ = { isa = PBXGroup; children = ( - 05703C849B29D1EF8195C8FE0EC6AF9E /* SnapKit */, + 798A7BCB4028F09A0F4E7D42CDC35520 /* Info.plist */, + B595FA2F9D098E7C46DFFFAE53FA999D /* SnapKit.modulemap */, + 02EADA41EDCFDB812BF4ED7298724198 /* SnapKit.xcconfig */, + 1148FFA3A5A25B895091BDA89E8B6CCF /* SnapKit-dummy.m */, + 248AEA2F21F6DE9363E552EA098662E3 /* SnapKit-prefix.pch */, + 93BBA53E5359D7752DB98E36BC10384F /* SnapKit-umbrella.h */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/SnapKit"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 93DF00053113FC9602080A0A73E73F85 /* Headers */ = { + 6C5BFE6D3C10EC31A9D1289E1A8F547B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - FAE12DA5B87E48A626E5D555C9DC925F /* SnapKit-umbrella.h in Headers */, + 5B4C918A5B6AEC0FE70E99458443A171 /* SnapKit-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D54A246A8F14855D47D7F83EC7C70C03 /* Headers */ = { + A924BA8C697217A762877868BF00209A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 0FF2EDB3BB8E87FC07C96081E1151BC5 /* Matrioska-umbrella.h in Headers */, + 4BFEE56751888452EABAD895D3534CB9 /* Matrioska-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -419,39 +447,39 @@ productReference = BBE9F7101D1F60A5A61A31D6CF1FEB9F /* Pods_MatrioskaExample.framework */; productType = "com.apple.product-type.framework"; }; - 3816F883EEBF086538810087AE362D33 /* Matrioska */ = { + 33CA0B8CC847E9FBE27CFE805028FA4D /* SnapKit */ = { isa = PBXNativeTarget; - buildConfigurationList = 08FD2885A6C888E60B5F422919B65046 /* Build configuration list for PBXNativeTarget "Matrioska" */; + buildConfigurationList = 7EC48A2E5553FCE544F55F942211500A /* Build configuration list for PBXNativeTarget "SnapKit" */; buildPhases = ( - 50EB1FACAD58412C7382C53DD34AB7E6 /* Sources */, - 7CAEAACF7FD05F5B0349138336B8858E /* Frameworks */, - D54A246A8F14855D47D7F83EC7C70C03 /* Headers */, + 10A0FA9B36862B1C8EE0C95327E058E6 /* Sources */, + 1F4473C9E2AC00059452FCA8E1F17E04 /* Frameworks */, + 6C5BFE6D3C10EC31A9D1289E1A8F547B /* Headers */, ); buildRules = ( ); dependencies = ( - A53A4B5FBBA7CBB164759FE82EC8318A /* PBXTargetDependency */, ); - name = Matrioska; - productName = Matrioska; - productReference = A15769852F30012902C538DCBE3CDDF7 /* Matrioska.framework */; + name = SnapKit; + productName = SnapKit; + productReference = 1367C6F5311D05FDFBA37E96EE514019 /* SnapKit.framework */; productType = "com.apple.product-type.framework"; }; - 7F92267D248C0DC51DD67F04A8C88D7F /* SnapKit */ = { + 40B2396439A10813D8A9CD85474093DC /* Matrioska */ = { isa = PBXNativeTarget; - buildConfigurationList = E6C321BAD2A9074A4477A3D3384A0169 /* Build configuration list for PBXNativeTarget "SnapKit" */; + buildConfigurationList = 469A8B172273C74432E39C05CEE37D47 /* Build configuration list for PBXNativeTarget "Matrioska" */; buildPhases = ( - 8E8DED1B865F8B62A1B83D6B5396DFA7 /* Sources */, - 59C3216DA3D2FBFB7F34533B021AB54A /* Frameworks */, - 93DF00053113FC9602080A0A73E73F85 /* Headers */, + 85AE76FABC78424F35359AAAD7270D38 /* Sources */, + E6EAD0AC8395C49D2A663F921B60D844 /* Frameworks */, + A924BA8C697217A762877868BF00209A /* Headers */, ); buildRules = ( ); dependencies = ( + 5C3989074DD6C4A05F4C4FA0D62E2DD6 /* PBXTargetDependency */, ); - name = SnapKit; - productName = SnapKit; - productReference = 1367C6F5311D05FDFBA37E96EE514019 /* SnapKit.framework */; + name = Matrioska; + productName = Matrioska; + productReference = A15769852F30012902C538DCBE3CDDF7 /* Matrioska.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -475,66 +503,68 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 3816F883EEBF086538810087AE362D33 /* Matrioska */, + 40B2396439A10813D8A9CD85474093DC /* Matrioska */, 2C79BD22007D5C4563E92D122F63A24D /* Pods-MatrioskaExample */, - 7F92267D248C0DC51DD67F04A8C88D7F /* SnapKit */, + 33CA0B8CC847E9FBE27CFE805028FA4D /* SnapKit */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 50EB1FACAD58412C7382C53DD34AB7E6 /* Sources */ = { + 10A0FA9B36862B1C8EE0C95327E058E6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 874962696034DA9CE3961C347846DC90 /* ClusterLayout.swift in Sources */, - 7E355F591692F0A1016762C3601266A0 /* Component.swift in Sources */, - E9294CC2D46E7EC701F8D69D0D2BB360 /* ComponentMeta.swift in Sources */, - B69B6ED614FBE22D362BA3252D9C0B14 /* IntrinsicSizeAwareScrollView.swift in Sources */, - 3F5AE1A2680C6E54D7768E00B1344BDF /* Matrioska-dummy.m in Sources */, - E8045B16631DC3D0D89AF98CB937E98E /* StackCluster.swift in Sources */, - 19B56E02D5A84F8D16A28AE334574232 /* StackViewController.swift in Sources */, - 18F16A18266B47F8F124DFD74D5EED9C /* TabBarCluster.swift in Sources */, - A4FCC43261400C01A901083D79F24471 /* UIColor+HEX.swift in Sources */, + BCF331A96BE0E6C0C78A9163B678011B /* Constraint.swift in Sources */, + 847340DC7B98EA7FB9FBAA59FE084A81 /* ConstraintAttributes.swift in Sources */, + 06416811072A1D77899513B3DD03D435 /* ConstraintConfig.swift in Sources */, + 28BA3D9A1DEBCFD9D48E2E3D25448CC3 /* ConstraintConstantTarget.swift in Sources */, + 0E4D0255D61511AF58C0827A8F6526A9 /* ConstraintDescription.swift in Sources */, + BB5EDFEC222EC5254AD2F4353F1C77A9 /* ConstraintDSL.swift in Sources */, + 5AC8959915ACEA64DEBA60081B87EF38 /* ConstraintInsets.swift in Sources */, + CB04034352789C17BB1AC56353242618 /* ConstraintInsetTarget.swift in Sources */, + FE669EFBD3F03F1B1F1879D766279766 /* ConstraintItem.swift in Sources */, + 7E92628EBEEF5EC1DBE141CE4A484749 /* ConstraintLayoutGuide+Extensions.swift in Sources */, + 74BCA628291BD1F1D4E57A6F77EE914F /* ConstraintLayoutGuide.swift in Sources */, + DE90136D51F6E27D29B43681CB182D73 /* ConstraintLayoutGuideDSL.swift in Sources */, + D4E3986BE7F3BB4D2954555A3CB21D14 /* ConstraintLayoutSupport.swift in Sources */, + 71B01FA7E17AC528750486C6EE82BA5D /* ConstraintLayoutSupportDSL.swift in Sources */, + 42342A2A0158936E08C934ACDBA02B06 /* ConstraintMaker.swift in Sources */, + 9AE3696936FBD5DA311D4CCF51A83D1A /* ConstraintMakerEditable.swift in Sources */, + 89475FD8A492C5A798A98A8F6CD55A1F /* ConstraintMakerExtendable.swift in Sources */, + C446120EC4ED3233678F6E3B82BBFEEE /* ConstraintMakerFinalizable.swift in Sources */, + 4A94F52AEF44432234C1697E69408B14 /* ConstraintMakerPriortizable.swift in Sources */, + 0A256F0A8255C779467C3F4AC772C548 /* ConstraintMakerRelatable.swift in Sources */, + 5749C705A069BE4601E50D3E416B99E3 /* ConstraintMultiplierTarget.swift in Sources */, + F684E98433A87DD19E44C8F30E158204 /* ConstraintOffsetTarget.swift in Sources */, + B02ECA8C67AE5F61034993F859285E00 /* ConstraintPriorityTarget.swift in Sources */, + 5EA2D73E925409110465303E14951E77 /* ConstraintRelatableTarget.swift in Sources */, + D0199EAB499FD82A471A683D4278DF30 /* ConstraintRelation.swift in Sources */, + ED12DB1CA6E5C8F2AD96E5B3CEAD956B /* ConstraintView+Extensions.swift in Sources */, + C0A5B37C01480DF77D4ECAF261066231 /* ConstraintView.swift in Sources */, + 96AC89E25C14E0D79ECDD33457BBEDEB /* ConstraintViewDSL.swift in Sources */, + 6538FE3F4ABE4DA4B2D476B30B061B07 /* Debugging.swift in Sources */, + 4924C7266548F0EC3A73D2FA37809D42 /* LayoutConstraint.swift in Sources */, + C01BE735C49AFBCB4CDAEF9C13DA763C /* LayoutConstraintItem.swift in Sources */, + 9C958D72748612ED2520F42C3B61CB36 /* SnapKit-dummy.m in Sources */, + A40E4284C5D1F4D6A8904A4A3EF994E3 /* UILayoutSupport+Extensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8E8DED1B865F8B62A1B83D6B5396DFA7 /* Sources */ = { + 85AE76FABC78424F35359AAAD7270D38 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5BF4021D104E9A957C93626DE0F638A9 /* Constraint.swift in Sources */, - 509E10C066B9A1A0C78C3A54CBC27503 /* ConstraintAttributes.swift in Sources */, - E36849B6B379820626DB8E98CD77AEBE /* ConstraintConfig.swift in Sources */, - D82C32804457457AAF787544E194BF0F /* ConstraintConstantTarget.swift in Sources */, - A112CD92A536944FE8A8A3CD535F218A /* ConstraintDescription.swift in Sources */, - A4DACCE945A0F967C929B82012BF6CA8 /* ConstraintDSL.swift in Sources */, - C7AE922401F61979E14738D4FDB0E911 /* ConstraintInsets.swift in Sources */, - F74AF1EEA6215F5DF102CF506E367C2F /* ConstraintInsetTarget.swift in Sources */, - B068DFA1C842BD5271F562E6703C3CCC /* ConstraintItem.swift in Sources */, - 0AE1158E0CDCA687184BB93545E2DDC4 /* ConstraintLayoutGuide.swift in Sources */, - 38E2ED33D11D9549728E6CEF28CA7194 /* ConstraintLayoutGuideDSL.swift in Sources */, - 8B7CE694DD754553A38EF971D5A438A3 /* ConstraintLayoutSupport.swift in Sources */, - 0CA1CC90071A7A0A0FA8AABF9DE4C78A /* ConstraintLayoutSupportDSL.swift in Sources */, - EBD364FC2D77B0CEBD95739176AC7554 /* ConstraintMaker.swift in Sources */, - 4D7672BBA85792C78D61FC6B17A785D8 /* ConstraintMakerEditable.swift in Sources */, - F42A10C39F9C4369E0097D5F80CAC633 /* ConstraintMakerExtendable.swift in Sources */, - D01597BF824BEBCC49EF670825FF664B /* ConstraintMakerFinalizable.swift in Sources */, - 2CC672E1B7B37EB84F9A02F734E53879 /* ConstraintMakerPriortizable.swift in Sources */, - 0D48ACF815644E224F72B7A581662BD6 /* ConstraintMakerRelatable.swift in Sources */, - E8836C5914A7CF593D95540AC88152B6 /* ConstraintMultiplierTarget.swift in Sources */, - 80341FF83EA6DD4610E49A91E1DB1701 /* ConstraintOffsetTarget.swift in Sources */, - 919B11B0542F0A0F1941B5498CACA01C /* ConstraintPriorityTarget.swift in Sources */, - 153FE752F6AF4C2F16B4251EA307E36E /* ConstraintRelatableTarget.swift in Sources */, - A86DA18E9DD3AF69DBA246F2D1BFE6EA /* ConstraintRelation.swift in Sources */, - 41ACC6E4E446072BB2C881E7D3EB7ABB /* ConstraintView+Extensions.swift in Sources */, - 9238134062D063B69407121DDB578C71 /* ConstraintView.swift in Sources */, - 748B048208C24C3B98FB3C5F933EB165 /* ConstraintViewDSL.swift in Sources */, - 676D2726F3703B6142FEAD40BD3F29DD /* Debugging.swift in Sources */, - 2C0043A1DDA0AE4E4294901853AF22B3 /* LayoutConstraint.swift in Sources */, - FACA306DB85B47868AB77D9BA699ED9D /* SnapKit-dummy.m in Sources */, - 29F69BAABA4AC1D0CF9E6CA60F609CCC /* UILayoutGuide+Extensions.swift in Sources */, - 40F142876B84DAB8920417AFB8688109 /* UILayoutSupport+Extensions.swift in Sources */, + 116A4337585A520E126E822BE0AC0854 /* ClusterLayout.swift in Sources */, + BDB5ACCACD76A93A14353E0877D70D3F /* Component.swift in Sources */, + C8BF641BEDC20159B138EA5CCBA7D9C5 /* ComponentMeta.swift in Sources */, + BF9167DBD5A23B820E4584E1B77061B5 /* IntrinsicSizeAwareScrollView.swift in Sources */, + 16DDC2F28AB6C514E860101B5E996793 /* JSONFactory.swift in Sources */, + CF0DBA68E4F1AB070A87F2197B32107A /* Matrioska-dummy.m in Sources */, + 1B1D2DD205BF61F5B07180619C0543BE /* StackCluster.swift in Sources */, + D733D8E5668299A4DCE25F2FB732C2D7 /* StackViewController.swift in Sources */, + 838038DFBA3CE21C79F5B72246FFE6B1 /* TabBarCluster.swift in Sources */, + 880218E912CDFE3A815AB775675C70A5 /* UIColor+HEX.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -552,33 +582,33 @@ 0C717DA8BFFEA61C11AB7002E676EE17 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Matrioska; - target = 3816F883EEBF086538810087AE362D33 /* Matrioska */; + target = 40B2396439A10813D8A9CD85474093DC /* Matrioska */; targetProxy = 7440F439AF8645D02B61F20D1643A885 /* PBXContainerItemProxy */; }; - 6D1618E2795150E483E2A433184E2D89 /* PBXTargetDependency */ = { + 5C3989074DD6C4A05F4C4FA0D62E2DD6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SnapKit; - target = 7F92267D248C0DC51DD67F04A8C88D7F /* SnapKit */; - targetProxy = 3E93AD9B0F4F0B3C9EF92737F046F730 /* PBXContainerItemProxy */; + target = 33CA0B8CC847E9FBE27CFE805028FA4D /* SnapKit */; + targetProxy = D4760210B9F94EC3F99F1012282087D6 /* PBXContainerItemProxy */; }; - A53A4B5FBBA7CBB164759FE82EC8318A /* PBXTargetDependency */ = { + 6D1618E2795150E483E2A433184E2D89 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SnapKit; - target = 7F92267D248C0DC51DD67F04A8C88D7F /* SnapKit */; - targetProxy = 9E1E9DC91E501879E381666B58BCCF73 /* PBXContainerItemProxy */; + target = 33CA0B8CC847E9FBE27CFE805028FA4D /* SnapKit */; + targetProxy = 3E93AD9B0F4F0B3C9EF92737F046F730 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 18A6BC3CC1A9EC1164A84E2BE33A7B61 /* Release */ = { + 40652EA2660409BFBEAE3D7BAD61778E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */; + baseConfigurationReference = 02EADA41EDCFDB812BF4ED7298724198 /* SnapKit.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -591,16 +621,17 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = SnapKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; 56C9D3A1929A0137945B6C0547DFCE26 /* Release */ = { isa = XCBuildConfiguration; @@ -681,9 +712,9 @@ }; name = Debug; }; - 9AB3C3C9A96D60B82285927CD79B5379 /* Debug */ = { + 71BC9CE5140D3CAFAD76A525615099F2 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A77A10AC741F15F2412809F03C82B8FD /* Pods-MatrioskaExample.debug.xcconfig */; + baseConfigurationReference = 0F38C8F99B3F5DB491B0EE1D96B6A068 /* Matrioska.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -696,30 +727,59 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MatrioskaExample/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Matrioska/Matrioska-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Matrioska/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MatrioskaExample/Pods-MatrioskaExample.modulemap"; + MODULEMAP_FILE = "Target Support Files/Matrioska/Matrioska.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MatrioskaExample; + PRODUCT_NAME = Matrioska; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - B44CEB594B638BAC181EACCDB5DD143A /* Debug */ = { + 7BF1250C7DF8EB49FE5E4B610AB43E2B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 02EADA41EDCFDB812BF4ED7298724198 /* SnapKit.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/SnapKit/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = SnapKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9AB3C3C9A96D60B82285927CD79B5379 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF6FD1FF6B76CA2F5ED2E314D51E53CF /* Matrioska.xcconfig */; + baseConfigurationReference = A77A10AC741F15F2412809F03C82B8FD /* Pods-MatrioskaExample.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -732,18 +792,21 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Matrioska/Matrioska-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Matrioska/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MatrioskaExample/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Matrioska/Matrioska.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MatrioskaExample/Pods-MatrioskaExample.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Matrioska; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MatrioskaExample; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -790,9 +853,9 @@ }; name = Release; }; - D798C0C62D2135978557322E07E6A44E /* Release */ = { + CA9963F868F92C27EFB4DDDACC203657 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF6FD1FF6B76CA2F5ED2E314D51E53CF /* Matrioska.xcconfig */; + baseConfigurationReference = 0F38C8F99B3F5DB491B0EE1D96B6A068 /* Matrioska.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -822,65 +885,32 @@ }; name = Release; }; - E3DC9322E1050DF6B6B2509A8464D179 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E885DC7A2C93B352F3CCBAF6C4F30F7F /* SnapKit.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/SnapKit/SnapKit-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SnapKit/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/SnapKit/SnapKit.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = SnapKit; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 08FD2885A6C888E60B5F422919B65046 /* Build configuration list for PBXNativeTarget "Matrioska" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - B44CEB594B638BAC181EACCDB5DD143A /* Debug */, - D798C0C62D2135978557322E07E6A44E /* Release */, + 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, + B7324857C38B065FEB1EEE3105C2367A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 469A8B172273C74432E39C05CEE37D47 /* Build configuration list for PBXNativeTarget "Matrioska" */ = { isa = XCConfigurationList; buildConfigurations = ( - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, - B7324857C38B065FEB1EEE3105C2367A /* Release */, + 71BC9CE5140D3CAFAD76A525615099F2 /* Debug */, + CA9963F868F92C27EFB4DDDACC203657 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E6C321BAD2A9074A4477A3D3384A0169 /* Build configuration list for PBXNativeTarget "SnapKit" */ = { + 7EC48A2E5553FCE544F55F942211500A /* Build configuration list for PBXNativeTarget "SnapKit" */ = { isa = XCConfigurationList; buildConfigurations = ( - E3DC9322E1050DF6B6B2509A8464D179 /* Debug */, - 18A6BC3CC1A9EC1164A84E2BE33A7B61 /* Release */, + 40652EA2660409BFBEAE3D7BAD61778E /* Debug */, + 7BF1250C7DF8EB49FE5E4B610AB43E2B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/SnapKit/README.md b/Example/Pods/SnapKit/README.md index 8b14ba8..a6da596 100644 --- a/Example/Pods/SnapKit/README.md +++ b/Example/Pods/SnapKit/README.md @@ -59,7 +59,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'SnapKit', '~> 3.0.2' + pod 'SnapKit', '~> 3.1.2' end ``` diff --git a/Example/Pods/SnapKit/Source/Constraint.swift b/Example/Pods/SnapKit/Source/Constraint.swift index e5086c1..5c8c483 100644 --- a/Example/Pods/SnapKit/Source/Constraint.swift +++ b/Example/Pods/SnapKit/Source/Constraint.swift @@ -27,7 +27,7 @@ import AppKit #endif -public class Constraint { +public final class Constraint { internal let sourceLocation: (String, UInt) internal let label: String? @@ -73,7 +73,7 @@ public class Constraint { let layoutToAttributes = self.to.attributes.layoutAttributes // get layout from - let layoutFrom: ConstraintView = self.from.view! + let layoutFrom = self.from.layoutConstraintItem! // get relation let layoutRelation = self.relation.layoutRelation @@ -247,14 +247,18 @@ public class Constraint { } internal func activateIfNeeded(updatingExisting: Bool = false) { - guard let view = self.from.view else { - print("WARNING: SnapKit failed to get from view from constraint. Activate will be a no-op.") + guard let item = self.from.layoutConstraintItem else { + print("WARNING: SnapKit failed to get from item from constraint. Activate will be a no-op.") return } let layoutConstraints = self.layoutConstraints - let existingLayoutConstraints = view.snp.constraints.map({ $0.layoutConstraints }).reduce([]) { $0 + $1 } if updatingExisting { + var existingLayoutConstraints: [LayoutConstraint] = [] + for constraint in item.constraints { + existingLayoutConstraints += constraint.layoutConstraints + } + for layoutConstraint in layoutConstraints { let existingLayoutConstraint = existingLayoutConstraints.first { $0 == layoutConstraint } guard let updateLayoutConstraint = existingLayoutConstraint else { @@ -266,17 +270,17 @@ public class Constraint { } } else { NSLayoutConstraint.activate(layoutConstraints) - view.snp.add(constraints: [self]) + item.add(constraints: [self]) } } internal func deactivateIfNeeded() { - guard let view = self.from.view else { - print("WARNING: SnapKit failed to get from view from constraint. Deactivate will be a no-op.") + guard let item = self.from.layoutConstraintItem else { + print("WARNING: SnapKit failed to get from item from constraint. Deactivate will be a no-op.") return } let layoutConstraints = self.layoutConstraints NSLayoutConstraint.deactivate(layoutConstraints) - view.snp.remove(constraints: [self]) + item.remove(constraints: [self]) } } diff --git a/Example/Pods/SnapKit/Source/ConstraintAttributes.swift b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift index 7236d24..4083235 100644 --- a/Example/Pods/SnapKit/Source/ConstraintAttributes.swift +++ b/Example/Pods/SnapKit/Source/ConstraintAttributes.swift @@ -28,7 +28,7 @@ #endif -internal struct ConstraintAttributes: OptionSet { +internal struct ConstraintAttributes : OptionSet { internal init(rawValue: UInt) { self.rawValue = rawValue diff --git a/Example/Pods/SnapKit/Source/ConstraintDSL.swift b/Example/Pods/SnapKit/Source/ConstraintDSL.swift index cda83a0..ed7b7e5 100644 --- a/Example/Pods/SnapKit/Source/ConstraintDSL.swift +++ b/Example/Pods/SnapKit/Source/ConstraintDSL.swift @@ -49,12 +49,12 @@ extension ConstraintDSL { private var labelKey: UInt8 = 0 -public protocol ConstraintAttributesDSL: ConstraintDSL { +public protocol ConstraintBasicAttributesDSL : ConstraintDSL { } -extension ConstraintAttributesDSL { +extension ConstraintBasicAttributesDSL { // MARK: Basics - + public var left: ConstraintItem { return ConstraintItem(target: self.target, attributes: ConstraintAttributes.left) } @@ -107,6 +107,12 @@ extension ConstraintAttributesDSL { return ConstraintItem(target: self.target, attributes: ConstraintAttributes.center) } +} + +public protocol ConstraintAttributesDSL : ConstraintBasicAttributesDSL { +} +extension ConstraintAttributesDSL { + // MARK: Baselines @available(*, deprecated:3.0, message:"Use .lastBaseline instead") diff --git a/Example/Pods/SnapKit/Source/ConstraintDescription.swift b/Example/Pods/SnapKit/Source/ConstraintDescription.swift index d961fb5..3521f9f 100644 --- a/Example/Pods/SnapKit/Source/ConstraintDescription.swift +++ b/Example/Pods/SnapKit/Source/ConstraintDescription.swift @@ -30,7 +30,7 @@ public class ConstraintDescription { - internal let view: ConstraintView + internal let item: LayoutConstraintItem internal var attributes: ConstraintAttributes internal var relation: ConstraintRelation? = nil internal var sourceLocation: (String, UInt)? = nil @@ -45,7 +45,7 @@ public class ConstraintDescription { let sourceLocation = self.sourceLocation else { return nil } - let from = ConstraintItem(target: self.view, attributes: self.attributes) + let from = ConstraintItem(target: self.item, attributes: self.attributes) return Constraint( from: from, @@ -61,8 +61,8 @@ public class ConstraintDescription { // MARK: Initialization - internal init(view: ConstraintView, attributes: ConstraintAttributes) { - self.view = view + internal init(item: LayoutConstraintItem, attributes: ConstraintAttributes) { + self.item = item self.attributes = attributes } diff --git a/Example/Pods/SnapKit/Source/ConstraintItem.swift b/Example/Pods/SnapKit/Source/ConstraintItem.swift index a9477da..a342c1d 100644 --- a/Example/Pods/SnapKit/Source/ConstraintItem.swift +++ b/Example/Pods/SnapKit/Source/ConstraintItem.swift @@ -28,7 +28,7 @@ #endif -public class ConstraintItem: Equatable { +public final class ConstraintItem { internal weak var target: AnyObject? internal let attributes: ConstraintAttributes @@ -38,8 +38,8 @@ public class ConstraintItem: Equatable { self.attributes = attributes } - internal var view: ConstraintView? { - return self.target as? ConstraintView + internal var layoutConstraintItem: LayoutConstraintItem? { + return self.target as? LayoutConstraintItem } } diff --git a/Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift similarity index 97% rename from Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift rename to Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift index cd89d8a..c2d9e9d 100644 --- a/Example/Pods/SnapKit/Source/UILayoutGuide+Extensions.swift +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide+Extensions.swift @@ -26,7 +26,7 @@ #endif -@available(iOS 9.0, *) +@available(iOS 9.0, OSX 10.11, *) public extension ConstraintLayoutGuide { public var snp: ConstraintLayoutGuideDSL { diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift index f6eba82..e3e50c8 100644 --- a/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutGuide.swift @@ -32,5 +32,6 @@ @available(iOS 9.0, *) public typealias ConstraintLayoutGuide = UILayoutGuide #else - public class ConstraintLayoutGuide {} + @available(OSX 10.11, *) + public typealias ConstraintLayoutGuide = NSLayoutGuide #endif diff --git a/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift b/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift index 62bd9b4..0007819 100644 --- a/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift +++ b/Example/Pods/SnapKit/Source/ConstraintLayoutGuideDSL.swift @@ -28,9 +28,30 @@ #endif -@available(iOS 9.0, *) +@available(iOS 9.0, OSX 10.11, *) public struct ConstraintLayoutGuideDSL: ConstraintAttributesDSL { + @discardableResult + public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + return ConstraintMaker.prepareConstraints(item: self.guide, closure: closure) + } + + public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.makeConstraints(item: self.guide, closure: closure) + } + + public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.remakeConstraints(item: self.guide, closure: closure) + } + + public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { + ConstraintMaker.updateConstraints(item: self.guide, closure: closure) + } + + public func removeConstraints() { + ConstraintMaker.removeConstraints(item: self.guide) + } + public var target: AnyObject? { return self.guide } diff --git a/Example/Pods/SnapKit/Source/ConstraintMaker.swift b/Example/Pods/SnapKit/Source/ConstraintMaker.swift index 63c1be4..b20cdb5 100644 --- a/Example/Pods/SnapKit/Source/ConstraintMaker.swift +++ b/Example/Pods/SnapKit/Source/ConstraintMaker.swift @@ -143,66 +143,75 @@ public class ConstraintMaker { return self.makeExtendableWithAttributes(.centerWithinMargins) } - private let view: ConstraintView + private let item: LayoutConstraintItem private var descriptions = [ConstraintDescription]() - internal init(view: ConstraintView) { - self.view = view - self.view.translatesAutoresizingMaskIntoConstraints = false + internal init(item: LayoutConstraintItem) { + self.item = item + self.item.prepare() } internal func makeExtendableWithAttributes(_ attributes: ConstraintAttributes) -> ConstraintMakerExtendable { - let description = ConstraintDescription(view: self.view, attributes: attributes) + let description = ConstraintDescription(item: self.item, attributes: attributes) self.descriptions.append(description) return ConstraintMakerExtendable(description) } - internal static func prepareConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { - let maker = ConstraintMaker(view: view) + internal static func prepareConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { + let maker = ConstraintMaker(item: item) closure(maker) - let constraints = maker.descriptions - .map { $0.constraint } - .filter { $0 != nil } - .map { $0! } + var constraints: [Constraint] = [] + for description in maker.descriptions { + guard let constraint = description.constraint else { + continue + } + constraints.append(constraint) + } return constraints } - internal static func makeConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { - let maker = ConstraintMaker(view: view) + internal static func makeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + let maker = ConstraintMaker(item: item) closure(maker) - let constraints = maker.descriptions - .map { $0.constraint } - .filter { $0 != nil } - .map { $0! } + var constraints: [Constraint] = [] + for description in maker.descriptions { + guard let constraint = description.constraint else { + continue + } + constraints.append(constraint) + } for constraint in constraints { constraint.activateIfNeeded(updatingExisting: false) } } - internal static func remakeConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { - self.removeConstraints(view: view) - self.makeConstraints(view: view, closure: closure) + internal static func remakeConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + self.removeConstraints(item: item) + self.makeConstraints(item: item, closure: closure) } - internal static func updateConstraints(view: ConstraintView, closure: (_ make: ConstraintMaker) -> Void) { - guard view.snp.constraints.count > 0 else { - self.makeConstraints(view: view, closure: closure) + internal static func updateConstraints(item: LayoutConstraintItem, closure: (_ make: ConstraintMaker) -> Void) { + guard item.constraints.count > 0 else { + self.makeConstraints(item: item, closure: closure) return } - let maker = ConstraintMaker(view: view) + let maker = ConstraintMaker(item: item) closure(maker) - let constraints = maker.descriptions - .map { $0.constraint } - .filter { $0 != nil } - .map { $0! } + var constraints: [Constraint] = [] + for description in maker.descriptions { + guard let constraint = description.constraint else { + continue + } + constraints.append(constraint) + } for constraint in constraints { constraint.activateIfNeeded(updatingExisting: true) } } - internal static func removeConstraints(view: ConstraintView) { - let constraints = view.snp.constraints + internal static func removeConstraints(item: LayoutConstraintItem) { + let constraints = item.constraints for constraint in constraints { constraint.deactivateIfNeeded() } diff --git a/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift b/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift index d50b423..98c7158 100644 --- a/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift +++ b/Example/Pods/SnapKit/Source/ConstraintMakerRelatable.swift @@ -57,6 +57,9 @@ public class ConstraintMakerRelatable { } else if let other = other as? ConstraintConstantTarget { related = ConstraintItem(target: nil, attributes: ConstraintAttributes.none) constant = other + } else if #available(iOS 9.0, OSX 10.11, *), let other = other as? ConstraintLayoutGuide { + related = ConstraintItem(target: other, attributes: ConstraintAttributes.none) + constant = 0.0 } else { fatalError("Invalid constraint. (\(file), \(line))") } @@ -76,7 +79,7 @@ public class ConstraintMakerRelatable { @discardableResult public func equalToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { - guard let other = self.description.view.superview else { + guard let other = self.description.item.superview else { fatalError("Expected superview but found nil when attempting make constraint `equalToSuperview`.") } return self.relatedTo(other, relation: .equal, file: file, line: line) @@ -89,7 +92,7 @@ public class ConstraintMakerRelatable { @discardableResult public func lessThanOrEqualToSuperview(_ file: String = #file, _ line: UInt = #line) -> ConstraintMakerEditable { - guard let other = self.description.view.superview else { + guard let other = self.description.item.superview else { fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") } return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) @@ -102,7 +105,7 @@ public class ConstraintMakerRelatable { @discardableResult public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { - guard let other = self.description.view.superview else { + guard let other = self.description.item.superview else { fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") } return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) diff --git a/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift b/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift index 4d1e37d..6976367 100644 --- a/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift +++ b/Example/Pods/SnapKit/Source/ConstraintRelatableTarget.swift @@ -60,3 +60,7 @@ extension ConstraintItem: ConstraintRelatableTarget { extension ConstraintView: ConstraintRelatableTarget { } + +@available(iOS 9.0, OSX 10.11, *) +extension ConstraintLayoutGuide: ConstraintRelatableTarget { +} diff --git a/Example/Pods/SnapKit/Source/ConstraintRelation.swift b/Example/Pods/SnapKit/Source/ConstraintRelation.swift index 48afbfc..d53bb3b 100644 --- a/Example/Pods/SnapKit/Source/ConstraintRelation.swift +++ b/Example/Pods/SnapKit/Source/ConstraintRelation.swift @@ -28,7 +28,7 @@ #endif -internal enum ConstraintRelation: Int { +internal enum ConstraintRelation : Int { case equal = 1 case lessThanOrEqual case greaterThanOrEqual diff --git a/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift b/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift index 541d18b..0242c4a 100644 --- a/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift +++ b/Example/Pods/SnapKit/Source/ConstraintViewDSL.swift @@ -32,27 +32,25 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { @discardableResult public func prepareConstraints(_ closure: (_ make: ConstraintMaker) -> Void) -> [Constraint] { - return ConstraintMaker.prepareConstraints(view: self.view, closure: closure) + return ConstraintMaker.prepareConstraints(item: self.view, closure: closure) } public func makeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { - ConstraintMaker.makeConstraints(view: self.view, closure: closure) + ConstraintMaker.makeConstraints(item: self.view, closure: closure) } public func remakeConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { - ConstraintMaker.remakeConstraints(view: self.view, closure: closure) + ConstraintMaker.remakeConstraints(item: self.view, closure: closure) } public func updateConstraints(_ closure: (_ make: ConstraintMaker) -> Void) { - ConstraintMaker.updateConstraints(view: self.view, closure: closure) + ConstraintMaker.updateConstraints(item: self.view, closure: closure) } public func removeConstraints() { - ConstraintMaker.removeConstraints(view: self.view) + ConstraintMaker.removeConstraints(item: self.view) } - - public var contentHuggingHorizontalPriority: Float { get { return self.view.contentHuggingPriority(for: .horizontal) @@ -100,36 +98,4 @@ public struct ConstraintViewDSL: ConstraintAttributesDSL { } - internal var constraints: [Constraint] { - return self.constraintsHashTable.allObjects - } - - internal func add(constraints: [Constraint]) { - let hashTable = self.constraintsHashTable - for constraint in constraints { - hashTable.add(constraint) - } - } - - internal func remove(constraints: [Constraint]) { - let hashTable = self.constraintsHashTable - for constraint in constraints { - hashTable.remove(constraint) - } - } - - private var constraintsHashTable: NSHashTable { - let constraints: NSHashTable - - if let existing = objc_getAssociatedObject(self.view, &constraintsKey) as? NSHashTable { - constraints = existing - } else { - constraints = NSHashTable() - objc_setAssociatedObject(self.view, &constraintsKey, constraints, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - return constraints - - } - } -private var constraintsKey: UInt8 = 0 diff --git a/Example/Pods/SnapKit/Source/LayoutConstraint.swift b/Example/Pods/SnapKit/Source/LayoutConstraint.swift index 27c4105..8bb5ed2 100644 --- a/Example/Pods/SnapKit/Source/LayoutConstraint.swift +++ b/Example/Pods/SnapKit/Source/LayoutConstraint.swift @@ -28,7 +28,7 @@ #endif -public class LayoutConstraint: NSLayoutConstraint { +public class LayoutConstraint : NSLayoutConstraint { public var label: String? { get { diff --git a/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift b/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift new file mode 100644 index 0000000..a59de6b --- /dev/null +++ b/Example/Pods/SnapKit/Source/LayoutConstraintItem.swift @@ -0,0 +1,93 @@ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if os(iOS) || os(tvOS) + import UIKit +#else + import AppKit +#endif + + +public protocol LayoutConstraintItem: class { +} + +@available(iOS 9.0, OSX 10.11, *) +extension ConstraintLayoutGuide : LayoutConstraintItem { +} + +extension ConstraintView : LayoutConstraintItem { +} + + +extension LayoutConstraintItem { + + internal func prepare() { + if let view = self as? ConstraintView { + view.translatesAutoresizingMaskIntoConstraints = false + } + } + + internal var superview: ConstraintView? { + if let view = self as? ConstraintView { + return view.superview + } + + if #available(iOS 9.0, OSX 10.11, *), let guide = self as? ConstraintLayoutGuide { + return guide.owningView + } + + return nil + } + internal var constraints: [Constraint] { + return self.constraintsSet.allObjects as! [Constraint] + } + + internal func add(constraints: [Constraint]) { + let constraintsSet = self.constraintsSet + for constraint in constraints { + constraintsSet.add(constraint) + } + } + + internal func remove(constraints: [Constraint]) { + let constraintsSet = self.constraintsSet + for constraint in constraints { + constraintsSet.remove(constraint) + } + } + + private var constraintsSet: NSMutableSet { + let constraintsSet: NSMutableSet + + if let existing = objc_getAssociatedObject(self, &constraintsKey) as? NSMutableSet { + constraintsSet = existing + } else { + constraintsSet = NSMutableSet() + objc_setAssociatedObject(self, &constraintsKey, constraintsSet, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) + } + return constraintsSet + + } + +} +private var constraintsKey: UInt8 = 0 diff --git a/Example/Pods/Target Support Files/SnapKit/Info.plist b/Example/Pods/Target Support Files/SnapKit/Info.plist index a080088..c11c2ee 100644 --- a/Example/Pods/Target Support Files/SnapKit/Info.plist +++ b/Example/Pods/Target Support Files/SnapKit/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0.2 + 3.1.2 CFBundleSignature ???? CFBundleVersion diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..55f6ad2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'danger', '~> 4.0', '>= 4.0.5' +gem 'danger-swiftlint' \ No newline at end of file diff --git a/Matrioska.xcodeproj/project.pbxproj b/Matrioska.xcodeproj/project.pbxproj index 460a762..8814619 100644 --- a/Matrioska.xcodeproj/project.pbxproj +++ b/Matrioska.xcodeproj/project.pbxproj @@ -7,8 +7,18 @@ objects = { /* Begin PBXBuildFile section */ + 2198B0871E277BFF005F2E57 /* app_structure.json in Resources */ = {isa = PBXBuildFile; fileRef = 2198B0861E277BFF005F2E57 /* app_structure.json */; }; + 21DA41761E27A11000169428 /* invalid.json in Resources */ = {isa = PBXBuildFile; fileRef = 21DA41741E27A09500169428 /* invalid.json */; }; 51A54328766C8548A4F3AE4A /* Pods_MatrioskaTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E08AB4E968331E4711F8DCD9 /* Pods_MatrioskaTests.framework */; }; 5A069A980F4B0D057E6B647F /* Pods_Matrioska.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D4BE0A3C39644ABCB31722F /* Pods_Matrioska.framework */; }; + 8B3E4D4B1E2962BC00C82598 /* JSONFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B3E4D4A1E2962BC00C82598 /* JSONFactory.swift */; }; + 8BB284191E2D21D600243C0A /* JSONReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BB284171E2D20C900243C0A /* JSONReader.swift */; }; + 8BCFF8B11E28D4340053AD98 /* ClusterLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8AC1E28D4340053AD98 /* ClusterLayout.swift */; }; + 8BCFF8B21E28D4340053AD98 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8AD1E28D4340053AD98 /* Component.swift */; }; + 8BCFF8B31E28D4340053AD98 /* ComponentMeta.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8AE1E28D4340053AD98 /* ComponentMeta.swift */; }; + 8BCFF8B41E28D4340053AD98 /* StackCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8AF1E28D4340053AD98 /* StackCluster.swift */; }; + 8BCFF8B51E28D4340053AD98 /* TabBarCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8B01E28D4340053AD98 /* TabBarCluster.swift */; }; + 8BCFF8BA1E28D4B90053AD98 /* JSONFactoryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCFF8B61E28D4990053AD98 /* JSONFactoryTests.swift */; }; DE067DC81DDE005400641D1A /* ComponentMetaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE067DC71DDE005400641D1A /* ComponentMetaTests.swift */; }; DE067DCC1DDE017700641D1A /* IntrinsicSizeAwareScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE067DCA1DDE017700641D1A /* IntrinsicSizeAwareScrollView.swift */; }; DE067DCD1DDE017700641D1A /* StackViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE067DCB1DDE017700641D1A /* StackViewController.swift */; }; @@ -16,16 +26,11 @@ DE23D2981DDF63C400CDF333 /* TabBarClusterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2D785C1DDB178500CD6E95 /* TabBarClusterTests.swift */; }; DE23D2991DDF63C400CDF333 /* IntrinsicSizeAwareScrollViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2D78661DDB43FC00CD6E95 /* IntrinsicSizeAwareScrollViewTests.swift */; }; DE23D29A1DDF63C400CDF333 /* StackClusterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6CA3CA1DDC77E800E3A570 /* StackClusterTests.swift */; }; - DE2D785B1DDB0F1A00CD6E95 /* TabBarCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2D785A1DDB0F1A00CD6E95 /* TabBarCluster.swift */; }; DE2D78631DDB3F7F00CD6E95 /* checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = DE2D78621DDB3F7F00CD6E95 /* checkmark@2x.png */; }; DE3E8D801DD389F400417AE5 /* Matrioska.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE3E8D761DD389F400417AE5 /* Matrioska.framework */; }; DE3E8D981DD38BC000417AE5 /* Matrioska.h in Headers */ = {isa = PBXBuildFile; fileRef = DE3E8D931DD38AAA00417AE5 /* Matrioska.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DE3E8D9D1DD46A2600417AE5 /* Component.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE3E8D9C1DD46A2600417AE5 /* Component.swift */; }; - DE6CA3C91DDC71A100E3A570 /* StackCluster.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6CA3C71DDC718D00E3A570 /* StackCluster.swift */; }; DE6CA3CE1DDC7F2D00E3A570 /* ScrollMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6CA3CD1DDC7F2D00E3A570 /* ScrollMatcher.swift */; }; DE6CA3D01DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib in Resources */ = {isa = PBXBuildFile; fileRef = DE6CA3CF1DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib */; }; - DE6CA3D71DDCAF6500E3A570 /* ComponentMeta.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6CA3D61DDCAF6500E3A570 /* ComponentMeta.swift */; }; - DE828C221DDB0C52003443A2 /* ClusterLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE828C211DDB0C52003443A2 /* ClusterLayout.swift */; }; DE85E5AF1DEC842700DFF34A /* AppearanceSpyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE85E5AE1DEC842700DFF34A /* AppearanceSpyViewController.swift */; }; DEA64C8B1E017D8100687658 /* UIColor+HEX.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA64C8A1E017D8100687658 /* UIColor+HEX.swift */; }; DEA64C8D1E01810500687658 /* UIColorHEXTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA64C8C1E01810500687658 /* UIColorHEXTests.swift */; }; @@ -42,16 +47,24 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 21FF818E1DDCB7FA0017B1A1 /* Fastfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Fastfile; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 2198B0861E277BFF005F2E57 /* app_structure.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = app_structure.json; sourceTree = ""; }; + 21DA41741E27A09500169428 /* invalid.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = invalid.json; sourceTree = ""; }; 23587B9D5CB1FB404F5C7787 /* Pods-MatrioskaTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MatrioskaTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MatrioskaTests/Pods-MatrioskaTests.debug.xcconfig"; sourceTree = ""; }; 2D4BE0A3C39644ABCB31722F /* Pods_Matrioska.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Matrioska.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4F6E46DFDCFD89ADB9C4762B /* Pods-Matrioska.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Matrioska.release.xcconfig"; path = "Pods/Target Support Files/Pods-Matrioska/Pods-Matrioska.release.xcconfig"; sourceTree = ""; }; 60996A348436AB8E34E758DA /* Pods-Matrioska.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Matrioska.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Matrioska/Pods-Matrioska.debug.xcconfig"; sourceTree = ""; }; + 8B3E4D4A1E2962BC00C82598 /* JSONFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONFactory.swift; sourceTree = ""; }; + 8BB284171E2D20C900243C0A /* JSONReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONReader.swift; sourceTree = ""; }; + 8BCFF8AC1E28D4340053AD98 /* ClusterLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClusterLayout.swift; sourceTree = ""; }; + 8BCFF8AD1E28D4340053AD98 /* Component.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = ""; }; + 8BCFF8AE1E28D4340053AD98 /* ComponentMeta.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentMeta.swift; sourceTree = ""; }; + 8BCFF8AF1E28D4340053AD98 /* StackCluster.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackCluster.swift; sourceTree = ""; }; + 8BCFF8B01E28D4340053AD98 /* TabBarCluster.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarCluster.swift; sourceTree = ""; }; + 8BCFF8B61E28D4990053AD98 /* JSONFactoryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONFactoryTests.swift; sourceTree = ""; }; DDE5072CEF32135290F71073 /* Pods-MatrioskaTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MatrioskaTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MatrioskaTests/Pods-MatrioskaTests.release.xcconfig"; sourceTree = ""; }; DE067DC71DDE005400641D1A /* ComponentMetaTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ComponentMetaTests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DE067DCA1DDE017700641D1A /* IntrinsicSizeAwareScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeAwareScrollView.swift; sourceTree = ""; }; DE067DCB1DDE017700641D1A /* StackViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackViewController.swift; sourceTree = ""; }; - DE2D785A1DDB0F1A00CD6E95 /* TabBarCluster.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TabBarCluster.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DE2D785C1DDB178500CD6E95 /* TabBarClusterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TabBarClusterTests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DE2D78621DDB3F7F00CD6E95 /* checkmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkmark@2x.png"; sourceTree = ""; }; DE2D78661DDB43FC00CD6E95 /* IntrinsicSizeAwareScrollViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IntrinsicSizeAwareScrollViewTests.swift; sourceTree = ""; }; @@ -61,13 +74,9 @@ DE3E8D931DD38AAA00417AE5 /* Matrioska.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Matrioska.h; sourceTree = ""; }; DE3E8D951DD38AAA00417AE5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DE3E8D961DD38AAA00417AE5 /* ComponentTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComponentTests.swift; sourceTree = ""; }; - DE3E8D9C1DD46A2600417AE5 /* Component.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Component.swift; sourceTree = ""; }; - DE6CA3C71DDC718D00E3A570 /* StackCluster.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = StackCluster.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DE6CA3CA1DDC77E800E3A570 /* StackClusterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = StackClusterTests.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DE6CA3CD1DDC7F2D00E3A570 /* ScrollMatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScrollMatcher.swift; sourceTree = ""; }; DE6CA3CF1DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IntrinsicSizeAwareScrollViewTest.xib; sourceTree = ""; }; - DE6CA3D61DDCAF6500E3A570 /* ComponentMeta.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ComponentMeta.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - DE828C211DDB0C52003443A2 /* ClusterLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClusterLayout.swift; sourceTree = ""; }; DE85E5AE1DEC842700DFF34A /* AppearanceSpyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearanceSpyViewController.swift; sourceTree = ""; }; DEA64C8A1E017D8100687658 /* UIColor+HEX.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+HEX.swift"; sourceTree = ""; }; DEA64C8C1E01810500687658 /* UIColorHEXTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIColorHEXTests.swift; sourceTree = ""; }; @@ -96,14 +105,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 21FF818D1DDCB7FA0017B1A1 /* fastlane */ = { - isa = PBXGroup; - children = ( - 21FF818E1DDCB7FA0017B1A1 /* Fastfile */, - ); - path = fastlane; - sourceTree = ""; - }; 5E6EE110929620DA6A8B14DD /* Pods */ = { isa = PBXGroup; children = ( @@ -115,6 +116,26 @@ name = Pods; sourceTree = ""; }; + 8BCFF8A21E28D3830053AD98 /* Factories */ = { + isa = PBXGroup; + children = ( + 8B3E4D4A1E2962BC00C82598 /* JSONFactory.swift */, + ); + path = Factories; + sourceTree = ""; + }; + 8BCFF8AB1E28D4340053AD98 /* Components */ = { + isa = PBXGroup; + children = ( + 8BCFF8AC1E28D4340053AD98 /* ClusterLayout.swift */, + 8BCFF8AD1E28D4340053AD98 /* Component.swift */, + 8BCFF8AE1E28D4340053AD98 /* ComponentMeta.swift */, + 8BCFF8AF1E28D4340053AD98 /* StackCluster.swift */, + 8BCFF8B01E28D4340053AD98 /* TabBarCluster.swift */, + ); + path = Components; + sourceTree = ""; + }; AED00DD136EC847202BC799E /* Frameworks */ = { isa = PBXGroup; children = ( @@ -136,7 +157,9 @@ DE2D78611DDB3F7F00CD6E95 /* Assets */ = { isa = PBXGroup; children = ( + 2198B0861E277BFF005F2E57 /* app_structure.json */, DE2D78621DDB3F7F00CD6E95 /* checkmark@2x.png */, + 21DA41741E27A09500169428 /* invalid.json */, ); path = Assets; sourceTree = ""; @@ -145,7 +168,6 @@ isa = PBXGroup; children = ( DEECB3B21DD47C4A00F7DFB1 /* README.md */, - 21FF818D1DDCB7FA0017B1A1 /* fastlane */, DE3E8D911DD38AAA00417AE5 /* Framework */, DE3E8D9A1DD38D1C00417AE5 /* Source */, DE3E8D941DD38AAA00417AE5 /* Tests */, @@ -176,14 +198,15 @@ DE3E8D941DD38AAA00417AE5 /* Tests */ = { isa = PBXGroup; children = ( - DE6CA3CC1DDC7F1D00E3A570 /* Helpers */, DE2D78611DDB3F7F00CD6E95 /* Assets */, - DE3E8D951DD38AAA00417AE5 /* Info.plist */, + DE6CA3CC1DDC7F1D00E3A570 /* Helpers */, DE3E8D961DD38AAA00417AE5 /* ComponentTests.swift */, - DE2D785C1DDB178500CD6E95 /* TabBarClusterTests.swift */, + DE067DC71DDE005400641D1A /* ComponentMetaTests.swift */, + DE3E8D951DD38AAA00417AE5 /* Info.plist */, DE2D78661DDB43FC00CD6E95 /* IntrinsicSizeAwareScrollViewTests.swift */, + 8BCFF8B61E28D4990053AD98 /* JSONFactoryTests.swift */, DE6CA3CA1DDC77E800E3A570 /* StackClusterTests.swift */, - DE067DC71DDE005400641D1A /* ComponentMetaTests.swift */, + DE2D785C1DDB178500CD6E95 /* TabBarClusterTests.swift */, DEA64C8C1E01810500687658 /* UIColorHEXTests.swift */, ); path = Tests; @@ -192,11 +215,8 @@ DE3E8D9A1DD38D1C00417AE5 /* Source */ = { isa = PBXGroup; children = ( - DE3E8D9C1DD46A2600417AE5 /* Component.swift */, - DE6CA3D61DDCAF6500E3A570 /* ComponentMeta.swift */, - DE828C211DDB0C52003443A2 /* ClusterLayout.swift */, - DE6CA3C71DDC718D00E3A570 /* StackCluster.swift */, - DE2D785A1DDB0F1A00CD6E95 /* TabBarCluster.swift */, + 8BCFF8AB1E28D4340053AD98 /* Components */, + 8BCFF8A21E28D3830053AD98 /* Factories */, DEA64C891E017D7300687658 /* Helpers */, DE067DC91DDE017700641D1A /* Views */, ); @@ -206,9 +226,10 @@ DE6CA3CC1DDC7F1D00E3A570 /* Helpers */ = { isa = PBXGroup; children = ( - DE6CA3CD1DDC7F2D00E3A570 /* ScrollMatcher.swift */, - DE6CA3CF1DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib */, DE85E5AE1DEC842700DFF34A /* AppearanceSpyViewController.swift */, + DE6CA3CF1DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib */, + 8BB284171E2D20C900243C0A /* JSONReader.swift */, + DE6CA3CD1DDC7F2D00E3A570 /* ScrollMatcher.swift */, ); path = Helpers; sourceTree = ""; @@ -284,7 +305,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = runtastic; TargetAttributes = { DE3E8D751DD389F400417AE5 = { @@ -329,7 +350,9 @@ buildActionMask = 2147483647; files = ( DE2D78631DDB3F7F00CD6E95 /* checkmark@2x.png in Resources */, + 2198B0871E277BFF005F2E57 /* app_structure.json in Resources */, DE6CA3D01DDC8ED600E3A570 /* IntrinsicSizeAwareScrollViewTest.xib in Resources */, + 21DA41761E27A11000169428 /* invalid.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -432,14 +455,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DE6CA3D71DDCAF6500E3A570 /* ComponentMeta.swift in Sources */, + 8BCFF8B51E28D4340053AD98 /* TabBarCluster.swift in Sources */, + 8BCFF8B31E28D4340053AD98 /* ComponentMeta.swift in Sources */, DEA64C8B1E017D8100687658 /* UIColor+HEX.swift in Sources */, DE067DCC1DDE017700641D1A /* IntrinsicSizeAwareScrollView.swift in Sources */, - DE828C221DDB0C52003443A2 /* ClusterLayout.swift in Sources */, - DE6CA3C91DDC71A100E3A570 /* StackCluster.swift in Sources */, + 8BCFF8B21E28D4340053AD98 /* Component.swift in Sources */, + 8B3E4D4B1E2962BC00C82598 /* JSONFactory.swift in Sources */, + 8BCFF8B41E28D4340053AD98 /* StackCluster.swift in Sources */, + 8BCFF8B11E28D4340053AD98 /* ClusterLayout.swift in Sources */, DE067DCD1DDE017700641D1A /* StackViewController.swift in Sources */, - DE3E8D9D1DD46A2600417AE5 /* Component.swift in Sources */, - DE2D785B1DDB0F1A00CD6E95 /* TabBarCluster.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -447,11 +471,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 8BCFF8BA1E28D4B90053AD98 /* JSONFactoryTests.swift in Sources */, DE85E5AF1DEC842700DFF34A /* AppearanceSpyViewController.swift in Sources */, DE23D2981DDF63C400CDF333 /* TabBarClusterTests.swift in Sources */, DE23D2971DDF63C400CDF333 /* ComponentTests.swift in Sources */, DE6CA3CE1DDC7F2D00E3A570 /* ScrollMatcher.swift in Sources */, DE23D29A1DDF63C400CDF333 /* StackClusterTests.swift in Sources */, + 8BB284191E2D21D600243C0A /* JSONReader.swift in Sources */, DEA64C8D1E01810500687658 /* UIColorHEXTests.swift in Sources */, DE067DC81DDE005400641D1A /* ComponentMetaTests.swift in Sources */, DE23D2991DDF63C400CDF333 /* IntrinsicSizeAwareScrollViewTests.swift in Sources */, diff --git a/Matrioska.xcodeproj/xcshareddata/xcschemes/Matrioska.xcscheme b/Matrioska.xcodeproj/xcshareddata/xcschemes/Matrioska.xcscheme index 63952be..e3aa963 100644 --- a/Matrioska.xcodeproj/xcshareddata/xcschemes/Matrioska.xcscheme +++ b/Matrioska.xcodeproj/xcshareddata/xcschemes/Matrioska.xcscheme @@ -1,6 +1,6 @@ Component in + ClusterLayout.tabBar(children: children, meta: meta) +}) + +jsonFactory.register(with: "navigation", factoryBuilder: { (child, meta) -> Component in + Component.wrapper(builder: { _ in UINavigationController() }, child: child, meta: meta) +}) + +jsonFactory.register(with: "table_view", factoryBuilder: { (meta) -> Component in + Component.view(builder: { _ in UITableViewController() }, meta: meta) +}) +``` + +Whenever you register a new factory you should provide the `type` key that will match the JSON. Check the [provided JSON schema](/Documentation/JSON\ schema\ guide.md) for more details on that. + +You can register different factories for `View`, `Wrapper` and `Cluster` `Component` types using the `JSONFactory`. After registration, you can use the factory to get the component out of a JSON: + +``` +let component = try jsonFactory.component(from: json) +``` + +Besides providing `type` on the JSON, `Component`s should also match the JSON schema that the library provides by default whenever using the built-in components (TabBar or Stack) meta configuration. + +Check the [JSON schem guide](/Documentation/JSON\ schema\ guide.md) for more information. + ## Roadmap -- Load Components from JSON [#3](https://github.com/runtastic/Matrioska/issues/3) - - Serialization - - Component Factories - Rulesets to define the visibility of a Component [#4](https://github.com/runtastic/Matrioska/issues/4) - Deep Linking [#5](https://github.com/runtastic/Matrioska/issues/5) diff --git a/Source/ClusterLayout.swift b/Source/Components/ClusterLayout.swift similarity index 100% rename from Source/ClusterLayout.swift rename to Source/Components/ClusterLayout.swift diff --git a/Source/Component.swift b/Source/Components/Component.swift similarity index 100% rename from Source/Component.swift rename to Source/Components/Component.swift diff --git a/Source/ComponentMeta.swift b/Source/Components/ComponentMeta.swift similarity index 96% rename from Source/ComponentMeta.swift rename to Source/Components/ComponentMeta.swift index 45f2fc4..b7bb7f4 100644 --- a/Source/ComponentMeta.swift +++ b/Source/Components/ComponentMeta.swift @@ -77,7 +77,8 @@ extension ExpressibleByComponentMeta { /// or an already materialized meta object. /// - Returns: A materialized `ExpressibleByComponentMeta` object if the input represents correctly /// the object to be materialized. - /// - Note: This will return nil when `meta` is nil or will return the same `meta` object when `meta` is already a `Self` type. + /// - Note: This will return nil when `meta` is nil or + /// will return the same `meta` object when `meta` is already a `Self` type. public static func materialize(_ meta: ComponentMeta?) -> Self? { guard let meta = meta else { return nil diff --git a/Source/StackCluster.swift b/Source/Components/StackCluster.swift similarity index 96% rename from Source/StackCluster.swift rename to Source/Components/StackCluster.swift index 456c5fe..db1daaf 100644 --- a/Source/StackCluster.swift +++ b/Source/Components/StackCluster.swift @@ -34,10 +34,10 @@ extension ClusterLayout { public init?(meta: ComponentMeta) { let title = meta["title"] as? String let spacing = (meta["spacing"] as? NSNumber)?.floatValue - let preserveParentWidth = meta["preserveParentWidth"] as? Bool + let preserveParentWidth = meta["preserve_parent_width"] as? Bool let axisRawValue = meta["axis"] as? Int let axis = axisRawValue.flatMap { UILayoutConstraintAxis(rawValue: $0) } - let hexString = meta["backgroundColor"] as? String + let hexString = meta["background_color"] as? String let backgroundColor = hexString.flatMap { UIColor(hexString: $0) } self.init( diff --git a/Source/TabBarCluster.swift b/Source/Components/TabBarCluster.swift similarity index 97% rename from Source/TabBarCluster.swift rename to Source/Components/TabBarCluster.swift index 10e3bb3..e9eb2f5 100644 --- a/Source/TabBarCluster.swift +++ b/Source/Components/TabBarCluster.swift @@ -27,7 +27,7 @@ extension ClusterLayout { guard let title = meta["title"] as? String else { return nil } - guard let iconName = meta["iconName"] as? String else { + guard let iconName = meta["icon_name"] as? String else { return nil } @@ -58,7 +58,7 @@ extension ClusterLayout { /// /// - Parameter meta: A meta object public init?(meta: ComponentMeta) { - guard let selectedIndex = meta["selectedIndex"] as? Int else { + guard let selectedIndex = meta["selected_index"] as? Int else { return nil } diff --git a/Source/Factories/JSONFactory.swift b/Source/Factories/JSONFactory.swift new file mode 100644 index 0000000..d1d9044 --- /dev/null +++ b/Source/Factories/JSONFactory.swift @@ -0,0 +1,105 @@ +// +// JSONFactory.swift +// Matrioska +// +// Created by Mathias Aichinger on 11/01/2017. +// Copyright © 2017 runtastic. All rights reserved. +// + +import Foundation + +/// A JSONObject type +public typealias JSONObject = [String: Any] + +/// An error type for JSONFactory +/// +/// - missing: specifies that a mandatory key is missing +enum JSONFactoryError: Error { + case missing(JSONObject, String) +} + +/// A factory that wraps `Component` builder closures (ViewFactoryBuilder, +/// `WrapperFactoryBuilder` & `ClusterFactoryBuilder`) and uses them to produce `Component`s +public final class JSONFactory { + + private enum Key { + static let type = "type" + static let meta = "meta" + static let children = "children" + } + + /// A factory closure to build a view `Component` + public typealias ViewFactoryBuilder = (ComponentMeta?) -> Component + + /// A factory closure to build a wrapper `Component` + public typealias WrapperFactoryBuilder = (Component, ComponentMeta?) -> Component + + /// A factory closure to build a cluster `Component` + public typealias ClusterFactoryBuilder = ([Component], ComponentMeta?) -> Component + + private var viewFactory: [String: ViewFactoryBuilder] = [:] + private var wrapperFactory: [String: WrapperFactoryBuilder] = [:] + private var clusterFactory: [String: ClusterFactoryBuilder] = [:] + + /// Initialize a new JSONFactory + public init() { + // Empty but needed to be initialized from other modules + } + + /// Registers a new `ViewFactoryBuilder` which will be used when producing the component + /// + /// - Parameters: + /// - type: a string identifying this factory type + /// - factoryBuilder: a `ViewFactoryBuilder` to build a `Component` + public func register(with type: String, + factoryBuilder: @escaping ViewFactoryBuilder) { + viewFactory[type] = factoryBuilder + } + + /// Registers a new `WrapperFactoryBuilder` which will be used when producing the component + /// + /// - Parameters: + /// - type: a string identifying this factory type + /// - factoryBuilder: a `WrapperFactoryBuilder` to build a `Component` + public func register(with type: String, + factoryBuilder: @escaping WrapperFactoryBuilder) { + wrapperFactory[type] = factoryBuilder + } + + /// Registers a new `ClusterFactoryBuilder` which will be used when producing the component + /// + /// - Parameters: + /// - type: a string identifying this factory type + /// - factoryBuilder: a `ClusterFactoryBuilder` to build a `Component` + public func register(with type: String, + factoryBuilder: @escaping ClusterFactoryBuilder) { + clusterFactory[type] = factoryBuilder + } + + /// Produces a `Component` from a given `JSONObject`, which has one mandatory key: `type` + /// + /// - Parameter json: the `JSONObject` to be used + /// - Returns: An optional `Component` + /// - Throws: `JSONFactoryError` when a mandatory key is missing + public func component(from json: JSONObject) throws -> Component? { + guard let type = json[Key.type] as? String else { + throw JSONFactoryError.missing(json, Key.type) + } + + let meta = json[Key.meta] as? JSONObject + let children = json[Key.children] as? [JSONObject] ?? [] + let componentChildren = try children.flatMap { try component(from: $0) } + var componentResult: Component? + + if let viewFactory = viewFactory[type] { + componentResult = viewFactory(meta) + } else if let wrapperFactory = wrapperFactory[type], + let componentChild = componentChildren.first { + componentResult = wrapperFactory(componentChild, meta) + } else if let clusterFactory = clusterFactory[type] { + componentResult = clusterFactory(componentChildren, meta) + } + + return componentResult + } +} diff --git a/Source/Helpers/UIColor+HEX.swift b/Source/Helpers/UIColor+HEX.swift index b6a6764..7d538b2 100644 --- a/Source/Helpers/UIColor+HEX.swift +++ b/Source/Helpers/UIColor+HEX.swift @@ -25,7 +25,7 @@ extension UIColor { /// Initialize a color if the input strings represents an hex color /// - /// - Parameter hexString: A Strign representing an hex color. + /// - Parameter hexString: A String representing an hex color. /// Alpha not supported and compact form not supported. /// Valid format: "0x123456" or "123456" public convenience init?(hexString: String) { diff --git a/Tests/.swiftlint.yml b/Tests/.swiftlint.yml index 44c96c8..4da0500 100644 --- a/Tests/.swiftlint.yml +++ b/Tests/.swiftlint.yml @@ -1,19 +1,14 @@ disabled_rules: - trailing_whitespace # xcode add it by default, we might enable it and use autocorrect - function_body_length + - force_cast + - force_try + - force_unwrapping + +line_length: 200 # goal: 110 opt_in_rules: - empty_count - - force_unwrapping - - private_outlet - - vertical_whitespace -# - missing_docs # broken - - closure_spacing - - conditional_returns_on_newline - - explicit_init - - overridden_super_call - - redundant_nil_coalesing -# - switch_case_on_newline # broken type_body_length: warning: 800 @@ -23,4 +18,4 @@ file_length: warning: 1000 error: 1500 -reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit) \ No newline at end of file +reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit) diff --git a/Tests/Assets/app_structure.json b/Tests/Assets/app_structure.json new file mode 100644 index 0000000..6583917 --- /dev/null +++ b/Tests/Assets/app_structure.json @@ -0,0 +1,61 @@ +{ + "structure": { + "type": "tabbar", + "meta": { + "default_tab_id": "main_tab" + }, + "children": [ + { + "type": "stack", + "meta": { + "title": "history_title", + "icon_name": "history_tab_icon" + }, + "children": [ + { + "type": "table_view" + }, + { + "type": "navigation" + } + ] + }, + { + "type": "stack", + "meta": { + "title": "main_tab_title", + "icon_name": "main_tab_icon" + }, + "children": [ + { + "type": "label" + }, + { + "type": "stack", + "meta": { + "requires_navigation": "true", + "orientation": "horizontal" + } + }, + { + "type": "button", + "meta": { + "title": { + "key": "start_button_title", + "type": "localized_string" + } + } + } + ] + }, + { + "type": "navigation", + "children": [ + { + "type": "label" + } + ] + } + ] + } +} diff --git a/Tests/Assets/invalid.json b/Tests/Assets/invalid.json new file mode 100644 index 0000000..ab67f7a --- /dev/null +++ b/Tests/Assets/invalid.json @@ -0,0 +1,4 @@ +{ + "structure": "test" + "test": "test" +} diff --git a/Tests/ComponentTests.swift b/Tests/ComponentTests.swift index 272be71..6a79ff8 100644 --- a/Tests/ComponentTests.swift +++ b/Tests/ComponentTests.swift @@ -15,7 +15,7 @@ class ComponentTests: QuickSpec { override func spec() { - typealias DictMeta = Dictionary + typealias DictMeta = [String: String] describe("View component") { it("should build a viewController") { diff --git a/Tests/Helpers/JSONReader.swift b/Tests/Helpers/JSONReader.swift new file mode 100644 index 0000000..dbb149b --- /dev/null +++ b/Tests/Helpers/JSONReader.swift @@ -0,0 +1,42 @@ +// +// JSONReader.swift +// Matrioska +// +// Created by Andreas Thenn on 12/01/2017. +// Copyright © 2017 runtastic. All rights reserved. +// + +import Foundation +@testable import Matrioska + +/// A JSONReader used to convert to JSONObject +final class JSONReader { + + /// Serializes from a given JSON Data into JSONObject + /// + /// - Parameter data: the Data object used in serialization + /// - Returns: an optional serialized JSONObject + /// - Throws: throws an error in case of failure or invalid JSON data + class func jsonObject(from data: Data) throws -> JSONObject? { + let json = try JSONSerialization.jsonObject(with: data) as? JSONObject + + return json + } + + /// Serializes from a given JSON file into JSONObject + /// + /// - Parameters: + /// - jsonFilename: the file name + /// - bundle: the bundle where the file is located + /// - Returns: an optional serialized JSONObject + /// - Throws: throws an error in case of failure or invalid JSON data + class func jsonObject(from jsonFilename: String, bundle: Bundle = .main) throws -> JSONObject? { + guard let filePath = bundle.path(forResource: jsonFilename, ofType: "json") else { + return nil + } + + let url = URL(fileURLWithPath: filePath) + + return try jsonObject(from: Data(contentsOf: url, options: .uncached)) + } +} diff --git a/Tests/JSONFactoryTests.swift b/Tests/JSONFactoryTests.swift new file mode 100644 index 0000000..6815248 --- /dev/null +++ b/Tests/JSONFactoryTests.swift @@ -0,0 +1,156 @@ +// +// JSONFactoryTests.swift +// Matrioska +// +// Created by Joan Romano on 12/01/17. +// Copyright © 2017 runtastic. All rights reserved. +// + +import XCTest +import Quick +import Nimble +@testable import Matrioska + +class JSONFactoryTests: QuickSpec { + + let bundle = Bundle(for: JSONFactoryTests.self) + let jsonFileName = "app_structure" + + override func spec() { + + let jsonObject = try! JSONReader.jsonObject(from: jsonFileName, bundle: bundle)! + let json = structure(from: jsonObject) + + let viewBuilder: JSONFactory.ViewFactoryBuilder = { (meta: ComponentMeta?) in + Component.view(builder: { _ in UIViewController() }, meta: meta) + } + let tabBarBuilder: JSONFactory.ClusterFactoryBuilder = { (children, meta) in + ClusterLayout.tabBar(children: children, meta: meta) + } + let navigationBuilder: JSONFactory.WrapperFactoryBuilder = { (child, meta) in + Component.wrapper(builder: { _ in UINavigationController() }, child: child, meta: meta) + } + let stackBuilder: JSONFactory.ClusterFactoryBuilder = ClusterLayout.stack + + describe("Component from builder factories") { + + it("throws an assertion when the JSON object does not have mandatory keys") { + let jsonFactory = JSONFactory() + + expect { try jsonFactory.component(from: ["foo": "bar"]) }.to(throwError()) + expect { try jsonFactory.component(from: ["id": "bar"]) }.to(throwError()) + } + + context("when no factories are added") { + let jsonFactorry = JSONFactory() + + it("returns nil when trying to get a component") { + let component = try! jsonFactorry.component(from: json) + expect(component).to(beNil()) + } + } + + context("when registering some available cluster factories") { + let jsonFactory = JSONFactory() + jsonFactory.register(with: "tabbar", factoryBuilder: tabBarBuilder) + let component = try! jsonFactory.component(from: json) + + it("handles only those cluster components which have registered factories") { + expect(component).toNot(beNil()) + expect(component?.viewController()).to(beAKindOf(UITabBarController.self)) + expect(component?.children().count).to(equal(0)) + } + } + + context("when registering all available cluster factories") { + let jsonFactory = JSONFactory() + jsonFactory.register(with: "tabbar", factoryBuilder: tabBarBuilder) + jsonFactory.register(with: "stack", factoryBuilder: stackBuilder) + let component = try! jsonFactory.component(from: json) + + it("handles all cluster components") { + expect(component).toNot(beNil()) + expect(component?.viewController()).to(beAKindOf(UITabBarController.self)) + expect(component?.children().count).to(equal(2)) + } + + it("handles all components recursively") { + let firstChildren = component!.children().first + let secondChildren = component!.children().last + + expect(firstChildren?.viewController()).to(beAKindOf(StackViewController.self)) + expect(secondChildren?.viewController()).to(beAKindOf(StackViewController.self)) + } + + it("does not handle not registered components") { + let firstChildren = component!.children().first + let secondChildren = component!.children().last + + expect(firstChildren?.children().count).to(equal(0)) + expect(secondChildren?.children().count).to(equal(1)) + } + } + + context("when registering all available factories") { + let jsonFactory = JSONFactory() + + jsonFactory.register(with: "tabbar", factoryBuilder: tabBarBuilder) + jsonFactory.register(with: "stack", factoryBuilder: stackBuilder) + jsonFactory.register(with: "navigation", factoryBuilder: navigationBuilder) + jsonFactory.register(with: "button", factoryBuilder: viewBuilder) + jsonFactory.register(with: "label", factoryBuilder: viewBuilder) + jsonFactory.register(with: "table_view", factoryBuilder: viewBuilder) + + let component = try! jsonFactory.component(from: json) + + it("handles all components recursively") { + let firstChildren = component!.children()[0] + let secondChildren = component!.children()[1] + let thirdChildren = component!.children()[2] + + expect(firstChildren.meta!["icon_name"] as? String).to(equal("history_tab_icon")) + expect(firstChildren.meta!["title"] as? String).to(equal("history_title")) + expect(secondChildren.meta!["icon_name"] as? String).to(equal("main_tab_icon")) + expect(secondChildren.meta!["title"] as? String).to(equal("main_tab_title")) + + expect(component?.children().count).to(equal(3)) + expect(secondChildren.children().count).to(equal(3)) + expect(thirdChildren.children().count).to(equal(1)) + expect(firstChildren.children()[0].viewController()).to(beAKindOf(UIViewController.self)) + expect(secondChildren.children()[1].viewController()).to(beAKindOf(StackViewController.self)) + } + + it("does not handle registered wrapper builders with no children") { + let firstChildren = component!.children()[0] + + expect(firstChildren.children().count).to(equal(1)) + } + + it("handles registered wrapper builders with views") { + let thirdChildren = component!.children()[2] + + expect(thirdChildren.viewController()).to(beAKindOf(UINavigationController.self)) + expect(thirdChildren.children()[0].viewController()).to(beAKindOf(UIViewController.self)) + } + } + } + + } +} + +fileprivate extension Component { + func children() -> [Component] { + switch self { + case .view(builder: _, meta: _): + return [] + case let .wrapper(builder: _, child: child, meta: _): + return [child] + case let .cluster(builder: _, children: children, meta: _): + return children + } + } +} + +fileprivate func structure(from jsonObject: JSONObject) -> JSONObject { + return jsonObject["structure"] as! JSONObject +} diff --git a/Tests/StackClusterTests.swift b/Tests/StackClusterTests.swift index 34ff684..e329e1a 100644 --- a/Tests/StackClusterTests.swift +++ b/Tests/StackClusterTests.swift @@ -22,7 +22,7 @@ class StackClusterTests: QuickSpec { let children = [ labelComponent(title: "first", color: .red), labelComponent(title: "second", color: .blue), - labelComponent(title: "third\ntwo lines", color: .orange), + labelComponent(title: "third\ntwo lines", color: .orange) ] it("should display its child and respect their intrinsic contentSize") { @@ -35,7 +35,7 @@ class StackClusterTests: QuickSpec { labelComponent(title: "first", color: .red), Component.view(builder: { _ in nil }, meta: nil), labelComponent(title: "second", color: .orange), - Component.view(builder: { _ in nil }, meta: nil), + Component.view(builder: { _ in nil }, meta: nil) ] let vc = stack(with: children) expect(vc).to(haveValidSnapshot()) @@ -46,7 +46,7 @@ class StackClusterTests: QuickSpec { it("should use the default configuration") { let children = [ labelComponent(title: "first", color: .yellow), - labelComponent(title: "second", color: .green), + labelComponent(title: "second", color: .green) ] let vc = stack(with: children, meta: ["foo": "bar"]) expect(vc).to(haveValidSnapshot()) @@ -94,8 +94,8 @@ class StackClusterTests: QuickSpec { "title": "Foo", "spacing": 150.0, "axis": UILayoutConstraintAxis.vertical.rawValue, - "preserveParentWidth": true, - "backgroundColor": "0xEEEEEE" + "preserve_parent_width": true, + "background_color": "0xEEEEEE" ] let vc = stack(with: children, meta: config) @@ -112,7 +112,7 @@ class StackClusterTests: QuickSpec { labelComponent(title: "1", color: .red, labelSize: size), labelComponent(title: "2", color: .red, labelSize: size), labelComponent(title: "3", color: .red, labelSize: size), - labelComponent(title: "4", color: .red, labelSize: size), + labelComponent(title: "4", color: .red, labelSize: size) ] it("should be able to scroll horizontally") { @@ -173,9 +173,7 @@ class StackClusterTests: QuickSpec { context("when the content doesn't overflows") { it("should not be able to scroll") { - let children = [ - labelComponent(title: "first", color: .red), - ] + let children = [labelComponent(title: "first", color: .red)] let vc = stack(with: children) expect(vc).to(haveValidSnapshot()) let scrollView = vc?.stackView.superview as? UIScrollView @@ -195,7 +193,7 @@ class StackClusterTests: QuickSpec { let nest = [ ClusterLayout.stack(children: children, meta: meta), ClusterLayout.stack(children: fixedSizeChildren, meta: horizontalMeta), - ClusterLayout.stack(children: children, meta: nil), + ClusterLayout.stack(children: children, meta: nil) ] let vc = stack(with: nest) diff --git a/Tests/TabBarClusterTests.swift b/Tests/TabBarClusterTests.swift index 9cc7604..322815c 100644 --- a/Tests/TabBarClusterTests.swift +++ b/Tests/TabBarClusterTests.swift @@ -22,12 +22,12 @@ class TabBarClusterTests: QuickSpec { let children: [Component] = [ simpleComponent(meta: TabConfig(title: "test1"), color: .red), simpleComponent(meta: TabConfig(title: "test2"), color: .blue), - simpleComponent(meta: TabConfig(title: "test3"), color: .orange), + simpleComponent(meta: TabConfig(title: "test3"), color: .orange) ] it("should display its children") { let children: [Component] = [ - simpleComponent(meta: TabConfig(title: "test1"), color: .purple), + simpleComponent(meta: TabConfig(title: "test1"), color: .purple) ] let vc = ClusterLayout.tabBar(children: children, meta: nil).viewController() expectTabCount(vc) == 1 @@ -66,7 +66,7 @@ class TabBarClusterTests: QuickSpec { } it("should load config from a dictionary") { - let meta = ["selectedIndex": 1] + let meta = ["selected_index": 1] let vc = ClusterLayout.tabBar(children: children, meta: meta).viewController() expect(vc).to(haveValidSnapshot()) } @@ -84,7 +84,7 @@ class TabBarClusterTests: QuickSpec { it("should ignore children without view") { let children: [Component] = [ Component.view(builder: { _ in nil }, meta: TabConfig(title: "_")), - simpleComponent(meta: TabConfig(title: "test1"), color: .red), + simpleComponent(meta: TabConfig(title: "test1"), color: .red) ] let vc = ClusterLayout.tabBar(children: children, meta: nil).viewController() expectTabCount(vc) == 1 @@ -98,7 +98,7 @@ class TabBarClusterTests: QuickSpec { it("should ignore children without config") { let children: [Component] = [ simpleComponent(meta: nil), - validComponent, + validComponent ] let vc = ClusterLayout.tabBar(children: children, meta: nil).viewController() expectTabCount(vc) == 1 @@ -108,8 +108,8 @@ class TabBarClusterTests: QuickSpec { it("should use config defined as dictionaries") { let bundle = Bundle(for: TabBarClusterTests.self) let children: [Component] = [ - simpleComponent(meta: ["title": "test", "iconName": "checkmark"]), - validComponent, + simpleComponent(meta: ["title": "test", "icon_name": "checkmark"]), + validComponent ] let vc = ClusterLayout.tabBar(children: children, meta: nil, @@ -120,8 +120,8 @@ class TabBarClusterTests: QuickSpec { it("should not use config defined as dictionaries when missing the title") { let children: [Component] = [ - simpleComponent(meta: ["iconName": "_"]), - validComponent, + simpleComponent(meta: ["icon_name": "_"]), + validComponent ] let vc = ClusterLayout.tabBar(children: children, meta: nil).viewController() expectTabCount(vc) == 1 @@ -131,7 +131,7 @@ class TabBarClusterTests: QuickSpec { it("should not use config defined as dictionaries when missing the iconName") { let children: [Component] = [ simpleComponent(meta: ["title": "_"]), - validComponent, + validComponent ] let vc = ClusterLayout.tabBar(children: children, meta: nil).viewController() expectTabCount(vc) == 1