@twobirds/microcomponents 0.0.10 → 0.0.12
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.
- package/README.md +2 -4
- package/assets/test.html +11 -0
- package/dist/microcomponents.d.ts +15 -231
- package/dist/microcomponents.d.ts.map +1 -1
- package/dist/microcomponents.es3.d.ts +5 -0
- package/dist/microcomponents.es3.d.ts.map +1 -1
- package/dist/microcomponents.js +143 -334
- package/dist/microcomponents.min.js +32 -29
- package/dist/microcomponents.ts +209 -395
- package/dist/test.d.ts +36 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +214 -0
- package/package.json +3 -4
- package/public/{docs/assets → assets}/highlight.css +29 -22
- package/public/assets/search.js +1 -0
- package/public/{docs/classes → classes}/microcomponents.MC.html +78 -241
- package/public/{docs/classes → classes}/microcomponents_es3.MC.html +12 -12
- package/public/{docs/functions → functions}/microcomponents_es3.__isEmpty.html +1 -1
- package/public/index.html +101 -11
- package/public/microcomponents.js +176 -0
- package/public/{docs/modules → modules}/microcomponents.html +2 -7
- package/public/test.html +11 -0
- package/public/test.js +214 -0
- package/src/microcomponents.ts +209 -395
- package/src/test.js +245 -0
- package/typedoc.json +1 -1
- package/assets/index.html +0 -11
- package/jsdoc.conf.json +0 -19
- package/public/docs/assets/search.js +0 -1
- package/public/docs/index.html +0 -97
- package/public/docs/interfaces/microcomponents.HTMLElementMc.html +0 -3605
- package/public/jsdoc/es3/files.html +0 -216
- package/public/jsdoc/es3/index.html +0 -210
- package/public/jsdoc/es3/symbols/_global_.html +0 -368
- package/public/jsdoc/es3/symbols/src/build_microcomponents.es3.js.html +0 -104
- package/public/jsdoc/es5+/files.html +0 -218
- package/public/jsdoc/es5+/index.html +0 -218
- package/public/jsdoc/es5+/symbols/MC.html +0 -621
- package/public/jsdoc/es5+/symbols/_global_.html +0 -720
- package/public/jsdoc/es5+/symbols/microcomponents.MC.html +0 -323
- package/public/jsdoc/es5+/symbols/src/build_microcomponents.js.html +0 -375
- /package/public/{docs/.nojekyll → .nojekyll} +0 -0
- /package/public/{docs/assets → assets}/main.js +0 -0
- /package/public/{docs/assets → assets}/style.css +0 -0
- /package/public/{docs/modules → modules}/microcomponents_es3.html +0 -0
- /package/public/{docs/modules.html → modules.html} +0 -0
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
<ul class="tsd-hierarchy">
|
|
22
22
|
<li><span class="target">MC</span></li></ul></section><aside class="tsd-sources">
|
|
23
23
|
<ul>
|
|
24
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
25
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
26
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
24
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L13">microcomponents.es3.js:13</a></li>
|
|
25
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L18">microcomponents.es3.js:18</a></li>
|
|
26
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L26">microcomponents.es3.js:26</a></li></ul></aside>
|
|
27
27
|
<section class="tsd-panel-group tsd-index-group">
|
|
28
28
|
<section class="tsd-panel tsd-index-panel">
|
|
29
29
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
<h5>target: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
62
62
|
<h4 class="tsd-returns-title">Returns <a href="microcomponents_es3.MC.html" class="tsd-signature-type" data-tsd-kind="Class">MC</a></h4><aside class="tsd-sources">
|
|
63
63
|
<ul>
|
|
64
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
64
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L13">microcomponents.es3.js:13</a></li></ul></aside></li></ul></section></section>
|
|
65
65
|
<section class="tsd-panel-group tsd-member-group">
|
|
66
66
|
<h2>Properties</h2>
|
|
67
67
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="_target" class="tsd-anchor"></a>
|
|
68
68
|
<h3 class="tsd-anchor-link"><span>_target</span><a href="#_target" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
69
69
|
<div class="tsd-signature">_target<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div><aside class="tsd-sources">
|
|
70
70
|
<ul>
|
|
71
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
71
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L14">microcomponents.es3.js:14</a></li></ul></aside></section></section>
|
|
72
72
|
<section class="tsd-panel-group tsd-member-group">
|
|
73
73
|
<h2>Methods</h2>
|
|
74
74
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="children" class="tsd-anchor"></a>
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<h5>search: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
84
84
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
85
85
|
<ul>
|
|
86
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
86
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L75">microcomponents.es3.js:75</a></li></ul></aside></li></ul></section>
|
|
87
87
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="descendants" class="tsd-anchor"></a>
|
|
88
88
|
<h3 class="tsd-anchor-link"><span>descendants</span><a href="#descendants" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
89
89
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<h5>search: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
97
97
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
98
98
|
<ul>
|
|
99
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
99
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L92">microcomponents.es3.js:92</a></li></ul></aside></li></ul></section>
|
|
100
100
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="parent" class="tsd-anchor"></a>
|
|
101
101
|
<h3 class="tsd-anchor-link"><span>parent</span><a href="#parent" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
102
102
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<h5>search: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
110
110
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><aside class="tsd-sources">
|
|
111
111
|
<ul>
|
|
112
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
112
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L51">microcomponents.es3.js:51</a></li></ul></aside></li></ul></section>
|
|
113
113
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="parents" class="tsd-anchor"></a>
|
|
114
114
|
<h3 class="tsd-anchor-link"><span>parents</span><a href="#parents" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
115
115
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
<h5>search: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
123
123
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
124
124
|
<ul>
|
|
125
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
125
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L63">microcomponents.es3.js:63</a></li></ul></aside></li></ul></section>
|
|
126
126
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="siblings" class="tsd-anchor"></a>
|
|
127
127
|
<h3 class="tsd-anchor-link"><span>siblings</span><a href="#siblings" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
128
128
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<h5>search: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
136
136
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
137
137
|
<ul>
|
|
138
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
138
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L35">microcomponents.es3.js:35</a></li></ul></aside></li></ul></section>
|
|
139
139
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="add" class="tsd-anchor"></a>
|
|
140
140
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
141
141
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
<h5>element: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
153
153
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">typeof </span><a href="microcomponents_es3.MC.html" class="tsd-signature-type" data-tsd-kind="Class">MC</a></h4><aside class="tsd-sources">
|
|
154
154
|
<ul>
|
|
155
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
155
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L18">microcomponents.es3.js:18</a></li></ul></aside></li></ul></section>
|
|
156
156
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="remove" class="tsd-anchor"></a>
|
|
157
157
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>remove</span><a href="#remove" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
|
|
158
158
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
<h5>key: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
168
168
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">typeof </span><a href="microcomponents_es3.MC.html" class="tsd-signature-type" data-tsd-kind="Class">MC</a></h4><aside class="tsd-sources">
|
|
169
169
|
<ul>
|
|
170
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
170
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L26">microcomponents.es3.js:26</a></li></ul></aside></li></ul></section></section></div>
|
|
171
171
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
172
172
|
<div class="tsd-navigation settings">
|
|
173
173
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<h5>obj: <span class="tsd-signature-type">any</span></h5></li></ul></div>
|
|
28
28
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
29
29
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
30
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.es3.js#L3">microcomponents.es3.js:3</a></li></ul></aside></li></ul></section></div>
|
|
31
31
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
32
32
|
<div class="tsd-navigation settings">
|
|
33
33
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
package/public/index.html
CHANGED
|
@@ -1,11 +1,101 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Micro Components</title><meta name="description" content="Documentation for Micro Components"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container">
|
|
3
|
+
<div class="table-cell" id="tsd-search" data-base=".">
|
|
4
|
+
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
5
|
+
<div class="field">
|
|
6
|
+
<div id="tsd-toolbar-links"></div></div>
|
|
7
|
+
<ul class="results">
|
|
8
|
+
<li class="state loading">Preparing search index...</li>
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">Micro Components</a></div>
|
|
10
|
+
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
|
+
<div class="container container-main">
|
|
12
|
+
<div class="col-8 col-content">
|
|
13
|
+
<div class="tsd-page-title">
|
|
14
|
+
<h2>Micro Components</h2></div>
|
|
15
|
+
<div class="tsd-panel tsd-typography">
|
|
16
|
+
<a href="#micro-components" id="micro-components" style="color: inherit; text-decoration: none;">
|
|
17
|
+
<h2>MICRO COMPONENTS</h2>
|
|
18
|
+
</a>
|
|
19
|
+
<p><img src="https://gitlab.com/twoBirds/microcomponents/-/raw/main/MicroComponents.svg" alt="Micro Components Logo"></p>
|
|
20
|
+
<p><strong>This code aims at improving Javascript modularity and encapsulation</strong>.</p>
|
|
21
|
+
<p>Importing a custom MC in your client side code:</p>
|
|
22
|
+
<pre><code class="language-javascript"><span class="hl-0">import</span><span class="hl-1"> </span><span class="hl-2">MyButton</span><span class="hl-1"> </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">'@mySampleLib/Button'</span><span class="hl-1">;</span>
|
|
23
|
+
</code></pre>
|
|
24
|
+
<p>... is equivalent to:</p>
|
|
25
|
+
<pre><code class="language-javascript"><span class="hl-2">npm</span><span class="hl-1"> </span><span class="hl-2">i</span><span class="hl-1"> @</span><span class="hl-2">mySampleLib</span><span class="hl-1">/</span><span class="hl-2">Button</span><span class="hl-1">;</span>
|
|
26
|
+
</code></pre>
|
|
27
|
+
<p>... on the server side.</p>
|
|
28
|
+
<p>Imagine your micro components to be organized like a "node_modules" directory that is attached to a DOM node.</p>
|
|
29
|
+
<p><strong>On the client side</strong> MCs reside inside DOM nodes in a "_mc" property, or inside each other recursively. Usually they provide a direct interface to their inner code.</p>
|
|
30
|
+
<p><strong>On the server side</strong> MCs can be used to organize your code, too.</p>
|
|
31
|
+
|
|
32
|
+
<a href="#status" id="status" style="color: inherit; text-decoration: none;">
|
|
33
|
+
<h2>Status</h2>
|
|
34
|
+
</a>
|
|
35
|
+
<p>WIP. Micro components should be done soon, as in days.</p>
|
|
36
|
+
|
|
37
|
+
<a href="#disclaimer" id="disclaimer" style="color: inherit; text-decoration: none;">
|
|
38
|
+
<h2>Disclaimer</h2>
|
|
39
|
+
</a>
|
|
40
|
+
<p>I decided to extract this functionality from the <a href="https://www.npmjs.com/package/twobirds-core">twoBirds framework</a>, since it is framework agnostic, and relies solely on the standard DOM and native javascript or typescript, and is a useful tool in itself. Later this will be backported into twoBirds as a dependency, and twoBirds will become completely modularized on the base of MCs.</p>
|
|
41
|
+
<p>This is a massive undertaking. MCs are just the foundation of what I do. <strong>I am about to dump</strong> <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/main/microcomponents_magic.md?ref_type=heads#things-i-already-did-with-this-in-my-own-framework-twobirds-or-in-apps-that-i-developed-with-it">20+ years of javascript programming</a> <strong>into open source libraries</strong>, so feel free to <a href="https://gofund.me/076c614c">fund this</a>. The better this is funded, the faster it will be done. Given enough resources, I will start a crowdfunded company that will develop a new ecosystem for javascript/typescript programming.</p>
|
|
42
|
+
<p>By <strong>"Open Source"</strong> I mean <strong>really free and open</strong>, as <strong>you get all my inner source code with it</strong>. Once you understand the Micro Component principle, you are back in command of your software, no matter what MC functionality you import in your system. Since <strong>Micro Components</strong> are encapsuled, off-shoring and near-shoring is no problem, and reusability is guaranteed. Your external coders do not need to access your code repository or your toolchain. They only need to understand MCs.</p>
|
|
43
|
+
<p><strong>Established frameworks</strong>, as opposed to MCs, <strong>provide a documented interface to a hidden layer of closed source inner functionality</strong>. MCs can be used to <strong>add an interface to components you developed using other frameworks</strong>. So you can still use your existing code, and MCs in it. But you will want to migrate it ASAP, since MCs work with any FW.</p>
|
|
44
|
+
|
|
45
|
+
<a href="#general" id="general" style="color: inherit; text-decoration: none;">
|
|
46
|
+
<h2>General</h2>
|
|
47
|
+
</a>
|
|
48
|
+
<p>Using micro components enforces <strong>DRY, KISS and SOLID</strong> principles in Javascript programming. Read this <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/main/MicroComponentProposal_draft.md?ref_type=heads">RFC</a> for the shortest info, and <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/main/microcomponents_why.md?ref_type=heads">click here to see why you may want to use it</a>.</p>
|
|
49
|
+
<p>This is a low-level approach. It consists of a single class with 3 static methods and 5 selector methods, and weights in at ~2 kB. Also there is an ES3 version to help e.g. <a href="https://en.wikipedia.org/wiki/Hybrid_Broadcast_Broadband_TV">hbbtv</a> modular JS coding, or any other device that relies on ES3. The latter is WIP, backporting is currently last on my list.</p>
|
|
50
|
+
<p>For a short usage description goto <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/main/microcomponents_usage.md?ref_type=heads">Micro Component Usage</a>.</p>
|
|
51
|
+
<p>Check the <a href="http://twobirds.gitlab.io/microcomponents/classes/microcomponents.MC.html">typedoc API reference</a> if you want to drill into the source code.</p>
|
|
52
|
+
<p>To see what can be done, go to <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/main/microcomponents_magic.md?ref_type=heads">additional concepts</a> which shows what it already has been used for.</p>
|
|
53
|
+
|
|
54
|
+
<a href="#simple-usage" id="simple-usage" style="color: inherit; text-decoration: none;">
|
|
55
|
+
<h2>Simple Usage:</h2>
|
|
56
|
+
</a>
|
|
57
|
+
<p><strong>Micro Components</strong> can be added to to a DOM element like this:</p>
|
|
58
|
+
<p>before:</p>
|
|
59
|
+
<pre><code class="language-HTML"><span class="hl-4"><</span><span class="hl-5">div</span><span class="hl-4">></</span><span class="hl-5">div</span><span class="hl-4">></span>
|
|
60
|
+
</code></pre>
|
|
61
|
+
<p>code:</p>
|
|
62
|
+
<pre><code class="language-typescript"><span class="hl-6">// create an inner micro component class</span><br/><span class="hl-7">class</span><span class="hl-1"> </span><span class="hl-8">MyInnerMC</span><span class="hl-1"> </span><span class="hl-7">extends</span><span class="hl-1"> </span><span class="hl-8">MC</span><span class="hl-1">{</span><br/><br/><span class="hl-1"> </span><span class="hl-7">constructor</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> ){</span><br/><span class="hl-1"> </span><span class="hl-7">super</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> );</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-9">doSomething</span><span class="hl-1">(){</span><br/><span class="hl-1"> </span><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-9">log</span><span class="hl-1">( </span><span class="hl-7">this</span><span class="hl-1">, </span><span class="hl-3">'something done'</span><span class="hl-1"> )</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-6">// create a custom micro component class</span><br/><span class="hl-7">class</span><span class="hl-1"> </span><span class="hl-8">MyMC</span><span class="hl-1"> </span><span class="hl-7">extends</span><span class="hl-1"> </span><span class="hl-8">MC</span><span class="hl-1">{</span><br/><br/><span class="hl-1"> </span><span class="hl-7">private</span><span class="hl-1"> </span><span class="hl-2">myInner</span><span class="hl-1">: </span><span class="hl-8">MyInnerMC</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-7">constructor</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> ){</span><br/><span class="hl-1"> </span><span class="hl-7">super</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> );</span><br/><span class="hl-1"> </span><span class="hl-7">this</span><span class="hl-1">.</span><span class="hl-2">target</span><span class="hl-1"> = </span><span class="hl-2">target</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-6">//add a private inner micro component</span><br/><span class="hl-1"> </span><span class="hl-7">this</span><span class="hl-1">.</span><span class="hl-2">myInner</span><span class="hl-1"> = </span><span class="hl-7">new</span><span class="hl-1"> </span><span class="hl-9">MyInnerMC</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> );</span><br/><br/><span class="hl-1"> </span><span class="hl-6">//add a public micro component</span><br/><span class="hl-1"> </span><span class="hl-7">this</span><span class="hl-1">.</span><span class="hl-9">add</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-3">'myPublicInnerMC'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">new</span><span class="hl-1"> </span><span class="hl-9">MyInnerMC</span><span class="hl-1">( </span><span class="hl-2">target</span><span class="hl-1"> )</span><br/><span class="hl-1"> );</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-6">// get some element from the DOM</span><br/><span class="hl-7">const</span><span class="hl-1"> </span><span class="hl-10">element</span><span class="hl-1"> = </span><span class="hl-2">document</span><span class="hl-1">.</span><span class="hl-9">querySelector</span><span class="hl-1">(</span><span class="hl-3">'div'</span><span class="hl-1">)</span><br/><br/><span class="hl-6">// Add the custom micro component instance to the target element</span><br/><span class="hl-7">let</span><span class="hl-1"> </span><span class="hl-2">topLevelMC</span><span class="hl-1"> = </span><span class="hl-10">MC</span><span class="hl-1">.</span><span class="hl-9">add</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">element</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">'myMC'</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">new</span><span class="hl-1"> </span><span class="hl-9">MyMC</span><span class="hl-1">( </span><span class="hl-2">element</span><span class="hl-1"> )</span><br/><span class="hl-1">);</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-9">log</span><span class="hl-1">( </span><span class="hl-2">element</span><span class="hl-1">.</span><span class="hl-2">_mc</span><span class="hl-1"> );</span><br/><span class="hl-6">// { 'myMC': { target: (element), _mc: { myPublicInnerMC: {...} } } }</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-9">log</span><span class="hl-1">( </span><span class="hl-2">element</span><span class="hl-1">.</span><span class="hl-2">_mc</span><span class="hl-1">.</span><span class="hl-2">myMC</span><span class="hl-1"> );</span><br/><span class="hl-6">// { target: (element), _mc: { myPublicInnerMC: {...} } }</span><br/><br/><span class="hl-2">console</span><span class="hl-1">.</span><span class="hl-9">log</span><span class="hl-1">( </span><span class="hl-2">topLevelMC</span><span class="hl-1">.</span><span class="hl-9">siblings</span><span class="hl-1">() );</span><br/><span class="hl-6">// [ { target: (element), _mc: { myPublicInnerMC: {...} } } ]</span>
|
|
63
|
+
</code></pre>
|
|
64
|
+
<p>after:</p>
|
|
65
|
+
<pre><code class="language-HTML"><span class="hl-4"><</span><span class="hl-5">div</span><span class="hl-1"> </span><span class="hl-11">_mc</span><span class="hl-4">></</span><span class="hl-5">button</span><span class="hl-4">></span>
|
|
66
|
+
</code></pre>
|
|
67
|
+
<p>_mc indicates that this HTML element contains at least one micro component. This is needed for the <strong>selectors</strong>.</p>
|
|
68
|
+
|
|
69
|
+
<a href="#contact" id="contact" style="color: inherit; text-decoration: none;">
|
|
70
|
+
<h2>Contact</h2>
|
|
71
|
+
</a>
|
|
72
|
+
<p>Feel free to contact me for any questions or inquiries:</p>
|
|
73
|
+
<p>email <a href="mailto:fthuerigen@gmail.com?subject=Micro%20Components">Frank Thürigen</a> or <a href="skype:frank.thuerigen">Skype</a></p>
|
|
74
|
+
<p>And yes, you can <a href="https://gofund.me/076c614c">fund this</a>.</p>
|
|
75
|
+
</div></div>
|
|
76
|
+
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
77
|
+
<div class="tsd-navigation settings">
|
|
78
|
+
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
79
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
80
|
+
<div class="tsd-accordion-details">
|
|
81
|
+
<div class="tsd-filter-visibility">
|
|
82
|
+
<h4 class="uppercase">Member Visibility</h4><form>
|
|
83
|
+
<ul id="tsd-filter-options">
|
|
84
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
85
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
86
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
87
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
88
|
+
<div class="tsd-theme-toggle">
|
|
89
|
+
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
90
|
+
<nav class="tsd-navigation primary">
|
|
91
|
+
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
92
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
93
|
+
<div class="tsd-accordion-details">
|
|
94
|
+
<ul>
|
|
95
|
+
<li class="current selected"><a href="modules.html">Micro <wbr/>Components</a>
|
|
96
|
+
<ul>
|
|
97
|
+
<li class="tsd-kind-module"><a href="modules/microcomponents.html">microcomponents</a></li>
|
|
98
|
+
<li class="tsd-kind-module"><a href="modules/microcomponents_es3.html">microcomponents.es3</a></li></ul></li></ul></div></details></nav></div></div>
|
|
99
|
+
<div class="container tsd-generator">
|
|
100
|
+
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
101
|
+
<div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/*
|
|
3
|
+
helper methods
|
|
4
|
+
*/
|
|
5
|
+
// get all microcomponents from a list of HTMLElements
|
|
6
|
+
function getMicroComponents(elements, search) {
|
|
7
|
+
let mcValues = [];
|
|
8
|
+
elements.forEach(e => {
|
|
9
|
+
if (e) {
|
|
10
|
+
if (e instanceof HTMLElement) {
|
|
11
|
+
const _mc = e?._mc;
|
|
12
|
+
if (!search && _mc) {
|
|
13
|
+
mcValues = mcValues.concat(Object.values(e._mc));
|
|
14
|
+
}
|
|
15
|
+
else if (search && _mc && _mc[search]) {
|
|
16
|
+
mcValues.push(_mc[search]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return mcValues;
|
|
22
|
+
}
|
|
23
|
+
// get all ancestor DOM nodes up to the document
|
|
24
|
+
function traverseNodes(node, search, firstonly = true) {
|
|
25
|
+
let mcValues = [];
|
|
26
|
+
while (node) {
|
|
27
|
+
if (node._mc) {
|
|
28
|
+
if (!search) {
|
|
29
|
+
mcValues = mcValues.concat(Object.values(node._mc));
|
|
30
|
+
}
|
|
31
|
+
else if (search && node._mc[search]) {
|
|
32
|
+
mcValues.push(node._mc[search]);
|
|
33
|
+
}
|
|
34
|
+
if (firstonly)
|
|
35
|
+
return mcValues;
|
|
36
|
+
}
|
|
37
|
+
node = node.parentNode;
|
|
38
|
+
}
|
|
39
|
+
return mcValues;
|
|
40
|
+
}
|
|
41
|
+
function isDOM(element) {
|
|
42
|
+
return element && element instanceof HTMLElement;
|
|
43
|
+
}
|
|
44
|
+
export class MC {
|
|
45
|
+
#target = {};
|
|
46
|
+
#_mc = {};
|
|
47
|
+
static debug = false;
|
|
48
|
+
constructor(target) {
|
|
49
|
+
this.#target = target;
|
|
50
|
+
this.#_mc = {};
|
|
51
|
+
}
|
|
52
|
+
get _mc() {
|
|
53
|
+
if (!MC.debug)
|
|
54
|
+
return undefined;
|
|
55
|
+
return this.#_mc;
|
|
56
|
+
}
|
|
57
|
+
get target() {
|
|
58
|
+
return this.#target;
|
|
59
|
+
}
|
|
60
|
+
// return all top-level micro components from an HTMLElement, or the searched one
|
|
61
|
+
static siblings(target, search = '') {
|
|
62
|
+
const mc = target;
|
|
63
|
+
if (!mc._mc) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
const _mc = mc._mc;
|
|
67
|
+
if (search.length) {
|
|
68
|
+
return _mc?.[search] || [];
|
|
69
|
+
}
|
|
70
|
+
return [...Object.values(_mc)];
|
|
71
|
+
}
|
|
72
|
+
// add a microcomponent to a target DOM node
|
|
73
|
+
static add(target, key, element = {}) {
|
|
74
|
+
let node = target;
|
|
75
|
+
// create the _mc property if necessary
|
|
76
|
+
if (!node._mc) {
|
|
77
|
+
node._mc = new MC(target);
|
|
78
|
+
}
|
|
79
|
+
const _mc = node._mc;
|
|
80
|
+
// add the element with the given property key to the _mc property
|
|
81
|
+
if (key.length && !_mc[key]) {
|
|
82
|
+
_mc[key] = element;
|
|
83
|
+
// add attribute if HTMLElement
|
|
84
|
+
if (target instanceof HTMLElement) {
|
|
85
|
+
target.setAttribute('_mc', '');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return element;
|
|
89
|
+
}
|
|
90
|
+
// remove a micro component from the DOM
|
|
91
|
+
static remove(target, key) {
|
|
92
|
+
if (!key)
|
|
93
|
+
return; // silent fail
|
|
94
|
+
const _mc = target?._mc || {};
|
|
95
|
+
// delete the property from the HTMLElement _mc collection
|
|
96
|
+
if (_mc && _mc[key]) {
|
|
97
|
+
delete _mc[key];
|
|
98
|
+
}
|
|
99
|
+
// remove the _mc attribute if the DOM collection is empty
|
|
100
|
+
if (!Object.keys(_mc).length && target instanceof HTMLElement && target.hasAttribute('_mc')) {
|
|
101
|
+
target.removeAttribute('_mc');
|
|
102
|
+
}
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
// add a microcomponent to the collection
|
|
106
|
+
add(key, element, target) {
|
|
107
|
+
if (this.#_mc[key])
|
|
108
|
+
return;
|
|
109
|
+
// if target parameter exists ( a DOM node )
|
|
110
|
+
// you want a top level (public) MC
|
|
111
|
+
if (target) {
|
|
112
|
+
// ... add the new micro component to the DOM node _mc
|
|
113
|
+
MC.add(target, key, element);
|
|
114
|
+
}
|
|
115
|
+
// add the new micro component to the private collection anyway
|
|
116
|
+
this.#_mc[key] = element;
|
|
117
|
+
return element;
|
|
118
|
+
}
|
|
119
|
+
// remove a micro component from the collection
|
|
120
|
+
remove(key, target) {
|
|
121
|
+
const _mc = this.#_mc;
|
|
122
|
+
const t = target;
|
|
123
|
+
// if target parameter exists ( a DOM node )
|
|
124
|
+
// you want to remove a top level (public) MC
|
|
125
|
+
if (target) {
|
|
126
|
+
// ... remove the new micro component from the DOM node _mc
|
|
127
|
+
MC.remove(t, key);
|
|
128
|
+
}
|
|
129
|
+
// remove the new micro component from the private collection anyway
|
|
130
|
+
delete _mc?.[key];
|
|
131
|
+
}
|
|
132
|
+
// return all micro components from the collection, or the searched one
|
|
133
|
+
// in a top level DOM MC, this refers to the inner collection always
|
|
134
|
+
// use MC.siblings() to get the public MCs
|
|
135
|
+
siblings(search = '') {
|
|
136
|
+
const _mc = this.#_mc;
|
|
137
|
+
if (!_mc)
|
|
138
|
+
return [];
|
|
139
|
+
const result = _mc[search || ''];
|
|
140
|
+
return search && result ? [result] : [...Object.values(_mc)];
|
|
141
|
+
}
|
|
142
|
+
/*
|
|
143
|
+
the following selectors will only work for the DOM top level MCs and return [] otherwise
|
|
144
|
+
*/
|
|
145
|
+
// first anchestor DOM node, all public MCs
|
|
146
|
+
parent(search = '') {
|
|
147
|
+
if (!isDOM(this.#target))
|
|
148
|
+
return [];
|
|
149
|
+
return traverseNodes(this.#target.parentNode, search, true);
|
|
150
|
+
}
|
|
151
|
+
// all anchestor DOM nodes, beginning with the closest, all public MCs
|
|
152
|
+
parents(search = '') {
|
|
153
|
+
if (!isDOM(this.#target))
|
|
154
|
+
return [];
|
|
155
|
+
return traverseNodes(this.#target.parentNode, search, false);
|
|
156
|
+
}
|
|
157
|
+
// nearest child DOM nodes, all puclic MCs
|
|
158
|
+
children(search = '') {
|
|
159
|
+
if (!isDOM(this.#target))
|
|
160
|
+
return [];
|
|
161
|
+
const id = Math.random().toString().replace('.', '');
|
|
162
|
+
const selector = '[_mc]:not([temp_id="' + id + '"] [_mc] [_mc])'; // HOTFIX: minifier or tsc compiler error, dont use backtick string, cuts out blanks
|
|
163
|
+
this.#target.setAttribute('temp_id', id);
|
|
164
|
+
const myDomElements = this.#target.querySelectorAll(selector);
|
|
165
|
+
const mcValues = getMicroComponents([...myDomElements], search);
|
|
166
|
+
this.#target.removeAttribute('temp-id');
|
|
167
|
+
return mcValues;
|
|
168
|
+
}
|
|
169
|
+
// all descendant DOM nodes, all puclic MCs
|
|
170
|
+
descendants(search = '') {
|
|
171
|
+
if (!isDOM(this.#target))
|
|
172
|
+
return [];
|
|
173
|
+
const myDomElements = this.#target.querySelectorAll('*[_mc]');
|
|
174
|
+
return getMicroComponents([...myDomElements], search);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<li><a href="microcomponents.html">microcomponents</a></li></ul>
|
|
17
17
|
<h1>Module microcomponents</h1></div><aside class="tsd-sources">
|
|
18
18
|
<ul>
|
|
19
|
-
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/
|
|
19
|
+
<li>Defined in <a href="https://gitlab.com/twoBirds/microcomponents/-/blob/f72dc84/src/microcomponents.ts#L1">microcomponents.ts:1</a></li></ul></aside>
|
|
20
20
|
<section class="tsd-panel-group">
|
|
21
21
|
<section class="tsd-panel tsd-typography"></section></section>
|
|
22
22
|
<section class="tsd-panel-group tsd-index-group">
|
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
<section class="tsd-index-section">
|
|
26
26
|
<h3 class="tsd-index-heading">Classes</h3>
|
|
27
27
|
<div class="tsd-index-list"><a href="../classes/microcomponents.MC.html" class="tsd-index-link tsd-kind-class tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>MC</span></a>
|
|
28
|
-
</div></section>
|
|
29
|
-
<section class="tsd-index-section">
|
|
30
|
-
<h3 class="tsd-index-heading">Interfaces</h3>
|
|
31
|
-
<div class="tsd-index-list"><a href="../interfaces/microcomponents.HTMLElementMc.html" class="tsd-index-link tsd-kind-interface tsd-parent-kind-module"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>HTMLElement<wbr/>Mc</span></a>
|
|
32
28
|
</div></section></section></section></div>
|
|
33
29
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
34
30
|
<div class="tsd-navigation settings">
|
|
@@ -55,8 +51,7 @@
|
|
|
55
51
|
<li class="tsd-kind-module"><a href="microcomponents_es3.html">microcomponents.es3</a></li></ul></li></ul></div></details></nav>
|
|
56
52
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
57
53
|
<ul>
|
|
58
|
-
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/microcomponents.MC.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>MC</a></li>
|
|
59
|
-
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/microcomponents.HTMLElementMc.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>HTMLElement<wbr/>Mc</a></li></ul></nav></div></div>
|
|
54
|
+
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/microcomponents.MC.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>MC</a></li></ul></nav></div></div>
|
|
60
55
|
<div class="container tsd-generator">
|
|
61
56
|
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
62
57
|
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
package/public/test.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Micro Components Manual Test</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<script type="module" src="./test.js"></script>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|