ripple 0.2.210 → 0.2.212

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,176 @@
1
+ import * as _$_ from 'ripple/internal/server';
2
+
3
+ export async function Layout(__output, { children }) {
4
+ return _$_.async(async () => {
5
+ _$_.push_component();
6
+ __output.push('<div');
7
+ __output.push(' class="layout"');
8
+ __output.push('>');
9
+
10
+ {
11
+ {
12
+ const comp = children;
13
+ const args = [__output, {}];
14
+
15
+ if (comp?.async) {
16
+ await comp(...args);
17
+ } else if (comp) {
18
+ comp(...args);
19
+ }
20
+ }
21
+ }
22
+
23
+ __output.push('</div>');
24
+ _$_.pop_component();
25
+ });
26
+ }
27
+
28
+ export function SingleChild(__output) {
29
+ _$_.push_component();
30
+ __output.push('<div');
31
+ __output.push(' class="single"');
32
+ __output.push('>');
33
+
34
+ {
35
+ __output.push('single');
36
+ }
37
+
38
+ __output.push('</div>');
39
+ _$_.pop_component();
40
+ }
41
+
42
+ export function MultiRootChild(__output) {
43
+ _$_.push_component();
44
+ __output.push('<h1');
45
+ __output.push('>');
46
+
47
+ {
48
+ __output.push('title');
49
+ }
50
+
51
+ __output.push('</h1>');
52
+ __output.push('<p');
53
+ __output.push('>');
54
+
55
+ {
56
+ __output.push('description');
57
+ }
58
+
59
+ __output.push('</p>');
60
+ _$_.pop_component();
61
+ }
62
+
63
+ export function EmptyLayout(__output) {
64
+ _$_.push_component();
65
+
66
+ {
67
+ const comp = Layout;
68
+ const args = [__output, {}];
69
+
70
+ comp(...args);
71
+ }
72
+
73
+ _$_.pop_component();
74
+ }
75
+
76
+ export function LayoutWithSingleChild(__output) {
77
+ _$_.push_component();
78
+
79
+ {
80
+ const comp = Layout;
81
+
82
+ const args = [
83
+ __output,
84
+
85
+ {
86
+ children: function children(__output) {
87
+ _$_.push_component();
88
+
89
+ {
90
+ const comp = SingleChild;
91
+ const args = [__output, {}];
92
+
93
+ comp(...args);
94
+ }
95
+
96
+ _$_.pop_component();
97
+ }
98
+ }
99
+ ];
100
+
101
+ comp(...args);
102
+ }
103
+
104
+ _$_.pop_component();
105
+ }
106
+
107
+ export function LayoutWithMultipleChildren(__output) {
108
+ _$_.push_component();
109
+
110
+ {
111
+ const comp = Layout;
112
+
113
+ const args = [
114
+ __output,
115
+
116
+ {
117
+ children: function children(__output) {
118
+ _$_.push_component();
119
+
120
+ {
121
+ const comp = SingleChild;
122
+ const args = [__output, {}];
123
+
124
+ comp(...args);
125
+ }
126
+
127
+ __output.push('<div');
128
+ __output.push(' class="extra"');
129
+ __output.push('>');
130
+
131
+ {
132
+ __output.push('extra');
133
+ }
134
+
135
+ __output.push('</div>');
136
+ _$_.pop_component();
137
+ }
138
+ }
139
+ ];
140
+
141
+ comp(...args);
142
+ }
143
+
144
+ _$_.pop_component();
145
+ }
146
+
147
+ export function LayoutWithMultiRootChild(__output) {
148
+ _$_.push_component();
149
+
150
+ {
151
+ const comp = Layout;
152
+
153
+ const args = [
154
+ __output,
155
+
156
+ {
157
+ children: function children(__output) {
158
+ _$_.push_component();
159
+
160
+ {
161
+ const comp = MultiRootChild;
162
+ const args = [__output, {}];
163
+
164
+ comp(...args);
165
+ }
166
+
167
+ _$_.pop_component();
168
+ }
169
+ }
170
+ ];
171
+
172
+ comp(...args);
173
+ }
174
+
175
+ _$_.pop_component();
176
+ }