Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add FileSystem module for fs/file-system-access APIs #47

Merged
merged 18 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ xcuserdata/
node_modules
.vscode
.swiftpm
data.json
10 changes: 9 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ let package = Package(
name: "SVG",
targets: ["SVG"]
),
.library(
name: "FileSystem",
targets: ["FileSystem"]
),
.executable(name: "WebIDLToSwift", targets: ["WebIDLToSwift"]),
],
dependencies: [
Expand Down Expand Up @@ -106,12 +110,16 @@ let package = Package(
),
.target(
name: "CSSOM",
dependencies: ["DOM", "WebAPIBase", "ECMAScript"]
dependencies: ["DOM", "WebAPIBase", "SVG", "ECMAScript"]
),
.target(
name: "SVG",
dependencies: ["DOM", "WebAPIBase", "ECMAScript"]
),
.target(
name: "FileSystem",
dependencies: ["DOM", "WebAPIBase", "ECMAScript"]
),
// This support library should be moved to JavaScriptKit
.target(name: "ECMAScript", dependencies: [
"JavaScriptKit",
Expand Down
9 changes: 9 additions & 0 deletions Sources/CSSOM/Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DOM
import ECMAScript
import JavaScriptEventLoop
import JavaScriptKit
import SVG
import WebAPIBase

public class BoxQuadOptions: BridgedDictionary {
Expand Down Expand Up @@ -1665,6 +1666,10 @@ public extension ElementCSSInlineStyle {
@inlinable var attributeStyleMap: StylePropertyMap { jsObject[Strings.attributeStyleMap].fromJSValue()! }
}

extension MathMLElement: ElementCSSInlineStyle {}

extension SVGElement: ElementCSSInlineStyle {}

public protocol GeometryUtils: JSBridgedClass {}
public extension GeometryUtils {
@inlinable func getBoxQuads(options: BoxQuadOptions? = nil) -> [DOMQuad] {
Expand All @@ -1688,6 +1693,10 @@ public extension GeometryUtils {
}
}

extension CSSPseudoElement: GeometryUtils {}

extension Text: GeometryUtils {}

public protocol LinkStyle: JSBridgedClass {}
public extension LinkStyle {
@inlinable var sheet: CSSStyleSheet? { jsObject[Strings.sheet].fromJSValue() }
Expand Down
Loading