@papillonarts/library 0.36.0 → 0.37.0

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,387 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`<Array /> Render must match features() 1`] = `
4
+ <div>
5
+ &lt;h1&gt;Date&lt;/h1&gt;
6
+ &lt;blockquote&gt;
7
+ &lt;p&gt;Date all functions&lt;/p&gt;
8
+ &lt;/blockquote&gt;
9
+ &lt;pre&gt;&lt;code&gt;# Functions
10
+
11
+
12
+ <p>
13
+ &gt; getLocaleDateTimeString(), getRandomDate()
14
+
15
+ &lt;/code&gt;
16
+ &lt;/pre&gt;
17
+ </p>
18
+
19
+
20
+ &lt;h2&gt;getLocaleDateTimeString()&lt;/h2&gt;
21
+ &lt;blockquote&gt;
22
+ &lt;p&gt;Date getLocaleDateTimeString() function&lt;/p&gt;
23
+ &lt;/blockquote&gt;
24
+ &lt;h2&gt;getRandomDate()&lt;/h2&gt;
25
+ &lt;blockquote&gt;
26
+ &lt;p&gt;Date getRandomDate() function&lt;/p&gt;
27
+ &lt;/blockquote&gt;
28
+ </div>
29
+ `;
30
+
31
+ exports[`<Array /> Render must match getLocaleDateTimeString() 1`] = `
32
+ <div>
33
+ <pre
34
+ style="display: block; overflow-x: auto; background: rgb(43, 48, 59); color: rgb(192, 197, 206); padding: 0.5em;"
35
+ >
36
+ <code
37
+ class="language-typescript"
38
+ style="white-space: pre;"
39
+ >
40
+ <span>
41
+
42
+
43
+ </span>
44
+ <span>
45
+
46
+ </span>
47
+ <span
48
+ style="color: rgb(180, 142, 173);"
49
+ >
50
+ export
51
+ </span>
52
+ <span>
53
+
54
+ </span>
55
+ <span
56
+ class="hljs-function"
57
+ style="color: rgb(180, 142, 173);"
58
+ >
59
+ function
60
+ </span>
61
+ <span
62
+ class="hljs-function"
63
+ >
64
+
65
+ </span>
66
+ <span
67
+ class="hljs-function"
68
+ style="color: rgb(143, 161, 179);"
69
+ >
70
+ getLocaleDateTimeString
71
+ </span>
72
+ <span
73
+ class="hljs-function"
74
+ >
75
+ (
76
+ </span>
77
+ <span
78
+ class="hljs-function"
79
+ style="color: rgb(208, 135, 112);"
80
+ >
81
+ date:
82
+ </span>
83
+ <span
84
+ class="hljs-function"
85
+ style="color: rgb(208, 135, 112);"
86
+ >
87
+ Date
88
+ </span>
89
+ <span
90
+ class="hljs-function"
91
+ >
92
+ ):
93
+ </span>
94
+ <span
95
+ class="hljs-function"
96
+ style="color: rgb(143, 161, 179);"
97
+ >
98
+ string
99
+ </span>
100
+ <span
101
+ class="hljs-function"
102
+ >
103
+
104
+ </span>
105
+ <span>
106
+ {
107
+
108
+ </span>
109
+ <span>
110
+
111
+ </span>
112
+ <span
113
+ style="color: rgb(180, 142, 173);"
114
+ >
115
+ return
116
+ </span>
117
+ <span>
118
+ date ?
119
+ </span>
120
+ <span
121
+ style="color: rgb(163, 190, 140);"
122
+ >
123
+ \`
124
+ </span>
125
+ <span
126
+ class="hljs-subst"
127
+ style="color: rgb(163, 190, 140);"
128
+ >
129
+ \${date.toLocaleDateString()}
130
+ </span>
131
+ <span
132
+ style="color: rgb(163, 190, 140);"
133
+ >
134
+
135
+ </span>
136
+ <span
137
+ class="hljs-subst"
138
+ style="color: rgb(163, 190, 140);"
139
+ >
140
+ \${date.toLocaleTimeString()}
141
+ </span>
142
+ <span
143
+ style="color: rgb(163, 190, 140);"
144
+ >
145
+ \`
146
+ </span>
147
+ <span>
148
+ :
149
+ </span>
150
+ <span
151
+ style="color: rgb(208, 135, 112);"
152
+ >
153
+ null
154
+ </span>
155
+ <span>
156
+
157
+
158
+ </span>
159
+ }
160
+
161
+ </code>
162
+ </pre>
163
+ </div>
164
+ `;
165
+
166
+ exports[`<Array /> Render must match getRandomDate() 1`] = `
167
+ <div>
168
+ <pre
169
+ style="display: block; overflow-x: auto; background: rgb(43, 48, 59); color: rgb(192, 197, 206); padding: 0.5em;"
170
+ >
171
+ <code
172
+ class="language-typescript"
173
+ style="white-space: pre;"
174
+ >
175
+ <span>
176
+
177
+
178
+ </span>
179
+ <span>
180
+
181
+ </span>
182
+ <span
183
+ style="color: rgb(180, 142, 173);"
184
+ >
185
+ export
186
+ </span>
187
+ <span>
188
+
189
+ </span>
190
+ <span
191
+ class="hljs-function"
192
+ style="color: rgb(180, 142, 173);"
193
+ >
194
+ function
195
+ </span>
196
+ <span
197
+ class="hljs-function"
198
+ >
199
+
200
+ </span>
201
+ <span
202
+ class="hljs-function"
203
+ style="color: rgb(143, 161, 179);"
204
+ >
205
+ getRandomDate
206
+ </span>
207
+ <span
208
+ class="hljs-function"
209
+ >
210
+ (
211
+ </span>
212
+ <span
213
+ class="hljs-function"
214
+ style="color: rgb(208, 135, 112);"
215
+ >
216
+ start:
217
+ </span>
218
+ <span
219
+ class="hljs-function"
220
+ style="color: rgb(208, 135, 112);"
221
+ >
222
+ Date
223
+ </span>
224
+ <span
225
+ class="hljs-function"
226
+ style="color: rgb(208, 135, 112);"
227
+ >
228
+ =
229
+ </span>
230
+ <span
231
+ class="hljs-function"
232
+ style="color: rgb(180, 142, 173);"
233
+ >
234
+ new
235
+ </span>
236
+ <span
237
+ class="hljs-function"
238
+ style="color: rgb(208, 135, 112);"
239
+ >
240
+
241
+ </span>
242
+ <span
243
+ class="hljs-function"
244
+ style="color: rgb(208, 135, 112);"
245
+ >
246
+ Date
247
+ </span>
248
+ <span
249
+ class="hljs-function"
250
+ style="color: rgb(208, 135, 112);"
251
+ >
252
+ (
253
+ </span>
254
+ <span
255
+ class="hljs-function"
256
+ style="color: rgb(208, 135, 112);"
257
+ >
258
+ 2013
259
+ </span>
260
+ <span
261
+ class="hljs-function"
262
+ style="color: rgb(208, 135, 112);"
263
+ >
264
+ ,
265
+ </span>
266
+ <span
267
+ class="hljs-function"
268
+ style="color: rgb(208, 135, 112);"
269
+ >
270
+ 1
271
+ </span>
272
+ <span
273
+ class="hljs-function"
274
+ style="color: rgb(208, 135, 112);"
275
+ >
276
+ ,
277
+ </span>
278
+ <span
279
+ class="hljs-function"
280
+ style="color: rgb(208, 135, 112);"
281
+ >
282
+ 1
283
+ </span>
284
+ <span
285
+ class="hljs-function"
286
+ style="color: rgb(208, 135, 112);"
287
+ >
288
+ ), end:
289
+ </span>
290
+ <span
291
+ class="hljs-function"
292
+ style="color: rgb(208, 135, 112);"
293
+ >
294
+ Date
295
+ </span>
296
+ <span
297
+ class="hljs-function"
298
+ style="color: rgb(208, 135, 112);"
299
+ >
300
+ =
301
+ </span>
302
+ <span
303
+ class="hljs-function"
304
+ style="color: rgb(180, 142, 173);"
305
+ >
306
+ new
307
+ </span>
308
+ <span
309
+ class="hljs-function"
310
+ style="color: rgb(208, 135, 112);"
311
+ >
312
+
313
+ </span>
314
+ <span
315
+ class="hljs-function"
316
+ style="color: rgb(208, 135, 112);"
317
+ >
318
+ Date
319
+ </span>
320
+ <span
321
+ class="hljs-function"
322
+ style="color: rgb(208, 135, 112);"
323
+ >
324
+ ()
325
+ </span>
326
+ <span
327
+ class="hljs-function"
328
+ >
329
+ ):
330
+ </span>
331
+ <span
332
+ class="hljs-function"
333
+ style="color: rgb(143, 161, 179);"
334
+ >
335
+ Date
336
+ </span>
337
+ <span
338
+ class="hljs-function"
339
+ >
340
+
341
+ </span>
342
+ <span>
343
+ {
344
+
345
+ </span>
346
+ <span>
347
+
348
+ </span>
349
+ <span
350
+ style="color: rgb(180, 142, 173);"
351
+ >
352
+ return
353
+ </span>
354
+ <span>
355
+
356
+ </span>
357
+ <span
358
+ style="color: rgb(180, 142, 173);"
359
+ >
360
+ new
361
+ </span>
362
+ <span>
363
+
364
+ </span>
365
+ <span
366
+ style="color: rgb(208, 135, 112);"
367
+ >
368
+ Date
369
+ </span>
370
+ <span>
371
+ (start.getTime() +
372
+ </span>
373
+ <span
374
+ style="color: rgb(208, 135, 112);"
375
+ >
376
+ Math
377
+ </span>
378
+ <span>
379
+ .random() * (end.getTime() - start.getTime()))
380
+
381
+ </span>
382
+ }
383
+
384
+ </code>
385
+ </pre>
386
+ </div>
387
+ `;
@@ -0,0 +1,9 @@
1
+ import { Canvas, Meta } from '@storybook/addon-docs/blocks'
2
+
3
+ import * as EventStories from './Event.story'
4
+
5
+ <Meta of={EventStories} />
6
+
7
+ # Event
8
+
9
+ <Canvas of={EventStories.Features} />
@@ -0,0 +1,234 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`<Array /> Render must match features() 1`] = `
4
+ <div>
5
+ &lt;h1&gt;Event&lt;/h1&gt;
6
+ &lt;blockquote&gt;
7
+ &lt;p&gt;Event all functions&lt;/p&gt;
8
+ &lt;/blockquote&gt;
9
+ &lt;pre&gt;&lt;code&gt;# Functions
10
+
11
+
12
+ <p>
13
+ &gt; throttleCode()
14
+
15
+ &lt;/code&gt;
16
+ &lt;/pre&gt;
17
+ </p>
18
+
19
+
20
+ &lt;h2&gt;throttleCode()&lt;/h2&gt;
21
+ &lt;blockquote&gt;
22
+ &lt;p&gt;Event throttleCode() function&lt;/p&gt;
23
+ &lt;/blockquote&gt;
24
+ </div>
25
+ `;
26
+
27
+ exports[`<Array /> Render must match throttle() 1`] = `
28
+ <div>
29
+ <pre
30
+ style="display: block; overflow-x: auto; background: rgb(43, 48, 59); color: rgb(192, 197, 206); padding: 0.5em;"
31
+ >
32
+ <code
33
+ class="language-typescript"
34
+ style="white-space: pre;"
35
+ >
36
+ <span>
37
+
38
+
39
+ </span>
40
+ <span>
41
+
42
+ </span>
43
+ <span
44
+ style="color: rgb(180, 142, 173);"
45
+ >
46
+ export
47
+ </span>
48
+ <span>
49
+
50
+ </span>
51
+ <span
52
+ class="hljs-function"
53
+ style="color: rgb(180, 142, 173);"
54
+ >
55
+ function
56
+ </span>
57
+ <span
58
+ class="hljs-function"
59
+ >
60
+
61
+ </span>
62
+ <span
63
+ class="hljs-function"
64
+ style="color: rgb(143, 161, 179);"
65
+ >
66
+ throttle
67
+ </span>
68
+ <span
69
+ class="hljs-function"
70
+ >
71
+ (
72
+ </span>
73
+ <span
74
+ class="hljs-function"
75
+ style="color: rgb(208, 135, 112);"
76
+ >
77
+ fn, delay =
78
+ </span>
79
+ <span
80
+ class="hljs-function"
81
+ style="color: rgb(208, 135, 112);"
82
+ >
83
+ 200
84
+ </span>
85
+ <span
86
+ class="hljs-function"
87
+ >
88
+ )
89
+ </span>
90
+ <span>
91
+ {
92
+
93
+ </span>
94
+ <span>
95
+
96
+ </span>
97
+ <span
98
+ style="color: rgb(180, 142, 173);"
99
+ >
100
+ let
101
+ </span>
102
+ <span>
103
+ lastCall =
104
+ </span>
105
+ <span
106
+ style="color: rgb(208, 135, 112);"
107
+ >
108
+ 0
109
+ </span>
110
+ <span>
111
+
112
+
113
+ </span>
114
+
115
+
116
+ <span>
117
+
118
+ </span>
119
+ <span
120
+ style="color: rgb(180, 142, 173);"
121
+ >
122
+ const
123
+ </span>
124
+ <span>
125
+ throttleExec =
126
+ </span>
127
+ <span
128
+ class="hljs-function"
129
+ >
130
+ (
131
+ </span>
132
+ <span
133
+ class="hljs-function"
134
+ style="color: rgb(208, 135, 112);"
135
+ >
136
+ ...args
137
+ </span>
138
+ <span
139
+ class="hljs-function"
140
+ >
141
+ ) =&gt;
142
+ </span>
143
+ <span>
144
+ {
145
+
146
+ </span>
147
+ <span>
148
+
149
+ </span>
150
+ <span
151
+ style="color: rgb(180, 142, 173);"
152
+ >
153
+ const
154
+ </span>
155
+ <span>
156
+ now =
157
+ </span>
158
+ <span
159
+ style="color: rgb(180, 142, 173);"
160
+ >
161
+ new
162
+ </span>
163
+ <span>
164
+
165
+ </span>
166
+ <span
167
+ style="color: rgb(208, 135, 112);"
168
+ >
169
+ Date
170
+ </span>
171
+ <span>
172
+ ().getTime()
173
+
174
+ </span>
175
+ <span>
176
+
177
+ </span>
178
+ <span
179
+ style="color: rgb(180, 142, 173);"
180
+ >
181
+ if
182
+ </span>
183
+ <span>
184
+ (now - lastCall &lt; delay) {
185
+
186
+ </span>
187
+ <span>
188
+
189
+ </span>
190
+ <span
191
+ style="color: rgb(180, 142, 173);"
192
+ >
193
+ return
194
+ </span>
195
+ <span>
196
+
197
+
198
+ </span>
199
+ }
200
+
201
+ lastCall = now
202
+
203
+ <span>
204
+
205
+ </span>
206
+ <span
207
+ style="color: rgb(180, 142, 173);"
208
+ >
209
+ return
210
+ </span>
211
+ <span>
212
+ fn(...args)
213
+
214
+ </span>
215
+ }
216
+
217
+ <span>
218
+
219
+ </span>
220
+ <span
221
+ style="color: rgb(180, 142, 173);"
222
+ >
223
+ return
224
+ </span>
225
+ <span>
226
+ throttleExec
227
+
228
+ </span>
229
+ }
230
+
231
+ </code>
232
+ </pre>
233
+ </div>
234
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papillonarts/library",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Papillon Arts Library",
5
5
  "homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/library",
6
6
  "repository": {
@@ -44,5 +44,5 @@
44
44
  "build-acceptance": "npm run build",
45
45
  "build-release": "npm run build"
46
46
  },
47
- "gitHead": "8ef38bffed97c329ca6a1f5bacaa938528d256cc"
47
+ "gitHead": "a25df9d681c0437774e2f12b38951d975e75aa47"
48
48
  }