@twobirds/microcomponents 0.1.1 → 0.1.2
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/dist/MC.min.js +33 -52
- package/dist/elements.min.js +1 -1
- package/dist/formValues.min.js +1 -1
- package/dist/microcomponents.min.js +1 -1
- package/dist/observables.min.js +1 -1
- package/package.json +11 -2
- package/.gitlab-ci.yml +0 -18
- package/.vscode/settings.json +0 -3
- package/MicroComponents.svg +0 -15
- package/assets/documentation/MC.md +0 -547
- package/assets/documentation/MicroComponents.svg +0 -15
- package/assets/documentation/ajaxian-1.png +0 -0
- package/assets/documentation/ajaxian-2.png +0 -0
- package/assets/documentation/ajaxian-3.png +0 -0
- package/assets/documentation/elements.md +0 -277
- package/assets/documentation/formvalues.md +0 -25
- package/assets/documentation/functional_requirements.md +0 -8
- package/assets/documentation/history.md +0 -436
- package/assets/documentation/klemmstein.png +0 -0
- package/assets/documentation/magic.md +0 -29
- package/assets/documentation/observables.md +0 -187
- package/assets/documentation/rnd0023-1.jpg +0 -0
- package/assets/documentation/rnd0023-2.jpg +0 -0
- package/assets/documentation/rnd0023-3.jpg +0 -0
- package/assets/documentation/tB_react.md +0 -207
- package/assets/documentation/usage.md +0 -142
- package/assets/documentation/why.md +0 -25
- package/assets/fiddle/MicroComponents.svg +0 -15
- package/assets/fiddle/fiddle.css +0 -0
- package/assets/fiddle/fiddle.js +0 -0
- package/assets/fiddle/index.html +0 -0
- package/assets/test/MicroComponents.svg +0 -15
- package/assets/test/grandparent.css +0 -16
- package/assets/test/myButton.css +0 -19
- package/assets/test/style.css +0 -8
- package/assets/test/test.html +0 -29
- package/assets/test/testform.json +0 -27
- package/public/.nojekyll +0 -1
- package/public/MC.d.ts +0 -39
- package/public/MC.d.ts.map +0 -1
- package/public/MC.js +0 -287
- package/public/MC.js.map +0 -1
- package/public/MC.min.js +0 -348
- package/public/MC.ts +0 -431
- package/public/MicroComponents.svg +0 -15
- package/public/documentation/MC.md +0 -547
- package/public/documentation/MicroComponents.svg +0 -15
- package/public/documentation/ajaxian-1.png +0 -0
- package/public/documentation/ajaxian-2.png +0 -0
- package/public/documentation/ajaxian-3.png +0 -0
- package/public/documentation/elements.md +0 -277
- package/public/documentation/formvalues.md +0 -25
- package/public/documentation/functional_requirements.md +0 -8
- package/public/documentation/history.md +0 -436
- package/public/documentation/klemmstein.png +0 -0
- package/public/documentation/magic.md +0 -29
- package/public/documentation/observables.md +0 -187
- package/public/documentation/rnd0023-1.jpg +0 -0
- package/public/documentation/rnd0023-2.jpg +0 -0
- package/public/documentation/rnd0023-3.jpg +0 -0
- package/public/documentation/tB_react.md +0 -207
- package/public/documentation/usage.md +0 -142
- package/public/documentation/why.md +0 -25
- package/public/elements.d.ts +0 -5
- package/public/elements.d.ts.map +0 -1
- package/public/elements.js +0 -68
- package/public/elements.js.map +0 -1
- package/public/elements.min.js +0 -1
- package/public/elements.ts +0 -119
- package/public/fiddle/MicroComponents.svg +0 -15
- package/public/fiddle/fiddle.css +0 -0
- package/public/fiddle/fiddle.js +0 -0
- package/public/fiddle/index.html +0 -0
- package/public/formValues.d.ts +0 -3
- package/public/formValues.d.ts.map +0 -1
- package/public/formValues.js +0 -162
- package/public/formValues.js.map +0 -1
- package/public/formValues.min.js +0 -1
- package/public/formValues.ts +0 -225
- package/public/helpers.d.ts +0 -14
- package/public/helpers.d.ts.map +0 -1
- package/public/helpers.js +0 -113
- package/public/helpers.js.map +0 -1
- package/public/helpers.ts +0 -149
- package/public/microcomponents.d.ts +0 -6
- package/public/microcomponents.d.ts.map +0 -1
- package/public/microcomponents.js +0 -7
- package/public/microcomponents.js.map +0 -1
- package/public/microcomponents.min.js +0 -1
- package/public/microcomponents.ts +0 -8
- package/public/observables.d.ts +0 -11
- package/public/observables.d.ts.map +0 -1
- package/public/observables.js +0 -244
- package/public/observables.js.map +0 -1
- package/public/observables.min.js +0 -1
- package/public/observables.ts +0 -416
- package/public/selectors._ts +0 -1269
- package/public/src/MC.d.ts +0 -39
- package/public/src/MC.d.ts.map +0 -1
- package/public/src/MC.js +0 -287
- package/public/src/MC.js.map +0 -1
- package/public/src/MC.ts +0 -431
- package/public/src/elements.d.ts +0 -5
- package/public/src/elements.d.ts.map +0 -1
- package/public/src/elements.js +0 -68
- package/public/src/elements.js.map +0 -1
- package/public/src/elements.ts +0 -119
- package/public/src/formValues.d.ts +0 -3
- package/public/src/formValues.d.ts.map +0 -1
- package/public/src/formValues.js +0 -162
- package/public/src/formValues.js.map +0 -1
- package/public/src/formValues.ts +0 -225
- package/public/src/helpers.d.ts +0 -14
- package/public/src/helpers.d.ts.map +0 -1
- package/public/src/helpers.js +0 -113
- package/public/src/helpers.js.map +0 -1
- package/public/src/helpers.ts +0 -149
- package/public/src/microcomponents.d.ts +0 -6
- package/public/src/microcomponents.d.ts.map +0 -1
- package/public/src/microcomponents.js +0 -7
- package/public/src/microcomponents.js.map +0 -1
- package/public/src/microcomponents.ts +0 -8
- package/public/src/observables.d.ts +0 -11
- package/public/src/observables.d.ts.map +0 -1
- package/public/src/observables.js +0 -244
- package/public/src/observables.js.map +0 -1
- package/public/src/observables.ts +0 -416
- package/public/src/selectors._ts +0 -1269
- package/public/src/test/grandparent.css +0 -14
- package/public/src/test/test/child.d.ts +0 -2
- package/public/src/test/test/child.d.ts.map +0 -1
- package/public/src/test/test/child.js +0 -26
- package/public/src/test/test/child.js.map +0 -1
- package/public/src/test/test/child.ts +0 -36
- package/public/src/test/test/grandchild.d.ts +0 -2
- package/public/src/test/test/grandchild.d.ts.map +0 -1
- package/public/src/test/test/grandchild.js +0 -22
- package/public/src/test/test/grandchild.js.map +0 -1
- package/public/src/test/test/grandchild.ts +0 -31
- package/public/src/test/test/grandparent.d.ts +0 -2
- package/public/src/test/test/grandparent.d.ts.map +0 -1
- package/public/src/test/test/grandparent.js +0 -1
- package/public/src/test/test/grandparent.js.map +0 -1
- package/public/src/test/test/grandparent.ts +0 -43
- package/public/src/test/test/greatgrandchild.d.ts +0 -2
- package/public/src/test/test/greatgrandchild.d.ts.map +0 -1
- package/public/src/test/test/greatgrandchild.js +0 -36
- package/public/src/test/test/greatgrandchild.js.map +0 -1
- package/public/src/test/test/greatgrandchild.ts +0 -51
- package/public/src/test/test/parent.d.ts +0 -2
- package/public/src/test/test/parent.d.ts.map +0 -1
- package/public/src/test/test/parent.js +0 -25
- package/public/src/test/test/parent.js.map +0 -1
- package/public/src/test/test/parent.ts +0 -35
- package/public/src/test/test/testform.d.ts +0 -2
- package/public/src/test/test/testform.d.ts.map +0 -1
- package/public/src/test/test/testform.js +0 -1
- package/public/src/test/test/testform.js.map +0 -1
- package/public/src/test/test/testform.ts +0 -153
- package/public/src/test/test/testfunction.d.ts +0 -3
- package/public/src/test/test/testfunction.d.ts.map +0 -1
- package/public/src/test/test/testfunction.js +0 -7
- package/public/src/test/test/testfunction.js.map +0 -1
- package/public/src/test/test/testfunction.ts +0 -12
- package/public/src/test/test/testmc.d.ts +0 -3
- package/public/src/test/test/testmc.d.ts.map +0 -1
- package/public/src/test/test/testmc.js +0 -10
- package/public/src/test/test/testmc.js.map +0 -1
- package/public/src/test/test/testmc.ts +0 -16
- package/public/src/test/test/testsimpleclass.d.ts +0 -3
- package/public/src/test/test/testsimpleclass.d.ts.map +0 -1
- package/public/src/test/test/testsimpleclass.js +0 -9
- package/public/src/test/test/testsimpleclass.js.map +0 -1
- package/public/src/test/test/testsimpleclass.ts +0 -15
- package/public/src/test/test.d.ts +0 -2
- package/public/src/test/test.d.ts.map +0 -1
- package/public/src/test/test.js +0 -72
- package/public/src/test/test.js.map +0 -1
- package/public/src/test/test.ts +0 -176
- package/public/src/test/testform.css +0 -47
- package/public/src/test/testform.html +0 -56
- package/public/src/test/testform.json +0 -27
- package/public/test/MC.d.ts +0 -39
- package/public/test/MC.d.ts.map +0 -1
- package/public/test/MC.js +0 -287
- package/public/test/MC.min.js +0 -348
- package/public/test/MC.ts +0 -431
- package/public/test/MicroComponents.svg +0 -15
- package/public/test/elements.d.ts +0 -5
- package/public/test/elements.d.ts.map +0 -1
- package/public/test/elements.js +0 -68
- package/public/test/elements.min.js +0 -1
- package/public/test/elements.ts +0 -119
- package/public/test/formValues.d.ts +0 -3
- package/public/test/formValues.d.ts.map +0 -1
- package/public/test/formValues.js +0 -162
- package/public/test/formValues.min.js +0 -1
- package/public/test/formValues.ts +0 -225
- package/public/test/grandparent.css +0 -14
- package/public/test/helpers.d.ts +0 -14
- package/public/test/helpers.d.ts.map +0 -1
- package/public/test/helpers.js +0 -113
- package/public/test/helpers.ts +0 -149
- package/public/test/microcomponents.d.ts +0 -6
- package/public/test/microcomponents.d.ts.map +0 -1
- package/public/test/microcomponents.js +0 -7
- package/public/test/microcomponents.min.js +0 -1
- package/public/test/microcomponents.ts +0 -8
- package/public/test/myButton.css +0 -19
- package/public/test/observables.d.ts +0 -11
- package/public/test/observables.d.ts.map +0 -1
- package/public/test/observables.js +0 -244
- package/public/test/observables.min.js +0 -1
- package/public/test/observables.ts +0 -416
- package/public/test/style.css +0 -8
- package/public/test/test/child.d.ts +0 -2
- package/public/test/test/child.d.ts.map +0 -1
- package/public/test/test/child.js +0 -26
- package/public/test/test/child.js.map +0 -1
- package/public/test/test/child.ts +0 -36
- package/public/test/test/grandchild.d.ts +0 -2
- package/public/test/test/grandchild.d.ts.map +0 -1
- package/public/test/test/grandchild.js +0 -22
- package/public/test/test/grandchild.js.map +0 -1
- package/public/test/test/grandchild.ts +0 -31
- package/public/test/test/grandparent.d.ts +0 -2
- package/public/test/test/grandparent.d.ts.map +0 -1
- package/public/test/test/grandparent.js +0 -1
- package/public/test/test/grandparent.js.map +0 -1
- package/public/test/test/grandparent.ts +0 -43
- package/public/test/test/greatgrandchild.d.ts +0 -2
- package/public/test/test/greatgrandchild.d.ts.map +0 -1
- package/public/test/test/greatgrandchild.js +0 -36
- package/public/test/test/greatgrandchild.js.map +0 -1
- package/public/test/test/greatgrandchild.ts +0 -51
- package/public/test/test/parent.d.ts +0 -2
- package/public/test/test/parent.d.ts.map +0 -1
- package/public/test/test/parent.js +0 -25
- package/public/test/test/parent.js.map +0 -1
- package/public/test/test/parent.ts +0 -35
- package/public/test/test/testform.d.ts +0 -2
- package/public/test/test/testform.d.ts.map +0 -1
- package/public/test/test/testform.js +0 -1
- package/public/test/test/testform.js.map +0 -1
- package/public/test/test/testform.ts +0 -153
- package/public/test/test/testfunction.d.ts +0 -3
- package/public/test/test/testfunction.d.ts.map +0 -1
- package/public/test/test/testfunction.js +0 -7
- package/public/test/test/testfunction.js.map +0 -1
- package/public/test/test/testfunction.ts +0 -12
- package/public/test/test/testmc.d.ts +0 -3
- package/public/test/test/testmc.d.ts.map +0 -1
- package/public/test/test/testmc.js +0 -10
- package/public/test/test/testmc.js.map +0 -1
- package/public/test/test/testmc.ts +0 -16
- package/public/test/test/testsimpleclass.d.ts +0 -3
- package/public/test/test/testsimpleclass.d.ts.map +0 -1
- package/public/test/test/testsimpleclass.js +0 -9
- package/public/test/test/testsimpleclass.js.map +0 -1
- package/public/test/test/testsimpleclass.ts +0 -15
- package/public/test/test.d.ts +0 -2
- package/public/test/test.d.ts.map +0 -1
- package/public/test/test.html +0 -29
- package/public/test/test.js +0 -72
- package/public/test/test.js.map +0 -1
- package/public/test/test.ts +0 -176
- package/public/test/testform.css +0 -47
- package/public/test/testform.html +0 -56
- package/public/test/testform.json +0 -27
- package/public/typedoc/.nojekyll +0 -1
- package/public/typedoc/assets/highlight.css +0 -106
- package/public/typedoc/assets/icons.js +0 -18
- package/public/typedoc/assets/icons.svg +0 -1
- package/public/typedoc/assets/main.js +0 -60
- package/public/typedoc/assets/navigation.js +0 -1
- package/public/typedoc/assets/search.js +0 -1
- package/public/typedoc/assets/style.css +0 -1493
- package/public/typedoc/classes/MC.DC.html +0 -13
- package/public/typedoc/classes/MC.MC.html +0 -3
- package/public/typedoc/classes/MC.McBase.html +0 -3
- package/public/typedoc/functions/MC.autoload.html +0 -1
- package/public/typedoc/functions/MC.off.html +0 -1
- package/public/typedoc/functions/MC.on.html +0 -1
- package/public/typedoc/functions/MC.one.html +0 -1
- package/public/typedoc/functions/MC.trigger.html +0 -1
- package/public/typedoc/functions/elements.defineCE.html +0 -1
- package/public/typedoc/functions/elements.getCE.html +0 -1
- package/public/typedoc/functions/formValues.formValues.html +0 -1
- package/public/typedoc/functions/observables.observe.html +0 -1
- package/public/typedoc/hierarchy.html +0 -1
- package/public/typedoc/index.html +0 -122
- package/public/typedoc/interfaces/MC.HTMLMcElement.html +0 -758
- package/public/typedoc/media/MicroComponents.svg +0 -15
- package/public/typedoc/modules/MC.html +0 -10
- package/public/typedoc/modules/elements.html +0 -3
- package/public/typedoc/modules/formValues.html +0 -2
- package/public/typedoc/modules/observables.html +0 -3
- package/public/typedoc/modules.html +0 -5
- package/public/typedoc/types/observables.Observable.html +0 -1
- package/src/MC.ts +0 -431
- package/src/elements.ts +0 -119
- package/src/formValues.ts +0 -225
- package/src/helpers.ts +0 -149
- package/src/microcomponents.ts +0 -8
- package/src/observables.ts +0 -416
- package/src/selectors._ts +0 -1269
- package/src/test/grandparent.css +0 -14
- package/src/test/test/child.ts +0 -36
- package/src/test/test/grandchild.ts +0 -31
- package/src/test/test/grandparent.ts +0 -43
- package/src/test/test/greatgrandchild.ts +0 -51
- package/src/test/test/parent.ts +0 -35
- package/src/test/test/testform.ts +0 -153
- package/src/test/test/testfunction.ts +0 -12
- package/src/test/test/testmc.ts +0 -16
- package/src/test/test/testsimpleclass.ts +0 -15
- package/src/test/test.ts +0 -176
- package/src/test/testform.css +0 -47
- package/src/test/testform.html +0 -56
- package/src/test/testform.json +0 -27
- package/tasks.md +0 -36
- package/tsconfig.json +0 -107
- package/typedoc.json +0 -7
- package/webpack.config.js +0 -346
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
# Discussing React Prop Drilling with ChatGPT
|
|
2
|
-
|
|
3
|
-
This is an interesting read where I wanted ChatGPT to come up with a Micro Component solution for a React problem.
|
|
4
|
-
|
|
5
|
-
To be honest, I knew MCs can solve it. But I wanted to know what ChatGPT can make of it. Spoiler: it got remarkably close on the first try. The second try was spot on.
|
|
6
|
-
|
|
7
|
-
Please mind I have a trained session with a backlog. So you wont get the same answers.
|
|
8
|
-
|
|
9
|
-
***( Cut outs and comments are in parentheses...)***
|
|
10
|
-
|
|
11
|
-
## Start Session
|
|
12
|
-
|
|
13
|
-
Me:
|
|
14
|
-
**Do you remember our chat regarding Micro Components vs. existing frameworks?**
|
|
15
|
-
|
|
16
|
-
ChatGPT:
|
|
17
|
-
|
|
18
|
-
Yes, I remember our discussion! We talked about your approach to microcomponents as distinct from established frameworks, with a focus on smaller, modular, data-driven components that are stored in a hash attached to DOM elements (specifically in a _tb property in twoBirds or _mc for microcomponents). Your system emphasizes manual wiring, observability, and ease of interaction across components, making it different from React, Vue, or other component libraries that depend heavily on virtual DOMs, JSX, or hooks.
|
|
19
|
-
|
|
20
|
-
Your components follow principles of separation of concerns and DRY by keeping interactions modular but flexible, and they use observables to trigger functions in other components, which can be linked in chains. Your approach allows a component-based design that integrates deeply into the DOM without the overhead of larger frameworks. And while existing frameworks typically follow a top-down data flow, your system allows bi-directional, observable properties that automatically update the DOM when data changes.
|
|
21
|
-
|
|
22
|
-
Would you like to revisit any specific aspect, or compare further?
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## React
|
|
26
|
-
|
|
27
|
-
Me:
|
|
28
|
-
**There was something about React specifically?**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ChatGPT:
|
|
32
|
-
|
|
33
|
-
(...)
|
|
34
|
-
|
|
35
|
-
### Manual Wiring vs. React’s Context and Hooks:
|
|
36
|
-
React uses Context and hooks (like useState and useEffect) to manage data flow and lifecycle.
|
|
37
|
-
|
|
38
|
-
Your approach leans on manual wiring for connecting data across microcomponents, avoiding the abstraction of hooks and allowing direct, observable-driven updates. This can make the flow of data more transparent and easier to trace in complex applications, whereas hooks can sometimes add complexity or obscurity when trying to understand data dependencies.
|
|
39
|
-
|
|
40
|
-
### Component Reusability and Scaling:
|
|
41
|
-
Both React and Micro Components support component-based architecture.
|
|
42
|
-
|
|
43
|
-
However, Micro Components allows multiple microcomponents on a single DOM element, and each microcomponent is responsible for specific tasks, making scaling in large applications more modular and straightforward. React encourages separation at the component level, whereas Micro Components does so at the microcomponent level, with direct chaining possible between components.
|
|
44
|
-
|
|
45
|
-
(...)
|
|
46
|
-
|
|
47
|
-
Each of these aspects underlines Micro Components’ focus on minimalism, modularity, and developer control. These are different from React's abstraction and tooling-heavy approach, making your framework potentially more transparent and lightweight for specific use cases.
|
|
48
|
-
|
|
49
|
-
Would you like to dive into any of these differences in more detail?
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## Prop Drilling
|
|
53
|
-
|
|
54
|
-
Me:
|
|
55
|
-
**In general there was a problem regarding carrying properties from a component close to the root of the document to a component that is much deeper into the DOM tree, do you remember that?**
|
|
56
|
-
|
|
57
|
-
ChatGPT:
|
|
58
|
-
|
|
59
|
-
Yes, I remember!
|
|
60
|
-
|
|
61
|
-
We discussed the challenges in carrying properties or state from a root-level component down to deeply nested components. In React, this kind of deep property sharing can become cumbersome and often requires additional tools or patterns, such as:
|
|
62
|
-
|
|
63
|
-
### Prop Drilling:
|
|
64
|
-
React requires passing data through each level of components in the tree via props, a process known as prop drilling. This can lead to complex and hard-to-manage code, especially when the data isn’t relevant to every component in the chain.
|
|
65
|
-
|
|
66
|
-
(...)
|
|
67
|
-
|
|
68
|
-
In contrast, your Micro Components microcomponents have an alternative approach that makes it easier to pass properties throughout the DOM tree:
|
|
69
|
-
|
|
70
|
-
### Direct Microcomponent Selectors:
|
|
71
|
-
Micro Components includes selector methods (like .parents() and .descendants()) that allow components to access any microcomponent within the tree without explicit data passing. This capability enables deeply nested components to retrieve properties from higher-level components directly, bypassing the need to route data through intermediary components.
|
|
72
|
-
|
|
73
|
-
(...)
|
|
74
|
-
|
|
75
|
-
### Manual Wiring for Control:
|
|
76
|
-
|
|
77
|
-
**Because Micro Components rely on manual wiring, you can set up specific connections between components as needed.** This gives you fine-grained control over where and how data flows through the app without involving a top-level state or intermediary components, making it more scalable for larger apps without the need for a Context API or state library.
|
|
78
|
-
|
|
79
|
-
(...)
|
|
80
|
-
|
|
81
|
-
This structure offers a highly flexible, context-free solution for deep property sharing, making it an efficient alternative to prop drilling or global state libraries in many scenarios. Would you like more details on how Micro Components selectors work with observables to achieve this?
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
## Generate Code
|
|
85
|
-
|
|
86
|
-
Me:
|
|
87
|
-
**Can you give an example of 2 react components that interact with each other using micro components? Give me the code of both components, using microomponents to exchange data**
|
|
88
|
-
|
|
89
|
-
***( it took some further hinting, but in the end ChatGPT came up with this: )***
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
ChatGPT:
|
|
93
|
-
|
|
94
|
-
Here's the updated code:
|
|
95
|
-
Parent Micro Component
|
|
96
|
-
|
|
97
|
-
This component will receive a target DOM node and set a value that propagates down to its descendants:
|
|
98
|
-
|
|
99
|
-
```javascript
|
|
100
|
-
import { MC } from '@twobirds/microcomponents';
|
|
101
|
-
|
|
102
|
-
// Parent Micro Component
|
|
103
|
-
class ParentMC extends MC {
|
|
104
|
-
constructor(targetNode) {
|
|
105
|
-
super(targetNode); // Receive and pass the target DOM node to the MC constructor
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
set value(newValue) {
|
|
109
|
-
// Send value to all descendants named "targetMC"
|
|
110
|
-
this.descendants("targetMC").forEach(descendant => descendant.data = newValue);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Child Micro Component
|
|
116
|
-
|
|
117
|
-
This component has a data setter that updates the internal React state in each child:
|
|
118
|
-
|
|
119
|
-
```javascript
|
|
120
|
-
import { MC } from '@twobirds/microcomponents';
|
|
121
|
-
|
|
122
|
-
// Child Micro Component
|
|
123
|
-
class ChildMC extends MC {
|
|
124
|
-
constructor(targetNode, setReactState) {
|
|
125
|
-
super(targetNode); // Receive the target DOM node to be managed by MC
|
|
126
|
-
this.setReactState = setReactState;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
set data(newValue) {
|
|
130
|
-
this.setReactState(newValue); // Update React state when data is set
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
React Components Using Micro Components
|
|
136
|
-
|
|
137
|
-
The following React setup attaches ParentMC and ChildMC to their respective DOM elements, using the parent DOM node to instantiate the micro components.
|
|
138
|
-
Parent Component
|
|
139
|
-
|
|
140
|
-
The parent component attaches an instance of ParentMC to the DOM node and sets its value based on inputValue.
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
|
|
144
|
-
import React, { useState, useRef, useEffect } from 'react';
|
|
145
|
-
import { MC } from '@twobirds/microcomponents';
|
|
146
|
-
import { ParentMC } from '@myCompany/ParentMC';
|
|
147
|
-
|
|
148
|
-
const ParentComponent = () => {
|
|
149
|
-
const [inputValue, setInputValue] = useState("");
|
|
150
|
-
const parentRef = useRef(null);
|
|
151
|
-
const parentMC = new ParentMC( parentRef );
|
|
152
|
-
const sender = MC.add(parentRef.current, 'parentMC', parentMC);
|
|
153
|
-
|
|
154
|
-
useEffect(() => {
|
|
155
|
-
// Update value in ParentMC whenever inputValue changes
|
|
156
|
-
parentMC.value = inputValue;
|
|
157
|
-
}, [inputValue]);
|
|
158
|
-
|
|
159
|
-
return (
|
|
160
|
-
<div ref={parentRef}>
|
|
161
|
-
<input
|
|
162
|
-
type="text"
|
|
163
|
-
value={inputValue}
|
|
164
|
-
onChange={(e) => setInputValue( e.target.value )}
|
|
165
|
-
placeholder="Type to send data to children"
|
|
166
|
-
/>
|
|
167
|
-
<ChildComponent />
|
|
168
|
-
</div>
|
|
169
|
-
);
|
|
170
|
-
};
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Child Component
|
|
174
|
-
|
|
175
|
-
The child component attaches an instance of ChildMC, which updates its state whenever data is set.
|
|
176
|
-
|
|
177
|
-
```javascript
|
|
178
|
-
import React, { useState, useRef } from 'react';
|
|
179
|
-
import { MC } from '@twobirds/microcomponents';
|
|
180
|
-
import { ChildMC } from '@myCompany/ChildMC';
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const ChildComponent = () => {
|
|
184
|
-
const [childData, setChildData] = useState("");
|
|
185
|
-
const childRef = useRef(null);
|
|
186
|
-
const childMC = new ChildMC( childRef, setChildData );
|
|
187
|
-
const receiver = MC.add(childRef.current, 'childMC', childMC);
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<div ref={childRef}>
|
|
191
|
-
<h3>Received Data:</h3>
|
|
192
|
-
<p>childData</p>
|
|
193
|
-
</div>
|
|
194
|
-
);
|
|
195
|
-
};
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
***( ... I cannot tell about the react part, but the micro coomponent code is spot on. Like WLAN on the DOM :-) )***
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
**ChatGPT can produce errors. Check the information.**
|
|
202
|
-
|
|
203
|
-
## ... yes I do :-)
|
|
204
|
-
|
|
205
|
-
***( ... but it was right on the money in the end. I love AI, albeit with a healthy grain of sceptic salt. )***
|
|
206
|
-
|
|
207
|
-
***( ... and I asked about MCs and Angular likewise, and it directly pointed me to a NG module problem that can also be solved. It even came up with sample code. )***
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Micro Component Management
|
|
2
|
-
|
|
3
|
-
This system allows you to attach, manage, and interact with micro components.
|
|
4
|
-
|
|
5
|
-
**Micro Components** can literally be anything you can put into an object as a property.
|
|
6
|
-
|
|
7
|
-
Also it has selectors to find micro components in the DOM. It consists of a single class `MC`.
|
|
8
|
-
|
|
9
|
-
## Summary of MC() Methods
|
|
10
|
-
|
|
11
|
-
- **Static Methods:**
|
|
12
|
-
- `MC.add( target, key, element)`: Attach a top level micro component to an HTMLElement.
|
|
13
|
-
- `MC.remove( target, key )`: Detach a top level micro component from an HTMLElement.
|
|
14
|
-
- `MC.siblings( target )`: get top level micro components from an HTMLElement.
|
|
15
|
-
|
|
16
|
-
- **Instance Methods:**
|
|
17
|
-
- `add( key, element )`: Attach a private Micro Component to a Micro Component.
|
|
18
|
-
- `remove( key )`: Detach a private Micro Component from a Micro Component.
|
|
19
|
-
- `siblings(search?)`: Retrieve sibling micro components.
|
|
20
|
-
- `parent(search?)`: Get parent top level micro components.
|
|
21
|
-
- `parents(search?)`: Get all ancestor top level micro components.
|
|
22
|
-
- `children(search?)`: Retrieve child top level micro components.
|
|
23
|
-
- `descendants(search?)`: Get all descendant top level micro components.
|
|
24
|
-
|
|
25
|
-
**Micro Components** will most likely be **class instances** that expose inner methods **or an observable collection** for data driven workflows, e.g. business process logic.
|
|
26
|
-
|
|
27
|
-
## Typical Workflow
|
|
28
|
-
|
|
29
|
-
1. **Attach micro components** to elements using `MC.add()`.
|
|
30
|
-
2. **Access** micro components by their property key or navigating through DOM (e.g., `siblings()`, `parents()`, `children()`, etc.) **and use their inner functionality**.
|
|
31
|
-
3. **Manipulate** micro components by adding or removing them as needed or change their properties/call their methods.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Hints
|
|
35
|
-
|
|
36
|
-
- **All static methods handle top level Micro Components. These are PUBLIC, that is they are visible in the DOM elements _mc property and usually have an interface.**
|
|
37
|
-
|
|
38
|
-
- **All MC instance methods handle inner Micro Components. These are PRIVATE, that is they are not visible in the DOM elements _mc property.**
|
|
39
|
-
|
|
40
|
-
- **Micro Components can recursively contain Micro Components. Just like npm and the node_modules directory.**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Attaching a top level Micro Component to a DOM element
|
|
44
|
-
|
|
45
|
-
To attach a micro component to an HTML element, use the `MC.add()` static function.
|
|
46
|
-
|
|
47
|
-
### Example Usage:
|
|
48
|
-
```javascript
|
|
49
|
-
const myElement = document.getElementById('myDiv');
|
|
50
|
-
|
|
51
|
-
// Attach a micro component (most often a class instance, here a simple object for simplicity) with a specific key
|
|
52
|
-
MC.add( myElement, 'myComponent', { name: 'Mike' } );
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
- After you added a micro component using this function, the HTMLElement will contain a property `_mc` which is a MC() class instance that offers some methods.
|
|
56
|
-
- Also the HTMLElement then has an attribute _mc which will indicate that at least one micro component is attached to this dom element.
|
|
57
|
-
|
|
58
|
-
## Removing a top level Micro Component from a DOM element
|
|
59
|
-
|
|
60
|
-
Micro components can be removed using the `MC.remove()` static method.
|
|
61
|
-
|
|
62
|
-
### Removing a Micro component:
|
|
63
|
-
```javascript
|
|
64
|
-
MC.remove( myDomElement, 'myComponent');
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**When all micro components are removed** (the _mc object has no more properties), the `_mc` **attribute is also removed** from the HTML element. The `_mc` **property persists**.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## Retrieve all top level Micro Components from a DOM element
|
|
71
|
-
|
|
72
|
-
The `MC.siblings()` method retrieves all top level micro components attached to the same DOM element.
|
|
73
|
-
|
|
74
|
-
### Example:
|
|
75
|
-
```javascript
|
|
76
|
-
const target = document.querySelector( 'div' );
|
|
77
|
-
const siblings = MC.siblings( target );
|
|
78
|
-
console.log(siblings); // Logs an array of top level sibling micro components
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
To retrieve a specific micro component by its key:
|
|
82
|
-
```javascript
|
|
83
|
-
const target = document.querySelector( 'div' );
|
|
84
|
-
const siblings = MC.siblings( target, 'myOtherComponent' );
|
|
85
|
-
console.log(siblings); // Logs an array containing a top level sibling micro component, if its key matches the search string
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
## Retrieving Sibling Micro components
|
|
90
|
-
|
|
91
|
-
The `.siblings()` method retrieves all micro components attached to the same DOM element.
|
|
92
|
-
|
|
93
|
-
### Example:
|
|
94
|
-
```javascript
|
|
95
|
-
const siblings = myElement._mc.siblings();
|
|
96
|
-
console.log(siblings); // Logs an array of sibling micro components
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
To retrieve a specific micro component by its key:
|
|
100
|
-
```javascript
|
|
101
|
-
const specificSibling = myElement._mc.siblings('anotherComponent');
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- **The following methods hop over HTMLElements that contain no micro component.**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
## 4. Navigating Parent and Ancestor Micro components
|
|
109
|
-
|
|
110
|
-
The `_mc.parent()` and `_mc.parents()` methods allow you to retrieve micro components attached to parent elements.
|
|
111
|
-
|
|
112
|
-
### Example:
|
|
113
|
-
```javascript
|
|
114
|
-
const parentMc = myElement._mc.parent();
|
|
115
|
-
console.log(parentMc); // Logs micro components closest nachestor that has microcomponents
|
|
116
|
-
|
|
117
|
-
const allAncestorsMc = myElement._mc.parents();
|
|
118
|
-
console.log(allAncestorsMc); // Logs all ancestor micro components up to document
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
To retrieve a specific micro component attached to the parent or ancestors:
|
|
122
|
-
```javascript
|
|
123
|
-
const specificAncestorMc = myElement._mc.parents('myComponent');
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## 5. Retrieving Child and Descendant Micro components
|
|
127
|
-
|
|
128
|
-
The `_mc.children()` and `_mc.descendants()` methods retrieve micro components attached to child elements or any descendants.
|
|
129
|
-
|
|
130
|
-
### Example:
|
|
131
|
-
```javascript
|
|
132
|
-
const childMicro components = myElement._mc.children();
|
|
133
|
-
console.log(childMicro components); // Logs an array of nearest child micro components
|
|
134
|
-
|
|
135
|
-
const descendantMicro components = myElement._mc.descendants();
|
|
136
|
-
console.log(descendantMicro components); // Logs micro components attached to all descendants
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
To search for a specific micro component by key:
|
|
140
|
-
```javascript
|
|
141
|
-
const specificMc = myElement._mc.<someComponent>;
|
|
142
|
-
```
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
## Why would I give this a try?
|
|
3
|
-
|
|
4
|
-
It is lightweight, proven and can yield positive results immediatly.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### **As the CTO**:
|
|
8
|
-
|
|
9
|
-
- **Reusability**: this works with every Javascript framework that allows for DOM access, and it will work as long as the DOM exists in browsers. That is, forever.
|
|
10
|
-
- **Scalability**: scales perfectly by design.
|
|
11
|
-
- **Interoperability**: where many teams in different projects should share specific business or UI logic, you want to have something that works in any JS framework you use.
|
|
12
|
-
|
|
13
|
-
### **As a Project Manager**:
|
|
14
|
-
|
|
15
|
-
- **Separation of Concerns**: since this is a modular approach you can **split UI logic from Business logic** and let diffent teams work on each.
|
|
16
|
-
- using this, you can **work with external developers without the need to give them access to your projects code repository**.
|
|
17
|
-
- you will find out that this allows your project to **become independent from the "tools hell"**. You tend to use **DIY** modules where you had tools before.
|
|
18
|
-
|
|
19
|
-
### **As a Javascript Developer**:
|
|
20
|
-
|
|
21
|
-
- The learning curve to use this is more than shallow. 1 hour should be enough.
|
|
22
|
-
- This is based on **plain Javascript/Typescript, HTML and CSS**. There is no abstraction layer.
|
|
23
|
-
- From the very start **it is fun to work with**. You are back in control of your code without bigger frameworks, but you are able to interact with them.
|
|
24
|
-
- You can **work for any customer right away**. **No training on their system required**, just fulfill their micro component requirements.
|
|
25
|
-
- Over time, you can **build your own framework or functional libraries** from scratch.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
|
2
|
-
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
|
|
3
|
-
<title>test</title>
|
|
4
|
-
<rect fill="transparent" x="0" y="0" width="200" height="200" fill-opacity="1"/>
|
|
5
|
-
<g style="fill:transparent">
|
|
6
|
-
<title>first bird</title>
|
|
7
|
-
<path fill="#18829c" d="
|
|
8
|
-
m15,160
|
|
9
|
-
a30,75 45 1 0 160,-150
|
|
10
|
-
a20,50 225 1 1 -110,100
|
|
11
|
-
a12,25 45 1 1 60,-50
|
|
12
|
-
a20,50 225 1 0 -110,100
|
|
13
|
-
" />
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|
package/assets/fiddle/fiddle.css
DELETED
|
File without changes
|
package/assets/fiddle/fiddle.js
DELETED
|
File without changes
|
package/assets/fiddle/index.html
DELETED
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
|
2
|
-
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
|
|
3
|
-
<title>test</title>
|
|
4
|
-
<rect fill="transparent" x="0" y="0" width="200" height="200" fill-opacity="1"/>
|
|
5
|
-
<g style="fill:transparent">
|
|
6
|
-
<title>first bird</title>
|
|
7
|
-
<path fill="#18829c" d="
|
|
8
|
-
m15,160
|
|
9
|
-
a30,75 45 1 0 160,-150
|
|
10
|
-
a20,50 225 1 1 -110,100
|
|
11
|
-
a12,25 45 1 1 60,-50
|
|
12
|
-
a20,50 225 1 0 -110,100
|
|
13
|
-
" />
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
test-grandparent,
|
|
2
|
-
test-parent,
|
|
3
|
-
test-child,
|
|
4
|
-
test-grandchild,
|
|
5
|
-
test-greatgrandchild {
|
|
6
|
-
user-select: none;
|
|
7
|
-
caret-color: transparent;
|
|
8
|
-
|
|
9
|
-
display: inline-block;
|
|
10
|
-
padding: 2px;
|
|
11
|
-
margin: 1px;
|
|
12
|
-
border: 1px solid darkslategray;
|
|
13
|
-
border-radius: 2px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/*# sourceMappingURL=GrandParent.css.map */
|
package/assets/test/myButton.css
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
button.myButton {
|
|
2
|
-
border: 2px solid gray;
|
|
3
|
-
margin: 3px;
|
|
4
|
-
padding: 2px 5px;
|
|
5
|
-
display: inline-block;
|
|
6
|
-
width: 8em;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
button.myButton.clicked {
|
|
10
|
-
border-color: blue;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
button.myButton.overClicked {
|
|
14
|
-
border-color: orange;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
button.myButton:hover {
|
|
18
|
-
border-color: red;
|
|
19
|
-
}
|
package/assets/test/style.css
DELETED
package/assets/test/test.html
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
<link
|
|
8
|
-
rel="icon"
|
|
9
|
-
type="image/svg+xml"
|
|
10
|
-
sizes="any"
|
|
11
|
-
href="./MicroComponents.svg"
|
|
12
|
-
/>
|
|
13
|
-
<link href="style.css" rel="stylesheet" />
|
|
14
|
-
<link href="myButton.css" rel="stylesheet" />
|
|
15
|
-
<link href="grandparent.css" rel="stylesheet" />
|
|
16
|
-
<script>
|
|
17
|
-
import("./microcomponents.js").then((m) => {
|
|
18
|
-
m.autoload(true); // automatically load web components that are undefined
|
|
19
|
-
Object.assign(window, m);
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
22
|
-
<script type="module" src="test.js"></script>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<h3>Open debugger (F12), check console...</h3>
|
|
26
|
-
<test-grandparent></test-grandparent>
|
|
27
|
-
<test-testform data-mc="test-testmc"></test-testform>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"textInput":"Hello World",
|
|
3
|
-
"colorInput":"#eaf8f8",
|
|
4
|
-
"dateInput":"",
|
|
5
|
-
"dtlInput":"",
|
|
6
|
-
"email":"",
|
|
7
|
-
"hiddenInput":"",
|
|
8
|
-
"hiddenVal":"",
|
|
9
|
-
"month":"",
|
|
10
|
-
"number":"",
|
|
11
|
-
"passInput":"",
|
|
12
|
-
"rangeInput":"30",
|
|
13
|
-
"searchInput":"",
|
|
14
|
-
"telInput":"",
|
|
15
|
-
"timeInput":"",
|
|
16
|
-
"urlInput":"",
|
|
17
|
-
"weekInput":"",
|
|
18
|
-
"myRadio":"radio3",
|
|
19
|
-
"cb1":true,
|
|
20
|
-
"cb2":false,
|
|
21
|
-
"cb3":true,
|
|
22
|
-
"cb4":false,
|
|
23
|
-
"cb5":false,
|
|
24
|
-
"singleSelect":"1",
|
|
25
|
-
"multiSelect":["2","4"],
|
|
26
|
-
"textArea":"This is some example text\r..."
|
|
27
|
-
}
|
package/public/.nojekyll
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
package/public/MC.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { LooseObject } from './helpers.js';
|
|
2
|
-
export interface HTMLMcElement extends HTMLElement {
|
|
3
|
-
_mc: LooseObject;
|
|
4
|
-
}
|
|
5
|
-
declare function off(domNode: Node, eventName: string, handler: EventListenerOrEventListenerObject): void;
|
|
6
|
-
declare function on(domNode: Node, eventName: string, handler: EventListenerOrEventListenerObject, once?: boolean): EventListenerOrEventListenerObject;
|
|
7
|
-
declare function one(domNode: Node, eventName: string, handler: EventListenerOrEventListenerObject): EventListenerOrEventListenerObject;
|
|
8
|
-
declare class BubbleController {
|
|
9
|
-
stopped: boolean;
|
|
10
|
-
constructor();
|
|
11
|
-
stop(): void;
|
|
12
|
-
}
|
|
13
|
-
declare function trigger(domNode: HTMLElement, event: string, data?: any, bubble?: string, controller?: BubbleController): void;
|
|
14
|
-
declare class McBase {
|
|
15
|
-
private _target;
|
|
16
|
-
constructor(target?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
});
|
|
19
|
-
get target(): any;
|
|
20
|
-
}
|
|
21
|
-
declare class MC extends McBase {
|
|
22
|
-
constructor(target?: any);
|
|
23
|
-
}
|
|
24
|
-
declare class DC extends McBase {
|
|
25
|
-
constructor(target: HTMLElement);
|
|
26
|
-
static add(target: HTMLElement, key: string, element?: any): HTMLMcElement;
|
|
27
|
-
static remove(target: HTMLElement, key: string): void;
|
|
28
|
-
off(eventName: string, handler: EventListenerOrEventListenerObject): void;
|
|
29
|
-
on(eventName: string, handler: EventListenerOrEventListenerObject): EventListenerOrEventListenerObject;
|
|
30
|
-
one(eventName: string, handler: EventListenerOrEventListenerObject): EventListenerOrEventListenerObject;
|
|
31
|
-
trigger(eventName: string, data?: any, bubble?: string, controller?: BubbleController): void;
|
|
32
|
-
ancestors(): DC[] | null;
|
|
33
|
-
closest(): DC | null;
|
|
34
|
-
children(): DC[] | null;
|
|
35
|
-
descendants(): DC[] | null;
|
|
36
|
-
}
|
|
37
|
-
declare function autoload(enable?: boolean): boolean;
|
|
38
|
-
export { McBase, MC, DC, autoload, on, one, off, trigger };
|
|
39
|
-
//# sourceMappingURL=MC.d.ts.map
|
package/public/MC.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MC.d.ts","sourceRoot":"","sources":["../src/MC.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM3C,MAAM,WAAW,aAAc,SAAQ,WAAW;IACjD,GAAG,EAAE,WAAW,CAAC;CACjB;AAmED,iBAAS,GAAG,CAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,QAE1F;AAED,iBAAS,EAAE,CAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,EAAE,IAAI,GAAE,OAAe,GAAI,kCAAkC,CAGtJ;AAED,iBAAS,GAAG,CAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,GAAI,kCAAkC,CAGhI;AAED,cAAM,gBAAgB;IACrB,OAAO,UAAS;;IAGhB,IAAI;CAGJ;AAGD,iBAAS,OAAO,CACf,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,GAAQ,EACd,MAAM,GAAE,MAAY,EACpB,UAAU,CAAC,EAAE,gBAAgB,QA4C7B;AAiDD,cAAM,MAAM;IACX,OAAO,CAAC,OAAO,CAAe;gBAElB,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;IAU3C,IAAI,MAAM,IAAI,GAAG,CAEhB;CAED;AAED,cAAM,EAAG,SAAQ,MAAM;gBACV,MAAM,CAAC,EAAE,GAAG;CAGxB;AAED,cAAM,EAAG,SAAQ,MAAM;gBACV,MAAM,EAAE,WAAW;IAI/B,MAAM,CAAC,GAAG,CAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,GAAQ,GAAI,aAAa;IAIhF,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM;IAK9C,GAAG,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC;IAInE,EAAE,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,GAAI,kCAAkC;IAIxG,GAAG,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,GAAI,kCAAkC;IAIzG,OAAO,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,GAAQ,EAAE,MAAM,GAAE,MAAY,EAAE,UAAU,CAAC,EAAE,gBAAgB;IAK/F,SAAS,IAAI,EAAE,EAAE,GAAG,IAAI;IAgBxB,OAAO,IAAI,EAAE,GAAG,IAAI;IAOpB,QAAQ,IAAI,EAAE,EAAE,GAAG,IAAI;IAMvB,WAAW,IAAI,EAAE,EAAE,GAAG,IAAI;CAS1B;AAiHD,iBAAS,QAAQ,CAAC,MAAM,GAAE,OAAc,GAAG,OAAO,CAmBjD;AAID,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}
|