@twobirds/microcomponents 0.0.4 → 0.0.7

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.
Files changed (30) hide show
  1. package/MicroComponentProposal_draft.md +1 -1
  2. package/README.md +85 -36
  3. package/dist/microcomponents.d.ts +218 -2
  4. package/dist/microcomponents.d.ts.map +1 -1
  5. package/dist/microcomponents.js +237 -43
  6. package/dist/microcomponents.min.js +7 -6
  7. package/dist/microcomponents.ts +391 -201
  8. package/jsdoc.conf.json +19 -0
  9. package/microcomponents_functional_requirements.md +8 -0
  10. package/microcomponents_usage.md +56 -24
  11. package/package.json +13 -2
  12. package/public/docs/assets/highlight.css +14 -14
  13. package/public/docs/assets/search.js +1 -1
  14. package/public/docs/classes/microcomponents.MC.html +179 -41
  15. package/public/docs/classes/microcomponents_es3.MC.html +12 -12
  16. package/public/docs/functions/microcomponents_es3.__isEmpty.html +1 -1
  17. package/public/docs/index.html +18 -16
  18. package/public/docs/interfaces/microcomponents.HTMLElementMc.html +2 -2
  19. package/public/docs/modules/microcomponents.html +1 -1
  20. package/public/jsdoc/es3/files.html +216 -0
  21. package/public/jsdoc/es3/index.html +210 -0
  22. package/public/jsdoc/es3/symbols/_global_.html +368 -0
  23. package/public/jsdoc/es3/symbols/src/build_microcomponents.es3.js.html +104 -0
  24. package/public/jsdoc/es5+/files.html +218 -0
  25. package/public/jsdoc/es5+/index.html +218 -0
  26. package/public/jsdoc/es5+/symbols/MC.html +621 -0
  27. package/public/jsdoc/es5+/symbols/_global_.html +720 -0
  28. package/public/jsdoc/es5+/symbols/microcomponents.MC.html +323 -0
  29. package/public/jsdoc/es5+/symbols/src/build_microcomponents.js.html +375 -0
  30. package/src/microcomponents.ts +391 -201
@@ -0,0 +1,720 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <meta name="generator" content="JsDoc Toolkit" />
7
+
8
+ <title>JsDoc Reference - _global_</title>
9
+
10
+ <style type="text/css">
11
+ /* default.css */
12
+ body
13
+ {
14
+ font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
15
+ width: 800px;
16
+ }
17
+
18
+ .header
19
+ {
20
+ clear: both;
21
+ background-color: #ccc;
22
+ padding: 8px;
23
+ }
24
+
25
+ h1
26
+ {
27
+ font-size: 150%;
28
+ font-weight: bold;
29
+ padding: 0;
30
+ margin: 1em 0 0 .3em;
31
+ }
32
+
33
+ hr
34
+ {
35
+ border: none 0;
36
+ border-top: 1px solid #7F8FB1;
37
+ height: 1px;
38
+ }
39
+
40
+ pre.code
41
+ {
42
+ display: block;
43
+ padding: 8px;
44
+ border: 1px dashed #ccc;
45
+ }
46
+
47
+ #index
48
+ {
49
+ margin-top: 24px;
50
+ float: left;
51
+ width: 160px;
52
+ position: absolute;
53
+ left: 8px;
54
+ background-color: #F3F3F3;
55
+ padding: 8px;
56
+ }
57
+
58
+ #content
59
+ {
60
+ margin-left: 190px;
61
+ width: 600px;
62
+ }
63
+
64
+ .classList
65
+ {
66
+ list-style-type: none;
67
+ padding: 0;
68
+ margin: 0 0 0 8px;
69
+ font-family: arial, sans-serif;
70
+ font-size: 1em;
71
+ overflow: auto;
72
+ }
73
+
74
+ .classList li
75
+ {
76
+ padding: 0;
77
+ margin: 0 0 8px 0;
78
+ }
79
+
80
+ .summaryTable { width: 100%; }
81
+
82
+ h1.classTitle
83
+ {
84
+ font-size:170%;
85
+ line-height:130%;
86
+ }
87
+
88
+ h2 { font-size: 110%; }
89
+ caption, div.sectionTitle
90
+ {
91
+ background-color: #7F8FB1;
92
+ color: #fff;
93
+ font-size:130%;
94
+ text-align: left;
95
+ padding: 2px 6px 2px 6px;
96
+ border: 1px #7F8FB1 solid;
97
+ }
98
+
99
+ div.sectionTitle { margin-bottom: 8px; }
100
+ .summaryTable thead { display: none; }
101
+
102
+ .summaryTable td
103
+ {
104
+ vertical-align: top;
105
+ padding: 4px;
106
+ border-bottom: 1px #7F8FB1 solid;
107
+ border-right: 1px #7F8FB1 solid;
108
+ }
109
+
110
+ /*col#summaryAttributes {}*/
111
+ .summaryTable td.attributes
112
+ {
113
+ border-left: 1px #7F8FB1 solid;
114
+ width: 140px;
115
+ text-align: right;
116
+ }
117
+
118
+ td.attributes, .fixedFont
119
+ {
120
+ line-height: 15px;
121
+ color: #002EBE;
122
+ font-family: "Courier New",Courier,monospace;
123
+ font-size: 13px;
124
+ }
125
+
126
+ .summaryTable td.nameDescription
127
+ {
128
+ text-align: left;
129
+ font-size: 13px;
130
+ line-height: 15px;
131
+ }
132
+
133
+ .summaryTable td.nameDescription, .description
134
+ {
135
+ line-height: 15px;
136
+ padding: 4px;
137
+ padding-left: 4px;
138
+ }
139
+
140
+ .summaryTable { margin-bottom: 8px; }
141
+
142
+ ul.inheritsList
143
+ {
144
+ list-style: square;
145
+ margin-left: 20px;
146
+ padding-left: 0;
147
+ }
148
+
149
+ .detailList {
150
+ margin-left: 20px;
151
+ line-height: 15px;
152
+ }
153
+ .detailList dt { margin-left: 20px; }
154
+
155
+ .detailList .heading
156
+ {
157
+ font-weight: bold;
158
+ padding-bottom: 6px;
159
+ margin-left: 0;
160
+ }
161
+
162
+ .light, td.attributes, .light a:link, .light a:visited
163
+ {
164
+ color: #777;
165
+ font-style: italic;
166
+ }
167
+
168
+ .fineprint
169
+ {
170
+ text-align: right;
171
+ font-size: 10px;
172
+ }
173
+ </style>
174
+ </head>
175
+
176
+ <body>
177
+ <!-- ============================== header ================================= -->
178
+ <!-- begin static/header.html -->
179
+ <div id="header">
180
+ </div>
181
+ <!-- end static/header.html -->
182
+
183
+ <!-- ============================== classes index ============================ -->
184
+ <div id="index">
185
+ <!-- begin publish.classesIndex -->
186
+ <div align="center"><a href="../index.html">Class Index</a>
187
+ | <a href="../files.html">File Index</a></div>
188
+ <hr />
189
+ <h2>Classes</h2>
190
+ <ul class="classList">
191
+
192
+ <li><i><a href="../symbols/_global_.html">_global_</a></i></li>
193
+
194
+ <li><a href="../symbols/MC.html">MC</a></li>
195
+
196
+ </ul>
197
+ <hr />
198
+ <!-- end publish.classesIndex -->
199
+ </div>
200
+
201
+ <div id="content">
202
+ <!-- ============================== class title ============================ -->
203
+ <h1 class="classTitle">
204
+
205
+ Built-In Namespace _global_
206
+ </h1>
207
+
208
+ <!-- ============================== class summary ========================== -->
209
+ <p class="description">
210
+
211
+
212
+
213
+
214
+
215
+
216
+ </p>
217
+
218
+ <!-- ============================== constructor summary ==================== -->
219
+
220
+
221
+ <!-- ============================== properties summary ===================== -->
222
+
223
+
224
+
225
+ <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class _global_.">
226
+ <caption>Field Summary</caption>
227
+ <thead>
228
+ <tr>
229
+ <th scope="col">Field Attributes</th>
230
+ <th scope="col">Field Name and Description</th>
231
+ </tr>
232
+ </thead>
233
+ <tbody>
234
+
235
+ <tr>
236
+ <td class="attributes">&nbsp;</td>
237
+ <td class="nameDescription">
238
+ <div class="fixedFont">
239
+ <b><a href="../symbols/_global_.html#_mc">_mc</a></b>
240
+ </div>
241
+ <div class="description">exposes private microcomponents in debug mode.</div>
242
+ </td>
243
+ </tr>
244
+
245
+ <tr>
246
+ <td class="attributes">&nbsp;</td>
247
+ <td class="nameDescription">
248
+ <div class="fixedFont">
249
+ <b><a href="../symbols/_global_.html#target">target</a></b>
250
+ </div>
251
+ <div class="description">target is a DOM element or a parent MC</div>
252
+ </td>
253
+ </tr>
254
+
255
+ </tbody>
256
+ </table>
257
+
258
+
259
+
260
+
261
+
262
+ <!-- ============================== methods summary ======================== -->
263
+
264
+
265
+
266
+ <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class _global_.">
267
+ <caption>Method Summary</caption>
268
+ <thead>
269
+ <tr>
270
+ <th scope="col">Method Attributes</th>
271
+ <th scope="col">Method Name and Description</th>
272
+ </tr>
273
+ </thead>
274
+ <tbody>
275
+
276
+ <tr>
277
+ <td class="attributes">&nbsp;</td>
278
+ <td class="nameDescription">
279
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#add">add</a></b>(key, element)
280
+ </div>
281
+ <div class="description">adds a microcomponent to the private collection.</div>
282
+ </td>
283
+ </tr>
284
+
285
+ <tr>
286
+ <td class="attributes">&nbsp;</td>
287
+ <td class="nameDescription">
288
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#children">children</a></b>(search)
289
+ </div>
290
+ <div class="description">retrieves nearest child _mc DOM nodes, gets their matching microcomponents, and stops there.</div>
291
+ </td>
292
+ </tr>
293
+
294
+ <tr>
295
+ <td class="attributes">&nbsp;</td>
296
+ <td class="nameDescription">
297
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#parent">parent</a></b>(search)
298
+ </div>
299
+ <div class="description">retrieves the first ancestor DOM node with a matching microcomponent.</div>
300
+ </td>
301
+ </tr>
302
+
303
+ <tr>
304
+ <td class="attributes">&nbsp;</td>
305
+ <td class="nameDescription">
306
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#parents">parents</a></b>(search)
307
+ </div>
308
+ <div class="description">retrieves the first ancestor DOM node with a matching microcomponent.</div>
309
+ </td>
310
+ </tr>
311
+
312
+ <tr>
313
+ <td class="attributes">&nbsp;</td>
314
+ <td class="nameDescription">
315
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#remove">remove</a></b>(key)
316
+ </div>
317
+ <div class="description">removes a microcomponent from the private collection.</div>
318
+ </td>
319
+ </tr>
320
+
321
+ <tr>
322
+ <td class="attributes">&nbsp;</td>
323
+ <td class="nameDescription">
324
+ <div class="fixedFont"><b><a href="../symbols/_global_.html#siblings">siblings</a></b>(search)
325
+ </div>
326
+ <div class="description">removes a microcomponent from the private collection.</div>
327
+ </td>
328
+ </tr>
329
+
330
+ </tbody>
331
+ </table>
332
+
333
+
334
+
335
+
336
+ <!-- ============================== events summary ======================== -->
337
+
338
+
339
+ <!-- ============================== constructor details ==================== -->
340
+
341
+
342
+ <!-- ============================== field details ========================== -->
343
+
344
+ <div class="sectionTitle">
345
+ Field Detail
346
+ </div>
347
+
348
+ <a name="_mc"> </a>
349
+ <div class="fixedFont">
350
+
351
+
352
+ <b>_mc</b>
353
+
354
+ </div>
355
+ <div class="description">
356
+ exposes private microcomponents in debug mode.
357
+
358
+ <br />
359
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
360
+
361
+
362
+ </div>
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+ <hr />
372
+
373
+ <a name="target"> </a>
374
+ <div class="fixedFont">
375
+
376
+
377
+ <b>target</b>
378
+
379
+ </div>
380
+ <div class="description">
381
+ target is a DOM element or a parent MC
382
+
383
+ <br />
384
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
385
+
386
+
387
+ </div>
388
+
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+
399
+
400
+ <!-- ============================== method details ========================= -->
401
+
402
+ <div class="sectionTitle">
403
+ Method Detail
404
+ </div>
405
+
406
+ <a name="add"> </a>
407
+ <div class="fixedFont">
408
+
409
+ <span class="light">{any}</span>
410
+ <b>add</b>(key, element)
411
+
412
+ </div>
413
+ <div class="description">
414
+ adds a microcomponent to the private collection.
415
+
416
+ <br />
417
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
418
+
419
+
420
+ </div>
421
+
422
+
423
+
424
+ <pre class="code">const privateComp = this.add('privateComponent', {});</pre>
425
+
426
+
427
+
428
+
429
+ <dl class="detailList">
430
+ <dt class="heading">Parameters:</dt>
431
+
432
+ <dt>
433
+ <span class="light fixedFont">{string}</span> <b>key</b>
434
+ <i>Optional</i>
435
+ </dt>
436
+ <dd>- The key to identify the microcomponent.</dd>
437
+
438
+ <dt>
439
+ <span class="light fixedFont">{any}</span> <b>element</b>
440
+ <i>Optional, Default: {}</i>
441
+ </dt>
442
+ <dd>- The microcomponent to add.</dd>
443
+
444
+ </dl>
445
+
446
+
447
+
448
+
449
+
450
+ <dl class="detailList">
451
+ <dt class="heading">Returns:</dt>
452
+
453
+ <dd><span class="light fixedFont">{any}</span> The added microcomponent.</dd>
454
+
455
+ </dl>
456
+
457
+
458
+
459
+
460
+ <hr />
461
+
462
+ <a name="children"> </a>
463
+ <div class="fixedFont">
464
+
465
+ <span class="light">{Array<any>}</span>
466
+ <b>children</b>(search)
467
+
468
+ </div>
469
+ <div class="description">
470
+ retrieves nearest child _mc DOM nodes, gets their matching microcomponents, and stops there.
471
+
472
+ <br />
473
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
474
+
475
+
476
+ </div>
477
+
478
+
479
+
480
+ <pre class="code">const children = mcInstance.children('childComponent');</pre>
481
+
482
+
483
+
484
+
485
+ <dl class="detailList">
486
+ <dt class="heading">Parameters:</dt>
487
+
488
+ <dt>
489
+ <span class="light fixedFont">{string}</span> <b>search</b>
490
+ <i>Optional</i>
491
+ </dt>
492
+ <dd>- The key of the specific microcomponent.</dd>
493
+
494
+ </dl>
495
+
496
+
497
+
498
+
499
+
500
+ <dl class="detailList">
501
+ <dt class="heading">Returns:</dt>
502
+
503
+ <dd><span class="light fixedFont">{Array<any>}</span> An array of matching child microcomponents.</dd>
504
+
505
+ </dl>
506
+
507
+
508
+
509
+
510
+ <hr />
511
+
512
+ <a name="parent"> </a>
513
+ <div class="fixedFont">
514
+
515
+ <span class="light">{Array<any>}</span>
516
+ <b>parent</b>(search)
517
+
518
+ </div>
519
+ <div class="description">
520
+ retrieves the first ancestor DOM node with a matching microcomponent.
521
+
522
+ <br />
523
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
524
+
525
+
526
+ </div>
527
+
528
+
529
+
530
+ <pre class="code">const parent = mcInstance.parent('parentComponent');</pre>
531
+
532
+
533
+
534
+
535
+ <dl class="detailList">
536
+ <dt class="heading">Parameters:</dt>
537
+
538
+ <dt>
539
+ <span class="light fixedFont">{string}</span> <b>search</b>
540
+ <i>Optional</i>
541
+ </dt>
542
+ <dd>- The key of the specific microcomponent.</dd>
543
+
544
+ </dl>
545
+
546
+
547
+
548
+
549
+
550
+ <dl class="detailList">
551
+ <dt class="heading">Returns:</dt>
552
+
553
+ <dd><span class="light fixedFont">{Array<any>}</span> An array with the matching microcomponent.</dd>
554
+
555
+ </dl>
556
+
557
+
558
+
559
+
560
+ <hr />
561
+
562
+ <a name="parents"> </a>
563
+ <div class="fixedFont">
564
+
565
+ <span class="light">{Array<any>}</span>
566
+ <b>parents</b>(search)
567
+
568
+ </div>
569
+ <div class="description">
570
+ retrieves the first ancestor DOM node with a matching microcomponent.
571
+
572
+ <br />
573
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
574
+
575
+
576
+ </div>
577
+
578
+
579
+
580
+ <pre class="code">const parents = mcInstance.parents('ancestorComponent');</pre>
581
+
582
+
583
+
584
+
585
+ <dl class="detailList">
586
+ <dt class="heading">Parameters:</dt>
587
+
588
+ <dt>
589
+ <span class="light fixedFont">{string}</span> <b>search</b>
590
+ <i>Optional</i>
591
+ </dt>
592
+ <dd>- The key of the specific microcomponent.</dd>
593
+
594
+ </dl>
595
+
596
+
597
+
598
+
599
+
600
+ <dl class="detailList">
601
+ <dt class="heading">Returns:</dt>
602
+
603
+ <dd><span class="light fixedFont">{Array<any>}</span> An array of matching ancestor microcomponents.</dd>
604
+
605
+ </dl>
606
+
607
+
608
+
609
+
610
+ <hr />
611
+
612
+ <a name="remove"> </a>
613
+ <div class="fixedFont">
614
+
615
+
616
+ <b>remove</b>(key)
617
+
618
+ </div>
619
+ <div class="description">
620
+ removes a microcomponent from the private collection.
621
+
622
+ <br />
623
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
624
+
625
+
626
+ </div>
627
+
628
+
629
+
630
+ <pre class="code">this.remove('privateComponent');</pre>
631
+
632
+
633
+
634
+
635
+ <dl class="detailList">
636
+ <dt class="heading">Parameters:</dt>
637
+
638
+ <dt>
639
+ <span class="light fixedFont">{string}</span> <b>key</b>
640
+ <i>Optional</i>
641
+ </dt>
642
+ <dd>- The key to identify the microcomponent.</dd>
643
+
644
+ </dl>
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+ <hr />
654
+
655
+ <a name="siblings"> </a>
656
+ <div class="fixedFont">
657
+
658
+ <span class="light">{Array<any>}</span>
659
+ <b>siblings</b>(search)
660
+
661
+ </div>
662
+ <div class="description">
663
+ removes a microcomponent from the private collection.
664
+
665
+ <br />
666
+ <i>Defined in: </i> <a href="../symbols/src/build_microcomponents.js.html">microcomponents.js</a>.
667
+
668
+
669
+ </div>
670
+
671
+
672
+
673
+ <pre class="code">const siblings = this.siblings('siblingComponent');</pre>
674
+
675
+
676
+
677
+
678
+ <dl class="detailList">
679
+ <dt class="heading">Parameters:</dt>
680
+
681
+ <dt>
682
+ <span class="light fixedFont">{string}</span> <b>search</b>
683
+ <i>Optional</i>
684
+ </dt>
685
+ <dd>- The key of the specific microcomponent.</dd>
686
+
687
+ </dl>
688
+
689
+
690
+
691
+
692
+
693
+ <dl class="detailList">
694
+ <dt class="heading">Returns:</dt>
695
+
696
+ <dd><span class="light fixedFont">{Array<any>}</span> An array of matching sibling microcomponents.</dd>
697
+
698
+ </dl>
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+ <!-- ============================== event details ========================= -->
708
+
709
+
710
+ <hr />
711
+ </div>
712
+
713
+
714
+ <!-- ============================== footer ================================= -->
715
+ <div class="fineprint" style="clear:both">
716
+
717
+ Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0 on Wed Oct 30 2024 23:18:47 GMT+0100 (MEZ)
718
+ </div>
719
+ </body>
720
+ </html>