ivue 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage/clover.xml +177 -176
- package/coverage/coverage-final.json +1 -1
- package/coverage/index.html +18 -18
- package/coverage/index.ts.html +1 -1
- package/coverage/ivue.ts.html +176 -146
- package/dist/index.es.js +47 -46
- package/dist/index.umd.js +1 -1
- package/dist/src/ivue.d.ts +17 -8
- package/docs/docs/.vitepress/config.ts +16 -2
- package/docs/docs/.vitepress/dist/404.html +2 -2
- package/docs/docs/.vitepress/dist/api/ivue.html +4 -4
- package/docs/docs/.vitepress/dist/api/propsWithDefaults.html +4 -4
- package/docs/docs/.vitepress/dist/assets/{app.D_gfERxK.js → app.C_6IW306.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.Cfu1MyIk.js +1 -0
- package/docs/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.BzoUb0RV.js → VPLocalSearchBox.BEJZ5WJL.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/chunks/{index.es.D191XnPH.js → index.es.B1_StH0Z.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/chunks/{theme.CzkYYfOm.js → theme.COJ5Yu8m.js} +2 -2
- package/docs/docs/.vitepress/dist/assets/{pages_advanced-usage.md.DsU0E8Oi.js → pages_advanced-usage.md.Xwq8hk_w.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/{pages_advanced-usage.md.DsU0E8Oi.lean.js → pages_advanced-usage.md.Xwq8hk_w.lean.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/pages_api.md.Bo9Kusmf.js +1 -0
- package/docs/docs/.vitepress/dist/assets/pages_api.md.Bo9Kusmf.lean.js +1 -0
- package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BhmYOQjE.js → pages_browse-code.md.BS0BRUx_.js} +39 -29
- package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.C8UElRkE.js → pages_getting-started.md.BbVqm1ey.js} +39 -29
- package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.C2kOmJCV.js → pages_guidelines.md.fL8xf0Gx.js} +3 -3
- package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.C2kOmJCV.lean.js → pages_guidelines.md.fL8xf0Gx.lean.js} +3 -3
- package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.D6PSCfuz.js → pages_how-it-works.md.CP31gYQw.js} +39 -29
- package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.D6PSCfuz.lean.js → pages_how-it-works.md.CP31gYQw.lean.js} +39 -29
- package/docs/docs/.vitepress/dist/assets/pages_how-its-made.md.C02KZK0J.js +1 -0
- package/docs/docs/.vitepress/dist/assets/{pages_introduction.md.MtnX0UvH.js → pages_introduction.md.B6foeVXQ.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/{pages_introduction.md.MtnX0UvH.lean.js → pages_introduction.md.B6foeVXQ.lean.js} +1 -1
- package/docs/docs/.vitepress/dist/assets/{pages_usage.md.Dw6OzuOj.js → pages_usage.md.5C8BnzAi.js} +24 -24
- package/docs/docs/.vitepress/dist/assets/{pages_usage.md.Dw6OzuOj.lean.js → pages_usage.md.5C8BnzAi.lean.js} +24 -24
- package/docs/docs/.vitepress/dist/hashmap.json +1 -1
- package/docs/docs/.vitepress/dist/index.html +4 -4
- package/docs/docs/.vitepress/dist/pages/advanced-usage.html +5 -5
- package/docs/docs/.vitepress/dist/pages/api.html +6 -6
- package/docs/docs/.vitepress/dist/pages/browse-code.html +43 -33
- package/docs/docs/.vitepress/dist/pages/getting-started.html +44 -34
- package/docs/docs/.vitepress/dist/pages/guidelines.html +8 -8
- package/docs/docs/.vitepress/dist/pages/how-it-works.html +44 -34
- package/docs/docs/.vitepress/dist/pages/how-its-made.html +5 -5
- package/docs/docs/.vitepress/dist/pages/introduction.html +5 -5
- package/docs/docs/.vitepress/dist/pages/usage.html +28 -28
- package/docs/docs/components/advanced-usage/ConvertLegacy.vue +58 -0
- package/docs/docs/pages/advanced-usage.md +2 -1
- package/docs/docs/pages/api.md +7 -3
- package/docs/docs/pages/guidelines.md +1 -1
- package/docs/docs/pages/how-its-made.md +3 -3
- package/docs/docs/pages/introduction.md +1 -1
- package/docs/package.json +1 -1
- package/package.json +6 -1
- package/src/__tests__/ivue.vitest.spec.ts +61 -7
- package/src/ivue.ts +34 -24
- package/docs/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.ChoKIVFM.js +0 -1
- package/docs/docs/.vitepress/dist/assets/pages_api.md.bOEtTo1m.js +0 -1
- package/docs/docs/.vitepress/dist/assets/pages_api.md.bOEtTo1m.lean.js +0 -1
- package/docs/docs/.vitepress/dist/assets/pages_how-its-made.md.CCol99CD.js +0 -1
- /package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BhmYOQjE.lean.js → pages_browse-code.md.BS0BRUx_.lean.js} +0 -0
- /package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.C8UElRkE.lean.js → pages_getting-started.md.BbVqm1ey.lean.js} +0 -0
- /package/docs/docs/.vitepress/dist/assets/{pages_how-its-made.md.CCol99CD.lean.js → pages_how-its-made.md.C02KZK0J.lean.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i}from"./chunks/Button.vue_vue_type_script_setup_true_lang.Bynntqk6.js";import{d as o,c as a,j as e,a as t,I as s,a5 as n,o as r}from"./chunks/framework.CvEKxEoK.js";const c=n('<h1 id="what-is-ivue-∞-infinite-vue" tabindex="-1">What is <span style="font-family:'Public Sans';">ivue ∞ Infinite Vue</span>? <a class="header-anchor" href="#what-is-ivue-∞-infinite-vue" aria-label="Permalink to "What is <span style="font-family: 'Public Sans'; ">ivue ∞ Infinite Vue</span>?""></a></h1><h2 id="the-problem" tabindex="-1">The Problem <a class="header-anchor" href="#the-problem" aria-label="Permalink to "The Problem""></a></h2><p>With the development of React hooks and Vue following in its footsteps with introduction of Vue 3 Composition API, the ecosystem has moved away from Options API.</p><p>While providing greater flexibility and composability the Composition API has its own downsides, one of them is having to use <code>.value</code> to refer to the reactive variables which makes the development process more clunky when the App reaches a certain size.</p><p>As you may know, <code>reactvity-transform</code> macros were an attempt to mitigate those issues, which turned out to create even more issues, and was discontinued.</p><p>See: <a href="https://vuejs.org/guide/extras/reactivity-transform.html" target="_blank" rel="noreferrer">VueJs.org – Reactivity Transform</a></p><h2 id="ivue-is" tabindex="-1"><code>ivue</code> is <a class="header-anchor" href="#ivue-is" aria-label="Permalink to "`ivue` is""></a></h2><div style="padding-left:20px;font-size:1.2rem;line-height:2rem;"> – Simple like Options API<br> – Flexible like Composition API<br> – Extensible like TypeScript Class API<br> – Robust, Minimal, Opaque & Unobtrusive<br> – 100% Vue 3 Compatible<br> – 100% Test Covered<br> – 100% Type Safe<br> – Production Ready<br> – Just <code>1.1kb</code> gzipped!<br> – 100% VSCode / Intellij IDE Auto-complete Intellisence<br></div><p><code>ivue</code> is a powerful tool because it fully aligns itself with JavaScript / TypeScript Class API.</p><p><code>ivue</code> gives you a class based Composable capabilities with Inheritance and all the power of TypeScript Classes.</p><p><code>ivue</code> mitigates the downsides of both Composition API and Options API, uses only their strengths and brings back Object Oriented Programming to allow the development of complex and scalable apps.</p><p><code>ivue</code> is fully interoperable with Composition API and does not work against, but rather with it, so you can use all of ecosystems composables seamlessly.</p><p><code>ivue</code> also offers a set of functions and utility types to make extensible & exportable props defaults, extensible emits, extensible slots, etc. and much more possible.</p><p><code>ivue</code> aims to be opaque, by giving the developer the Class API reactivity system.</p><p><code>ivue</code> omits custom implementations of IOC Container, Decorators, Mixins, etc. by design.</p><p><code>ivue</code> enforces a sane default standard of operation to contain the ever flexible Class API.</p><p><code>ivue</code> uses Powerful Cutting Edge TypeScript to transform Vue 3 Refs to their base types, infer Class constructor arguments, infer Composable return types and function arguments and much more, making Object Oriented DX Experience with Vue 3 a breeze.</p><h2 id="oop-and-typescript-class-api-in-the-ecosystem" tabindex="-1">OOP and TypeScript Class API in the Ecosystem <a class="header-anchor" href="#oop-and-typescript-class-api-in-the-ecosystem" aria-label="Permalink to "OOP and TypeScript Class API in the Ecosystem""></a></h2><p>With failed implementations of classes in React and also failed implementations using class components in Vue 2 / 3, the ecosystem decided that classes are bad and moved to pure procedural designs.</p><p>While procedural programming has its strength, it also comes with its own weaknesses, like lack of inheritance, lack of <code>this</code> context, and thus lack of true composition.</p><h2 id="ivue-is-different" tabindex="-1"><code>ivue</code> is different <a class="header-anchor" href="#ivue-is-different" aria-label="Permalink to "`ivue` is different""></a></h2><p>— <code>ivue</code> does NOT inherit from a base Class.<br> — <code>ivue</code> does NOT use Decorators to achieve its objectives.<br> — <code>ivue</code> does NOT alter Vue 3 underlying behavior, but rather relies on it.<br> — <code>ivue</code> is NOT Class Components (though you can build components with it).<br></p><div class="tip custom-block"><p class="custom-block-title">IVUE IMPLEMENTS MINIMAL API ARCHITECTURE</p><p>Things like IOC Container, Decorators, Traits, Mixins, etc. were omitted by design to slim down the surface area and scope of <code>ivue</code> core purpose, which was JavaScript / TypeScript Class API based reactivity. Any Traits, Decorators & IOC Container can be built around it using third-party libraries or roll your own systems. You are more than welcome to contribute in this area!</p></div><h2 id="infinite-vue-class-
|
|
1
|
+
import{_ as i}from"./chunks/Button.vue_vue_type_script_setup_true_lang.Bynntqk6.js";import{d as o,c as a,j as e,a as t,I as s,a5 as n,o as r}from"./chunks/framework.CvEKxEoK.js";const c=n('<h1 id="what-is-ivue-∞-infinite-vue" tabindex="-1">What is <span style="font-family:'Public Sans';">ivue ∞ Infinite Vue</span>? <a class="header-anchor" href="#what-is-ivue-∞-infinite-vue" aria-label="Permalink to "What is <span style="font-family: 'Public Sans'; ">ivue ∞ Infinite Vue</span>?""></a></h1><h2 id="the-problem" tabindex="-1">The Problem <a class="header-anchor" href="#the-problem" aria-label="Permalink to "The Problem""></a></h2><p>With the development of React hooks and Vue following in its footsteps with introduction of Vue 3 Composition API, the ecosystem has moved away from Options API.</p><p>While providing greater flexibility and composability the Composition API has its own downsides, one of them is having to use <code>.value</code> to refer to the reactive variables which makes the development process more clunky when the App reaches a certain size.</p><p>As you may know, <code>reactvity-transform</code> macros were an attempt to mitigate those issues, which turned out to create even more issues, and was discontinued.</p><p>See: <a href="https://vuejs.org/guide/extras/reactivity-transform.html" target="_blank" rel="noreferrer">VueJs.org – Reactivity Transform</a></p><h2 id="ivue-is" tabindex="-1"><code>ivue</code> is <a class="header-anchor" href="#ivue-is" aria-label="Permalink to "`ivue` is""></a></h2><div style="padding-left:20px;font-size:1.2rem;line-height:2rem;"> – Simple like Options API<br> – Flexible like Composition API<br> – Extensible like TypeScript Class API<br> – Robust, Minimal, Opaque & Unobtrusive<br> – 100% Vue 3 Compatible<br> – 100% Test Covered<br> – 100% Type Safe<br> – Production Ready<br> – Just <code>1.1kb</code> gzipped!<br> – 100% VSCode / Intellij IDE Auto-complete Intellisence<br></div><p><code>ivue</code> is a powerful tool because it fully aligns itself with JavaScript / TypeScript Class API.</p><p><code>ivue</code> gives you a class based Composable capabilities with Inheritance and all the power of TypeScript Classes.</p><p><code>ivue</code> mitigates the downsides of both Composition API and Options API, uses only their strengths and brings back Object Oriented Programming to allow the development of complex and scalable apps.</p><p><code>ivue</code> is fully interoperable with Composition API and does not work against, but rather with it, so you can use all of ecosystems composables seamlessly.</p><p><code>ivue</code> also offers a set of functions and utility types to make extensible & exportable props defaults, extensible emits, extensible slots, etc. and much more possible.</p><p><code>ivue</code> aims to be opaque, by giving the developer the Class API reactivity system.</p><p><code>ivue</code> omits custom implementations of IOC Container, Decorators, Mixins, etc. by design.</p><p><code>ivue</code> enforces a sane default standard of operation to contain the ever flexible Class API.</p><p><code>ivue</code> uses Powerful Cutting Edge TypeScript to transform Vue 3 Refs to their base types, infer Class constructor arguments, infer Composable return types and function arguments and much more, making Object Oriented DX Experience with Vue 3 a breeze.</p><h2 id="oop-and-typescript-class-api-in-the-ecosystem" tabindex="-1">OOP and TypeScript Class API in the Ecosystem <a class="header-anchor" href="#oop-and-typescript-class-api-in-the-ecosystem" aria-label="Permalink to "OOP and TypeScript Class API in the Ecosystem""></a></h2><p>With failed implementations of classes in React and also failed implementations using class components in Vue 2 / 3, the ecosystem decided that classes are bad and moved to pure procedural designs.</p><p>While procedural programming has its strength, it also comes with its own weaknesses, like lack of inheritance, lack of <code>this</code> context, and thus lack of true composition.</p><h2 id="ivue-is-different" tabindex="-1"><code>ivue</code> is different <a class="header-anchor" href="#ivue-is-different" aria-label="Permalink to "`ivue` is different""></a></h2><p>— <code>ivue</code> does NOT inherit from a base Class.<br> — <code>ivue</code> does NOT use Decorators to achieve its objectives.<br> — <code>ivue</code> does NOT alter Vue 3 underlying behavior, but rather relies on it.<br> — <code>ivue</code> is NOT Class Components (though you can build components with it).<br></p><div class="tip custom-block"><p class="custom-block-title">IVUE IMPLEMENTS MINIMAL API ARCHITECTURE</p><p>Things like IOC Container, Decorators, Traits, Mixins, etc. were omitted by design to slim down the surface area and scope of <code>ivue</code> core purpose, which was JavaScript / TypeScript Class API based reactivity. Any Traits, Decorators & IOC Container can be built around it using third-party libraries or roll your own systems. You are more than welcome to contribute in this area!</p></div><h2 id="infinite-vue-class-architecture" tabindex="-1">Infinite Vue Class Architecture <a class="header-anchor" href="#infinite-vue-class-architecture" aria-label="Permalink to "Infinite Vue Class Architecture""></a></h2><p><code>ivue</code> replicates native JavaScript / TypeScript class implementation by extending descriptors (getters and setters) up the whole prototype ancestors chain thus supporting classical inheritance.</p><p>By using TypeScript we are able to infer the arguments of the main <code>ivue()</code> initializer function and pass the arguments to the constructor.</p><p><code>ivue()</code> initializer function returns a reactive object with getters converted to computeds and adds <code>.toRefs()</code> method to the object, <code>.toRefs()</code> allows the object to be converted to native composable structure, so it can interoperate as a composable if needed.</p><p><code>ivue</code> aims to be opaque and minimal, just doing the minimum to convert a class to a reactive object, leaving the rest to be implemented using Vue 3 Composition API inside an initializer function called <code>.init()</code></p>',28),l=e("code",null,"ivue",-1),d=e("h2",{id:"when-to-use-infinite-vue",tabindex:"-1"},[t("When to use Infinite Vue? "),e("a",{class:"header-anchor",href:"#when-to-use-infinite-vue","aria-label":'Permalink to "When to use Infinite Vue?"'},"")],-1),p=e("p",null,[t("When the complexity of your app or components becomes very high using "),e("code",null,"ivue"),t(" can become a natural choice to deal with that complexity. Because "),e("code",null,".value"),t(" is abstracted away in "),e("code",null,"ivue"),t(", everything is simply a reactive object of Refs.")],-1),y=JSON.parse('{"title":"What is ivue ∞ Infinite Vue?","description":"","frontmatter":{},"headers":[],"relativePath":"pages/introduction.md","filePath":"pages/introduction.md"}'),u={name:"pages/introduction.md"},g=o({...u,setup(h){return(m,f)=>(r(),a("div",null,[c,e("p",null,[t("You can read more about "),l,t(" internal architecture in "),s(i,{href:"/pages/how-it-works",label:"How it works?"}),t(" page.")]),d,p]))}});export{y as __pageData,g as default};
|