The swift-dom library is a cross-platform, efficient, expressive DSL for generating HTML
(and related formats) with few intermediate allocations.
What's New
1.1
2024-06-23T00:03:35Z
Swift DOM 1.1 adds a few missing pieces to the SVG side of the DSL, to bring it up to speed with the HTML DSL.
SVGcan now be instantiated as a resource, throughdocument(with:), an example of which has been added to the SVG tutorial.- individual
SVG.OutputStreamabletypes can now also encode mandatory attributes to their parent elements, which is even more common than in HTML, as most SVG elements are configured through attributes rather than through child elements.
Description
- Swift Tools 5.10.0
Description
{
"name": "swift-dom",
"path": "/usr/src/package",
"targets": [
{
"name": "HTML",
"path": "Sources/HTML",
"type": "library",
"c99name": "HTML",
"sources": [
"Encoding/HTML (ext).swift",
"Encoding/HTML.AttributeEncoder (ext).swift",
"Encoding/HTML.ContentEncoder (ext).swift",
"Encoding/SVG (ext).swift",
"Encoding/SVG.ContentEncoder (ext).swift",
"HTML.OutputStreamable (ext).swift",
"HTML.OutputStreamableHeading (ext).swift",
"Never (ext).swift",
"Optional (ext).swift",
"Types/HTML.Attribute.Property.swift",
"Types/HTML.Attribute.Rel.swift",
"Types/HTML.Link.swift",
"Types/SVG.Point.swift",
"exports.swift",
"lexemes.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"HTML",
"SVG resource",
"Patterns",
"Entrypoints",
"SVG embedded",
"Protocols"
],
"target_dependencies": [
"DOM"
]
},
{
"name": "DynamicMemberFactoryMacro",
"path": "Macros/DynamicMemberFactoryMacro",
"type": "library",
"c99name": "DynamicMemberFactoryMacro",
"sources": [
"GenerateDynamicMemberFactory.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"DynamicMemberFactoryMacro",
"SVG resource",
"Patterns",
"Entrypoints",
"SVG embedded",
"Protocols"
],
"target_dependencies": [
"DynamicLookupMacros"
]
},
{
"name": "DynamicLookupMacros",
"path": "Macros/DynamicLookupMacros",
"type": "macro",
"c99name": "DynamicLookupMacros",
"sources": [
"GenerateDynamicMemberFactory.swift",
"MacroExpansionContext (ext).swift",
"MacroExpansionMessage.swift",
"Main.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"DynamicMemberFactoryMacro",
"SVG resource",
"Patterns",
"Entrypoints",
"SVG embedded",
"Protocols",
"DynamicLookupMacros"
],
"product_dependencies": [
"SwiftCompilerPlugin",
"SwiftSyntaxMacros"
]
},
{
"name": "DOM",
"path": "Sources/DOM",
"type": "library",
"c99name": "DOM",
"sources": [
"Conformances/Character (ext).swift",
"Conformances/String (ext).swift",
"Conformances/Substring (ext).swift",
"Conformances/Unicode.Scalar (ext).swift",
"DOM.Attribute.swift",
"DOM.ContentEncoder.swift",
"DOM.Property.swift",
"DOM.UTF8.swift",
"DOM.swift",
"HTML/HTML.Attribute (gen).swift",
"HTML/HTML.Attribute.Factory (mxt).swift",
"HTML/HTML.AttributeEncoder.CustomData.swift",
"HTML/HTML.AttributeEncoder.swift",
"HTML/HTML.ContainerElement.swift",
"HTML/HTML.ContentEncoder.swift",
"HTML/HTML.OutputStreamable.swift",
"HTML/HTML.OutputStreamableAnchor.swift",
"HTML/HTML.OutputStreamableHeading.swift",
"HTML/HTML.UnsafeElement.swift",
"HTML/HTML.VoidElement.swift",
"HTML/HTML.swift",
"SVG/SVG.Attribute (gen).swift",
"SVG/SVG.AttributeEncoder.swift",
"SVG/SVG.ContainerElement.swift",
"SVG/SVG.ContentEncoder.swift",
"SVG/SVG.Embedded.swift",
"SVG/SVG.OutputStreamable.swift",
"SVG/SVG.swift",
"Sitemap/XML.Sitemap.AttributeEncoder.swift",
"Sitemap/XML.Sitemap.ContentEncoder.swift",
"Sitemap/XML.Sitemap.Element.swift",
"Sitemap/XML.Sitemap.swift",
"Sitemap/XML.swift",
"Sitemap/XMLNS.swift",
"StreamingEncoder.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"DOM",
"HTML",
"SVG resource",
"Patterns",
"Entrypoints",
"SVG embedded",
"Protocols"
]
},
{
"name": "SVG resource",
"path": "Snippets",
"type": "snippet",
"c99name": "SVG_resource",
"sources": [
"SVG resource.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"SVG resource"
],
"target_dependencies": [
"HTML",
"DynamicMemberFactoryMacro",
"DOM"
]
},
{
"name": "Patterns",
"path": "Snippets",
"type": "snippet",
"c99name": "Patterns",
"sources": [
"Patterns.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"Patterns"
],
"target_dependencies": [
"HTML",
"DynamicMemberFactoryMacro",
"DOM"
]
},
{
"name": "Entrypoints",
"path": "Snippets",
"type": "snippet",
"c99name": "Entrypoints",
"sources": [
"Entrypoints.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"Entrypoints"
],
"target_dependencies": [
"HTML",
"DynamicMemberFactoryMacro",
"DOM"
]
},
{
"name": "SVG embedded",
"path": "Snippets",
"type": "snippet",
"c99name": "SVG_embedded",
"sources": [
"SVG embedded.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"SVG embedded"
],
"target_dependencies": [
"HTML",
"DynamicMemberFactoryMacro",
"DOM"
]
},
{
"name": "Protocols",
"path": "Snippets",
"type": "snippet",
"c99name": "Protocols",
"sources": [
"Protocols.swift"
],
"module_type": "SwiftTarget",
"product_memberships": [
"Protocols"
],
"target_dependencies": [
"HTML",
"DynamicMemberFactoryMacro",
"DOM"
]
}
],
"products": [
{
"name": "DOM",
"type": {
"library": [
"automatic"
]
},
"targets": [
"DOM"
]
},
{
"name": "HTML",
"type": {
"library": [
"automatic"
]
},
"targets": [
"HTML"
]
},
{
"name": "DynamicMemberFactoryMacro",
"type": {
"library": [
"automatic"
]
},
"targets": [
"DynamicMemberFactoryMacro"
]
},
{
"name": "SVG resource",
"type": {
"snippet": null
},
"targets": [
"SVG resource"
]
},
{
"name": "Patterns",
"type": {
"snippet": null
},
"targets": [
"Patterns"
]
},
{
"name": "Entrypoints",
"type": {
"snippet": null
},
"targets": [
"Entrypoints"
]
},
{
"name": "SVG embedded",
"type": {
"snippet": null
},
"targets": [
"SVG embedded"
]
},
{
"name": "Protocols",
"type": {
"snippet": null
},
"targets": [
"Protocols"
]
},
{
"name": "DynamicLookupMacros",
"type": {
"macro": null
},
"targets": [
"DynamicLookupMacros"
]
}
],
"platforms": [
{
"name": "macos",
"version": "14.0"
},
{
"name": "ios",
"version": "13.0"
},
{
"name": "tvos",
"version": "13.0"
},
{
"name": "watchos",
"version": "6.0"
}
],
"dependencies": [
{
"url": "https://github.com/apple/swift-syntax",
"type": "sourceControl",
"identity": "swift-syntax",
"requirement": {
"range": [
{
"lower_bound": "510.0.1",
"upper_bound": "601.0.0"
}
]
}
}
],
"tools_version": "5.10",
"manifest_display_name": "swift-dom"
}
Package Dump
{
"name": "swift-dom",
"targets": [
{
"name": "DOM",
"type": "regular",
"exclude": [
"HTML/HTML.Attribute.swift",
"SVG/SVG.Attribute.swift"
],
"settings": [],
"resources": [],
"dependencies": [],
"packageAccess": true
},
{
"name": "HTML",
"type": "regular",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"target": [
"DOM",
null
]
}
],
"packageAccess": true
},
{
"name": "DynamicMemberFactoryMacro",
"path": "Macros/DynamicMemberFactoryMacro",
"type": "regular",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"target": [
"DynamicLookupMacros",
null
]
}
],
"packageAccess": true
},
{
"name": "DynamicLookupMacros",
"path": "Macros/DynamicLookupMacros",
"type": "macro",
"exclude": [],
"settings": [],
"resources": [],
"dependencies": [
{
"product": [
"SwiftCompilerPlugin",
"swift-syntax",
null,
null
]
},
{
"product": [
"SwiftSyntaxMacros",
"swift-syntax",
null,
null
]
}
],
"packageAccess": true
}
],
"products": [
{
"name": "DOM",
"type": {
"library": [
"automatic"
]
},
"targets": [
"DOM"
]
},
{
"name": "HTML",
"type": {
"library": [
"automatic"
]
},
"targets": [
"HTML"
]
},
{
"name": "DynamicMemberFactoryMacro",
"type": {
"library": [
"automatic"
]
},
"targets": [
"DynamicMemberFactoryMacro"
]
}
],
"pkgConfig": null,
"platforms": [
{
"options": [],
"version": "14.0",
"platformName": "macos"
},
{
"options": [],
"version": "13.0",
"platformName": "ios"
},
{
"options": [],
"version": "13.0",
"platformName": "tvos"
},
{
"options": [],
"version": "6.0",
"platformName": "watchos"
}
],
"providers": null,
"packageKind": {
"root": [
"/usr/src/package"
]
},
"dependencies": [
{
"sourceControl": [
{
"identity": "swift-syntax",
"location": {
"remote": [
{
"urlString": "https://github.com/apple/swift-syntax"
}
]
},
"requirement": {
"range": [
{
"lowerBound": "510.0.1",
"upperBound": "601.0.0"
}
]
},
"productFilter": null
}
]
}
],
"toolsVersion": {
"_version": "5.10.0"
},
"cLanguageStandard": null,
"cxxLanguageStandard": null,
"swiftLanguageVersions": null
}
Dependencies
- swift-syntax510.0.2
Dependencies
{
"url": "/usr/src/package",
"name": "swift-dom",
"path": "/usr/src/package",
"version": "unspecified",
"identity": "package",
"dependencies": [
{
"url": "https://github.com/apple/swift-syntax",
"name": "swift-syntax",
"path": "/usr/src/package/.build/checkouts/swift-syntax",
"version": "510.0.2",
"identity": "swift-syntax",
"dependencies": []
}
]
}