Skip to content

Commit 20bcc65

Browse files
committed
group packages by license and archivedness
1 parent 3aa922e commit 20bcc65

File tree

71 files changed

+497
-198
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+497
-198
lines changed

Assets/css/Main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/css/Main.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/DOM/Conformances/Character (ext).swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
extension Character:HyperTextOutputStreamable
1+
extension Character:HTML.OutputStreamable
22
{
33
@inlinable public static
44
func += (html:inout HTML.ContentEncoder, self:Self)
55
{
66
html += self.utf8
77
}
88
}
9-
extension Character:ScalableVectorOutputStreamable
9+
extension Character:SVG.OutputStreamable
1010
{
1111
@inlinable public static
1212
func += (svg:inout SVG.ContentEncoder, self:Self)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
extension String:HyperTextOutputStreamable
1+
extension String:HTML.OutputStreamable
22
{
33
}
4-
extension String:ScalableVectorOutputStreamable
4+
extension String:SVG.OutputStreamable
55
{
66
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
extension Substring:HyperTextOutputStreamable
1+
extension Substring:HTML.OutputStreamable
22
{
33
}
4-
extension Substring:ScalableVectorOutputStreamable
4+
extension Substring:SVG.OutputStreamable
55
{
66
}

Sources/DOM/Conformances/Unicode.Scalar (ext).swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
extension Unicode.Scalar:HyperTextOutputStreamable
1+
extension Unicode.Scalar:HTML.OutputStreamable
22
{
33
@inlinable public static
44
func += (html:inout HTML.ContentEncoder, self:Self)
55
{
66
html += self.utf8
77
}
88
}
9-
extension Unicode.Scalar:ScalableVectorOutputStreamable
9+
extension Unicode.Scalar:SVG.OutputStreamable
1010
{
1111
@inlinable public static
1212
func += (svg:inout SVG.ContentEncoder, self:Self)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
extension HTML
2+
{
3+
public
4+
typealias OutputStreamable = _HTMLOutputStreamable
5+
}
6+
7+
@available(*, deprecated, renamed: "HTML.OutputStreamable")
8+
public
9+
typealias HyperTextOutputStreamable = HTML.OutputStreamable
10+
11+
/// The name of this protocol is ``HTML.OutputStreamable``.
12+
public
13+
protocol _HTMLOutputStreamable
14+
{
15+
/// Encodes attributes to its parent element when encoded with **single-element subscript
16+
/// assignment**. Ignored when streamed generally to an ``HTML.ContentEncoder``.
17+
///
18+
/// This operator is declared as a requirement in order to prevent unexpected behavior when
19+
/// encoding through generics. Because the attributes are sometimes ignored depending on
20+
/// how the value is encoded, we **strongly recommend** against relying on this operator as
21+
/// a shortcut for encoding attributes and to witness it instead by declaring conformances
22+
/// to well-documented protocols such as ``HTML.OutputStreamableAnchor``.
23+
static
24+
func += (html:inout HTML.AttributeEncoder, self:Self)
25+
26+
/// Encodes an instance of this type to the provided HTML stream.
27+
static
28+
func += (html:inout HTML.ContentEncoder, self:Self)
29+
}
30+
extension HTML.OutputStreamable
31+
{
32+
/// Does nothing.
33+
@inlinable public static
34+
func += (html:inout HTML.AttributeEncoder, self:Self)
35+
{
36+
}
37+
}
38+
extension HTML.OutputStreamable where Self:StringProtocol
39+
{
40+
@inlinable public static
41+
func += (html:inout HTML.ContentEncoder, self:Self)
42+
{
43+
html += self.utf8
44+
}
45+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
extension HTML
2+
{
3+
/// A type that adds its ``id`` property to its parent element’s `id` attribute when
4+
/// encoded with single-element subscript assignment. Behaves identically to an ordinary
5+
/// ``HTML.OutputStreamable`` value when streamed to an ``HTML.ContentEncoder``.
6+
public
7+
typealias OutputStreamableAnchor = _HTMLOutputStreamableAnchor
8+
}
9+
10+
/// The name of this protocol is ``HTML.OutputStreamableAnchor``.
11+
public
12+
protocol _HTMLOutputStreamableAnchor:HTML.OutputStreamable, Identifiable<String>
13+
{
14+
}
15+
extension HTML.OutputStreamableAnchor
16+
{
17+
/// Encodes the ``id`` property to the parent element’s `id` attribute.
18+
@inlinable public static
19+
func += (html:inout HTML.AttributeEncoder, self:Self)
20+
{
21+
html.id = self.id
22+
}
23+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
extension HTML
2+
{
3+
/// A type that wraps its ``display`` value in an `a` element with `href` set to a
4+
/// fragment pointing to its ``id`` value.
5+
public
6+
typealias OutputStreamableHeading = _HTMLOutputStreamableHeading
7+
}
8+
9+
/// The name of this protocol is ``HTML.OutputStreamableHeading``.
10+
public
11+
protocol _HTMLOutputStreamableHeading<Display>:HTML.OutputStreamableAnchor
12+
{
13+
associatedtype Display:HTML.OutputStreamable = String
14+
15+
var display:Display { get }
16+
}
17+
extension HTML.OutputStreamableHeading<String> where Self:CustomStringConvertible
18+
{
19+
@inlinable public
20+
var display:String { self.description }
21+
}

Sources/DOM/HTML/HyperTextOutputStreamable.swift

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)