diff --git a/.swift-version b/.swift-version index 253d11f4d..2f4477f36 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -wasm-5.3-SNAPSHOT-2020-09-25-a +wasm-5.3-SNAPSHOT-2020-10-29-c diff --git a/Package.swift b/Package.swift index 48af47a37..d1b526857 100644 --- a/Package.swift +++ b/Package.swift @@ -39,7 +39,7 @@ let package = Package( // .package(url: /* package url */, from: "1.0.0"), .package( url: "https://github.com/swiftwasm/JavaScriptKit.git", - .upToNextMinor(from: "0.7.2") + .upToNextMinor(from: "0.8.0") ), .package(url: "https://github.com/MaxDesiatov/Runtime.git", from: "2.1.2"), .package(url: "https://github.com/MaxDesiatov/OpenCombine.git", from: "0.0.1"), @@ -69,7 +69,16 @@ let package = Package( ), .target( name: "TokamakDOM", - dependencies: ["CombineShim", "JavaScriptKit", "TokamakCore", "TokamakStaticHTML"] + dependencies: [ + "CombineShim", + "TokamakCore", + "TokamakStaticHTML", + .product( + name: "JavaScriptKit", + package: "JavaScriptKit", + condition: .when(platforms: [.wasi]) + ) + ] ), .target( name: "TokamakShim", @@ -77,7 +86,14 @@ let package = Package( ), .target( name: "TokamakDemo", - dependencies: ["JavaScriptKit", "TokamakShim"] + dependencies: [ + "TokamakShim", + .product( + name: "JavaScriptKit", + package: "JavaScriptKit", + condition: .when(platforms: [.wasi]) + ) + ] ), .target( name: "TokamakStaticDemo", diff --git a/Sources/TokamakCore/Views/Buttons/Link.swift b/Sources/TokamakCore/Views/Buttons/Link.swift new file mode 100644 index 000000000..10228d868 --- /dev/null +++ b/Sources/TokamakCore/Views/Buttons/Link.swift @@ -0,0 +1,48 @@ +// Copyright 2018-2020 Tokamak contributors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Created by Carson Katri on 9/9/20. +// + +import struct Foundation.URL + +public struct Link