ivue 0.1.12-beta.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +7 -0
  3. package/.eslintrc.js +120 -0
  4. package/.github/workflows/ci.yml +68 -0
  5. package/.prettierrc +5 -0
  6. package/LICENSE +2 -2
  7. package/README.md +20 -28
  8. package/coverage/base.css +224 -0
  9. package/coverage/block-navigation.js +87 -0
  10. package/coverage/clover.xml +169 -0
  11. package/coverage/coverage-final.json +2 -0
  12. package/coverage/favicon.png +0 -0
  13. package/coverage/index.html +116 -0
  14. package/coverage/index.ts.html +1474 -0
  15. package/coverage/prettify.css +1 -0
  16. package/coverage/prettify.js +2 -0
  17. package/coverage/sort-arrow-sprite.png +0 -0
  18. package/coverage/sorter.js +196 -0
  19. package/demo/App.vue +113 -56
  20. package/demo/main.ts +5 -19
  21. package/demo/vite.config.ts +8 -1
  22. package/dist/docs/vite-env.d.ts +7 -0
  23. package/dist/index.es.js +97 -505
  24. package/dist/index.umd.js +1 -1
  25. package/dist/src/index.d.ts +196 -21
  26. package/dist/vite-env.d.ts +7 -0
  27. package/docs/.editorconfig +9 -0
  28. package/docs/.env +1 -0
  29. package/docs/.eslintignore +7 -0
  30. package/docs/.eslintrc.js +120 -0
  31. package/docs/.prettierrc +5 -0
  32. package/docs/docs/.vitepress/config.ts +56 -0
  33. package/docs/docs/.vitepress/dist/404.html +21 -0
  34. package/docs/docs/.vitepress/dist/api/ivue.html +24 -0
  35. package/docs/docs/.vitepress/dist/api/propsWithDefaults.html +24 -0
  36. package/docs/docs/.vitepress/dist/assets/api_ivue.md.BCZ4q_0D.js +1 -0
  37. package/docs/docs/.vitepress/dist/assets/api_ivue.md.BCZ4q_0D.lean.js +1 -0
  38. package/docs/docs/.vitepress/dist/assets/api_propsWithDefaults.md.Cr5FwI9o.js +1 -0
  39. package/docs/docs/.vitepress/dist/assets/api_propsWithDefaults.md.Cr5FwI9o.lean.js +1 -0
  40. package/docs/docs/.vitepress/dist/assets/app.DRiljpSE.js +1 -0
  41. package/docs/docs/.vitepress/dist/assets/chunks/framework.CEhE-9HF.js +1 -0
  42. package/docs/docs/.vitepress/dist/assets/chunks/theme.CldUEgAJ.js +1 -0
  43. package/docs/docs/.vitepress/dist/assets/index.md.B1vDz5mb.js +1 -0
  44. package/docs/docs/.vitepress/dist/assets/index.md.B1vDz5mb.lean.js +1 -0
  45. package/docs/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  46. package/docs/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  47. package/docs/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  48. package/docs/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  49. package/docs/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  50. package/docs/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  51. package/docs/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  52. package/docs/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  53. package/docs/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  54. package/docs/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  55. package/docs/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  56. package/docs/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  57. package/docs/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  58. package/docs/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  59. package/docs/docs/.vitepress/dist/assets/pages_getting-started.md.C7qtPEWU.js +8 -0
  60. package/docs/docs/.vitepress/dist/assets/pages_getting-started.md.C7qtPEWU.lean.js +1 -0
  61. package/docs/docs/.vitepress/dist/assets/pages_how-it-works.md.DKizt6Ny.js +1 -0
  62. package/docs/docs/.vitepress/dist/assets/pages_how-it-works.md.DKizt6Ny.lean.js +1 -0
  63. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.Dkqu-XCz.js +1 -0
  64. package/docs/docs/.vitepress/dist/assets/pages_introduction.md.Dkqu-XCz.lean.js +1 -0
  65. package/docs/docs/.vitepress/dist/assets/pages_usage.md.qo7ICfLC.js +17 -0
  66. package/docs/docs/.vitepress/dist/assets/pages_usage.md.qo7ICfLC.lean.js +17 -0
  67. package/docs/docs/.vitepress/dist/assets/style.BSZVsGuP.css +1 -0
  68. package/docs/docs/.vitepress/dist/hashmap.json +1 -0
  69. package/docs/docs/.vitepress/dist/index.html +24 -0
  70. package/docs/docs/.vitepress/dist/pages/getting-started.html +31 -0
  71. package/docs/docs/.vitepress/dist/pages/how-it-works.html +24 -0
  72. package/docs/docs/.vitepress/dist/pages/introduction.html +24 -0
  73. package/docs/docs/.vitepress/dist/pages/usage.html +40 -0
  74. package/docs/docs/api/propsWithDefaults.md +0 -0
  75. package/docs/docs/components/Button.vue +13 -0
  76. package/docs/docs/components/Component.vue +20 -0
  77. package/docs/docs/components/examples/Counter.vue +17 -0
  78. package/docs/docs/index.md +32 -0
  79. package/docs/docs/pages/getting-started.md +14 -0
  80. package/docs/docs/pages/how-it-works.md +0 -0
  81. package/docs/docs/pages/introduction.md +45 -0
  82. package/docs/docs/pages/usage.md +16 -0
  83. package/docs/package.json +36 -0
  84. package/docs/scripts/gh-pages-deploy.js +34 -0
  85. package/docs/vite-env.d.ts +7 -0
  86. package/docs/vite.config.ts +20 -0
  87. package/index.html +5 -4
  88. package/package.json +46 -61
  89. package/src/__tests__/ivue.vitest.spec.ts +426 -0
  90. package/src/index.ts +460 -80
  91. package/tsconfig.json +21 -11
  92. package/vite-env.d.ts +7 -0
  93. package/vite.config.ts +26 -26
  94. package/vitest.config.ts +13 -12
  95. package/.babelrc.json +0 -14
  96. package/.eslintrc.cjs +0 -24
  97. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  98. package/.idea/compiler.xml +0 -7
  99. package/.idea/inspectionProfiles/Project_Default.xml +0 -11
  100. package/.idea/ivue.iml +0 -10
  101. package/.idea/modules.xml +0 -8
  102. package/.idea/php.xml +0 -20
  103. package/.idea/vcs.xml +0 -6
  104. package/.vscode/extensions.json +0 -3
  105. package/PLAN.md +0 -39
  106. package/demo/components/IVueTest.vue +0 -301
  107. package/demo/components/PreComponent.vue +0 -13
  108. package/demo/components/SubComponent2.vue +0 -45
  109. package/demo/components/TraitsComponent.vue +0 -120
  110. package/demo/components/useIVueTest.vue +0 -136
  111. package/demo/router/index.ts +0 -14
  112. package/demo/tests/IVueTests.ts +0 -265
  113. package/demo/tests/Mouse.ts +0 -79
  114. package/demo/tests/ParentIVueTests.ts +0 -36
  115. package/demo/tests/TApp.ts +0 -15
  116. package/demo/tests/TAuth.ts +0 -23
  117. package/demo/tests/TField.ts +0 -84
  118. package/demo/tests/TMessage.ts +0 -52
  119. package/demo/tests/TRouter.ts +0 -18
  120. package/demo/tests/TUser.ts +0 -19
  121. package/demo/tests/Test.ts +0 -86
  122. package/demo/tests/useField.ts +0 -82
  123. package/demo/tests/useIVueTests.ts +0 -57
  124. package/dist/favicon.ico +0 -0
  125. package/dist/src/behavior.d.ts +0 -72
  126. package/dist/src/config.d.ts +0 -6
  127. package/dist/src/ivue.d.ts +0 -36
  128. package/dist/src/kernel.d.ts +0 -182
  129. package/dist/src/traits/UseCapsule.d.ts +0 -9
  130. package/dist/src/traits/UseEmit.d.ts +0 -3
  131. package/dist/src/traits/UseInstance.d.ts +0 -6
  132. package/dist/src/traits/UseMounting.d.ts +0 -11
  133. package/dist/src/traits/UseRefs.d.ts +0 -8
  134. package/dist/src/traits/UseRoute.d.ts +0 -3
  135. package/dist/src/traits/UseRouter.d.ts +0 -3
  136. package/dist/src/traits/UseRouting.d.ts +0 -6
  137. package/dist/src/traits/UseTick.d.ts +0 -4
  138. package/dist/src/traits/UseVue.d.ts +0 -13
  139. package/dist/src/types/core.d.ts +0 -46
  140. package/dist/src/utils/dispose-garbage.d.ts +0 -12
  141. package/dist/src/utils/extend.d.ts +0 -12
  142. package/dist/src/utils/getters.d.ts +0 -21
  143. package/dist/src/utils/index.d.ts +0 -7
  144. package/dist/src/utils/is.d.ts +0 -14
  145. package/dist/src/utils/pre.d.ts +0 -9
  146. package/dist/src/utils/raw.d.ts +0 -12
  147. package/dist/src/utils/safe-class-name.d.ts +0 -7
  148. package/dist/src/utils/traits.d.ts +0 -41
  149. package/env.d.ts +0 -1
  150. package/package-lock.json +0 -14305
  151. package/public/favicon.ico +0 -0
  152. package/src/App/App.ts +0 -30
  153. package/src/App/Auth/Auth.ts +0 -105
  154. package/src/App/Auth/Auth.vue +0 -98
  155. package/src/App/Auth/Logout.vue +0 -14
  156. package/src/App/Auth/User.ts +0 -6
  157. package/src/App/BlackBox.ts +0 -82
  158. package/src/App/Config.ts +0 -6
  159. package/src/App/Generators/generators.ts +0 -47
  160. package/src/App/Home/Home.vue +0 -16
  161. package/src/App/Services/Http/FakeHttp.ts +0 -8
  162. package/src/App/Services/Http/Http.ts +0 -51
  163. package/src/App/Services/Message/Message.ts +0 -49
  164. package/src/App/Services/Message/Message.vue +0 -15
  165. package/src/App/Services/Navigation/Navigation.ts +0 -83
  166. package/src/App/Services/Navigation/Navigation.vue +0 -59
  167. package/src/App/Services/Routing/FakeRouter.ts +0 -7
  168. package/src/App/Services/Routing/NotFoundRoute.vue +0 -13
  169. package/src/App/Services/Routing/Router.ts +0 -263
  170. package/src/App/Services/Routing/Routes.ts +0 -49
  171. package/src/App/Stubs/SingleBookResultStub.ts +0 -13
  172. package/src/App/Traits/UseApp.ts +0 -6
  173. package/src/App/Traits/UseQuasar.ts +0 -8
  174. package/src/behavior.ts +0 -269
  175. package/src/config.ts +0 -15
  176. package/src/dev/dev-utils.ts +0 -78
  177. package/src/ivue.ts +0 -299
  178. package/src/kernel.ts +0 -815
  179. package/src/tests/auth.spec.ts +0 -87
  180. package/src/traits/UseCapsule.ts +0 -28
  181. package/src/traits/UseEmit.ts +0 -3
  182. package/src/traits/UseInstance.ts +0 -17
  183. package/src/traits/UseMounting.ts +0 -23
  184. package/src/traits/UseRefs.ts +0 -17
  185. package/src/traits/UseRoute.ts +0 -6
  186. package/src/traits/UseRouter.ts +0 -5
  187. package/src/traits/UseRouting.ts +0 -7
  188. package/src/traits/UseTick.ts +0 -5
  189. package/src/traits/UseVue.ts +0 -38
  190. package/src/types/core.ts +0 -66
  191. package/src/utils/dispose-garbage.ts +0 -34
  192. package/src/utils/extend.ts +0 -86
  193. package/src/utils/getters.ts +0 -59
  194. package/src/utils/index.ts +0 -16
  195. package/src/utils/is.ts +0 -22
  196. package/src/utils/pre.ts +0 -29
  197. package/src/utils/raw.ts +0 -19
  198. package/src/utils/safe-class-name.ts +0 -15
  199. package/src/utils/traits.ts +0 -121
  200. package/tsconfig.app.json +0 -47
  201. package/tsconfig.node.json +0 -14
  202. package/tsconfig.vitest.json +0 -9
  203. /package/{src/App/Traits/UseBlackline.ts → docs/docs/api/ivue.md} +0 -0
package/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
package/.eslintignore ADDED
@@ -0,0 +1,7 @@
1
+ /dist
2
+ /src-capacitor
3
+ /src-cordova
4
+ /.quasar
5
+ /node_modules
6
+ .eslintrc.js
7
+ /src-ssr
package/.eslintrc.js ADDED
@@ -0,0 +1,120 @@
1
+ module.exports = {
2
+ // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
3
+ // This option interrupts the configuration hierarchy at this file
4
+ // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
5
+ root: true,
6
+ // https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
7
+ // Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
8
+ // `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
9
+ parserOptions: {
10
+ parser: require.resolve('@typescript-eslint/parser'),
11
+ extraFileExtensions: ['.vue'],
12
+ },
13
+ env: {
14
+ browser: true,
15
+ es2021: true,
16
+ node: true,
17
+ 'vue/setup-compiler-macros': true,
18
+ },
19
+ // Rules order is important, please avoid shuffling them
20
+ extends: [
21
+ 'plugin:@typescript-eslint/recommended',
22
+ 'plugin:vue/vue3-recommended',
23
+ 'prettier',
24
+ 'plugin:storybook/recommended',
25
+ ],
26
+ plugins: [
27
+ // required to apply rules which need type information
28
+ '@typescript-eslint',
29
+ // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
30
+ // required to lint *.vue files
31
+ 'vue',
32
+
33
+ // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
34
+ // Prettier has not been included as plugin to avoid performance impact
35
+ // add it as an extension for your IDE
36
+
37
+ 'import',
38
+ ],
39
+
40
+ globals: {
41
+ ga: 'readonly',
42
+ // Google Analytics
43
+ cordova: 'readonly',
44
+ __statics: 'readonly',
45
+ __QUASAR_SSR__: 'readonly',
46
+ __QUASAR_SSR_SERVER__: 'readonly',
47
+ __QUASAR_SSR_CLIENT__: 'readonly',
48
+ __QUASAR_SSR_PWA__: 'readonly',
49
+ process: 'readonly',
50
+ Capacitor: 'readonly',
51
+ chrome: 'readonly',
52
+ },
53
+ // add your custom rules here
54
+ rules: {
55
+ 'prefer-promise-reject-errors': 'off',
56
+ quotes: [
57
+ 'warn',
58
+ 'single',
59
+ {
60
+ avoidEscape: true,
61
+ },
62
+ ],
63
+ // this rule, if on, would require explicit return type on the `render` function
64
+ '@typescript-eslint/explicit-function-return-type': 'off',
65
+ // in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
66
+ '@typescript-eslint/no-var-requires': 'off',
67
+
68
+ '@typescript-eslint/no-empty-function': 'off',
69
+ // allow type any
70
+ '@typescript-eslint/no-explicit-any': 'off',
71
+ 'vue/no-v-html': 'off',
72
+ // The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
73
+ // does not work with type definitions
74
+ 'no-unused-vars': 'off',
75
+ // allow debugger during development only
76
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
77
+ 'sort-imports': [
78
+ 'warn',
79
+ {
80
+ ignoreCase: false,
81
+ // don"t want to sort import lines, use eslint-plugin-import instead
82
+ ignoreDeclarationSort: true,
83
+ ignoreMemberSort: false,
84
+ memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
85
+ allowSeparatedGroups: true,
86
+ },
87
+ ],
88
+ 'import/no-duplicates': ['error'],
89
+ 'import/order': [
90
+ 'warn',
91
+ {
92
+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
93
+ groups: [['builtin', 'external', 'internal']],
94
+ pathGroups: [
95
+ {
96
+ pattern: 'src/**',
97
+ group: 'internal',
98
+ position: 'after',
99
+ },
100
+ ],
101
+ pathGroupsExcludedImportTypes: ['builtin'],
102
+ 'newlines-between': 'always',
103
+ alphabetize: {
104
+ order: 'asc',
105
+ caseInsensitive: true,
106
+ },
107
+ },
108
+ ],
109
+ },
110
+ overrides: [
111
+ {
112
+ files: ['test/cypress/**/*.{js,jsx,ts,tsx}', '**/*.cy.{js,jsx,ts,tsx}'],
113
+ extends: [
114
+ // Add Cypress-specific lint rules, globals and Cypress plugin
115
+ // See https://github.com/cypress-io/eslint-plugin-cypress#rules
116
+ 'plugin:cypress/recommended',
117
+ ],
118
+ },
119
+ ],
120
+ };
@@ -0,0 +1,68 @@
1
+ name: ci
2
+ on: [ push ]
3
+
4
+ jobs:
5
+ build:
6
+ name: vitest
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v3
10
+
11
+ - name: Set Node.js 18.x
12
+ uses: actions/setup-node@v3
13
+ with:
14
+ node-version: 18.x
15
+
16
+ - name: yarn install
17
+ uses: borales/actions-yarn@v4
18
+ with:
19
+ cmd: install # will run `yarn install` command
20
+ # dir: 'ivue'
21
+ - name: vitest ivue
22
+ uses: borales/actions-yarn@v4
23
+ with:
24
+ cmd: test # will run `yarn test` command
25
+ # dir: 'ivue'
26
+ docs-deploy:
27
+ name: deploy docs
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@v3
31
+
32
+ - name: Set Node.js 18.x
33
+ uses: actions/setup-node@v3
34
+ with:
35
+ node-version: 18.x
36
+
37
+ - name: Setup git
38
+ run: |
39
+ git config user.name "Evgeny Kalashnikov" && git config user.email "ekalashnikov@gmail.com"
40
+ - name: yarn install
41
+ uses: borales/actions-yarn@v4
42
+ with:
43
+ cmd: install # will run `yarn install` command
44
+ dir: 'docs'
45
+ - name: deploy docs
46
+ uses: borales/actions-yarn@v4
47
+ with:
48
+ cmd: deploy # will run `yarn deploy` command
49
+ dir: 'docs'
50
+ # docs-deploy:
51
+ # name: Deploying to gh-pages
52
+ # runs-on: ubuntu-latest
53
+ # steps:
54
+ # - name: Setup Node.js for use with actions
55
+ # uses: actions/setup-node@v2
56
+ # with:
57
+ # version: 12.x
58
+ # - name: Checkout branch
59
+ # uses: actions/checkout@v2
60
+ #
61
+ # - name: Clean install dependencies
62
+ # run: npm ci
63
+ #
64
+ # - name: Run deploy script
65
+ # run: |
66
+ # git config user.name "Evgeny Kalashnikov" && git config user.email "ekalashnikov@gmail.com"
67
+ #
68
+ # cmd: deploy
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "printWidth": 80,
3
+ "singleQuote": true,
4
+ "semi": true
5
+ }
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 - ∞ Evgeny Kalashnikov
1
+ Copyright (c) 2023 ∞ Evgeny Kalashnikov
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
16
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
17
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
18
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.
19
+ SOFTWARE.
package/README.md CHANGED
@@ -1,34 +1,26 @@
1
- # ivue Infinite Vue
1
+ ## ivue – Infinite Vue     [![npm](https://img.shields.io/npm/v/ivue.svg)](https://www.npmjs.com/package/ivue) [![build status](https://github.com/infinite-system/ivue/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/infinite-system/ivue/actions/workflows/ci.yml)
2
2
 
3
- Advanced State Management & Class Architecture for Vue 3+.
3
+ ## About
4
4
 
5
- ## Install
5
+ **ivue** is a TypeScript classes based composable architecture for Vue 3, that unlocks infinite scalability for Vue 3 based apps. It allows you to extend the regular Vue 3 in a simple and elegant way.
6
6
 
7
- ```sh
8
- # Using npm
9
- npm i ivue
10
- # or yarn
11
- yarn add ivue
12
- ```
7
+ ## Features
8
+ &ndash; Simple & Elegant Architecture<br />
9
+ &ndash; Extendible Classes aligned with TypeScript Class design<br />
10
+ &ndash; Extendible Props Defaults<br />
11
+ &ndash; Extendible Emits<br />
12
+ &ndash; Extendible Slots<br />
13
+ &ndash; Extendible Components<br />
14
+ &ndash; Improves DX by elegantly dealing with .value in the background<br />
15
+ &ndash; Can be used both as a Store and a View Model for Components<br />
16
+ &ndash; Provides Full TypeScript Support<br />
17
+ &ndash; 100% Tested<br />
18
+ &ndash; Zero dependencies except Vue 3<br />
19
+ &ndash; Only 1kb in size!<br />
20
+ &ndash; Production Ready<br />
13
21
 
14
- ## Run Dev Server
15
- ```
16
- yarn dev
17
- ```
22
+ ## How Does it Work
18
23
 
19
- ### Files to look at:
24
+ ## Examples
20
25
 
21
- Main logic for ivue:
22
- https://github.com/infinite-system/infinite-vue/blob/main/src/ivue.ts
23
-
24
- Utils:
25
- https://github.com/infinite-system/infinite-vue/blob/main/src/utils.ts
26
-
27
- Inversion of Control Container:
28
- https://github.com/infinite-system/infinite-vue/blob/main/src/kernel.ts
29
-
30
- App.vue:
31
- https://github.com/infinite-system/infinite-vue/blob/main/demo/App.vue
32
-
33
- Main class used for playground in App.vue:
34
- https://github.com/infinite-system/infinite-vue/blob/main/demo/tests/IVueTests.ts
26
+ ## Documentation
@@ -0,0 +1,224 @@
1
+ body, html {
2
+ margin:0; padding: 0;
3
+ height: 100%;
4
+ }
5
+ body {
6
+ font-family: Helvetica Neue, Helvetica, Arial;
7
+ font-size: 14px;
8
+ color:#333;
9
+ }
10
+ .small { font-size: 12px; }
11
+ *, *:after, *:before {
12
+ -webkit-box-sizing:border-box;
13
+ -moz-box-sizing:border-box;
14
+ box-sizing:border-box;
15
+ }
16
+ h1 { font-size: 20px; margin: 0;}
17
+ h2 { font-size: 14px; }
18
+ pre {
19
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
+ margin: 0;
21
+ padding: 0;
22
+ -moz-tab-size: 2;
23
+ -o-tab-size: 2;
24
+ tab-size: 2;
25
+ }
26
+ a { color:#0074D9; text-decoration:none; }
27
+ a:hover { text-decoration:underline; }
28
+ .strong { font-weight: bold; }
29
+ .space-top1 { padding: 10px 0 0 0; }
30
+ .pad2y { padding: 20px 0; }
31
+ .pad1y { padding: 10px 0; }
32
+ .pad2x { padding: 0 20px; }
33
+ .pad2 { padding: 20px; }
34
+ .pad1 { padding: 10px; }
35
+ .space-left2 { padding-left:55px; }
36
+ .space-right2 { padding-right:20px; }
37
+ .center { text-align:center; }
38
+ .clearfix { display:block; }
39
+ .clearfix:after {
40
+ content:'';
41
+ display:block;
42
+ height:0;
43
+ clear:both;
44
+ visibility:hidden;
45
+ }
46
+ .fl { float: left; }
47
+ @media only screen and (max-width:640px) {
48
+ .col3 { width:100%; max-width:100%; }
49
+ .hide-mobile { display:none!important; }
50
+ }
51
+
52
+ .quiet {
53
+ color: #7f7f7f;
54
+ color: rgba(0,0,0,0.5);
55
+ }
56
+ .quiet a { opacity: 0.7; }
57
+
58
+ .fraction {
59
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
+ font-size: 10px;
61
+ color: #555;
62
+ background: #E8E8E8;
63
+ padding: 4px 5px;
64
+ border-radius: 3px;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ div.path a:link, div.path a:visited { color: #333; }
69
+ table.coverage {
70
+ border-collapse: collapse;
71
+ margin: 10px 0 0 0;
72
+ padding: 0;
73
+ }
74
+
75
+ table.coverage td {
76
+ margin: 0;
77
+ padding: 0;
78
+ vertical-align: top;
79
+ }
80
+ table.coverage td.line-count {
81
+ text-align: right;
82
+ padding: 0 5px 0 20px;
83
+ }
84
+ table.coverage td.line-coverage {
85
+ text-align: right;
86
+ padding-right: 10px;
87
+ min-width:20px;
88
+ }
89
+
90
+ table.coverage td span.cline-any {
91
+ display: inline-block;
92
+ padding: 0 5px;
93
+ width: 100%;
94
+ }
95
+ .missing-if-branch {
96
+ display: inline-block;
97
+ margin-right: 5px;
98
+ border-radius: 3px;
99
+ position: relative;
100
+ padding: 0 4px;
101
+ background: #333;
102
+ color: yellow;
103
+ }
104
+
105
+ .skip-if-branch {
106
+ display: none;
107
+ margin-right: 10px;
108
+ position: relative;
109
+ padding: 0 4px;
110
+ background: #ccc;
111
+ color: white;
112
+ }
113
+ .missing-if-branch .typ, .skip-if-branch .typ {
114
+ color: inherit !important;
115
+ }
116
+ .coverage-summary {
117
+ border-collapse: collapse;
118
+ width: 100%;
119
+ }
120
+ .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
+ .keyline-all { border: 1px solid #ddd; }
122
+ .coverage-summary td, .coverage-summary th { padding: 10px; }
123
+ .coverage-summary tbody { border: 1px solid #bbb; }
124
+ .coverage-summary td { border-right: 1px solid #bbb; }
125
+ .coverage-summary td:last-child { border-right: none; }
126
+ .coverage-summary th {
127
+ text-align: left;
128
+ font-weight: normal;
129
+ white-space: nowrap;
130
+ }
131
+ .coverage-summary th.file { border-right: none !important; }
132
+ .coverage-summary th.pct { }
133
+ .coverage-summary th.pic,
134
+ .coverage-summary th.abs,
135
+ .coverage-summary td.pct,
136
+ .coverage-summary td.abs { text-align: right; }
137
+ .coverage-summary td.file { white-space: nowrap; }
138
+ .coverage-summary td.pic { min-width: 120px !important; }
139
+ .coverage-summary tfoot td { }
140
+
141
+ .coverage-summary .sorter {
142
+ height: 10px;
143
+ width: 7px;
144
+ display: inline-block;
145
+ margin-left: 0.5em;
146
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
+ }
148
+ .coverage-summary .sorted .sorter {
149
+ background-position: 0 -20px;
150
+ }
151
+ .coverage-summary .sorted-desc .sorter {
152
+ background-position: 0 -10px;
153
+ }
154
+ .status-line { height: 10px; }
155
+ /* yellow */
156
+ .cbranch-no { background: yellow !important; color: #111; }
157
+ /* dark red */
158
+ .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
+ .low .chart { border:1px solid #C21F39 }
160
+ .highlighted,
161
+ .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
+ background: #C21F39 !important;
163
+ }
164
+ /* medium red */
165
+ .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
+ /* light red */
167
+ .low, .cline-no { background:#FCE1E5 }
168
+ /* light green */
169
+ .high, .cline-yes { background:rgb(230,245,208) }
170
+ /* medium green */
171
+ .cstat-yes { background:rgb(161,215,106) }
172
+ /* dark green */
173
+ .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
+ .high .chart { border:1px solid rgb(77,146,33) }
175
+ /* dark yellow (gold) */
176
+ .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
+ .medium .chart { border:1px solid #f9cd0b; }
178
+ /* light yellow */
179
+ .medium { background: #fff4c2; }
180
+
181
+ .cstat-skip { background: #ddd; color: #111; }
182
+ .fstat-skip { background: #ddd; color: #111 !important; }
183
+ .cbranch-skip { background: #ddd !important; color: #111; }
184
+
185
+ span.cline-neutral { background: #eaeaea; }
186
+
187
+ .coverage-summary td.empty {
188
+ opacity: .5;
189
+ padding-top: 4px;
190
+ padding-bottom: 4px;
191
+ line-height: 1;
192
+ color: #888;
193
+ }
194
+
195
+ .cover-fill, .cover-empty {
196
+ display:inline-block;
197
+ height: 12px;
198
+ }
199
+ .chart {
200
+ line-height: 0;
201
+ }
202
+ .cover-empty {
203
+ background: white;
204
+ }
205
+ .cover-full {
206
+ border-right: none !important;
207
+ }
208
+ pre.prettyprint {
209
+ border: none !important;
210
+ padding: 0 !important;
211
+ margin: 0 !important;
212
+ }
213
+ .com { color: #999 !important; }
214
+ .ignore-none { color: #999; font-weight: normal; }
215
+
216
+ .wrapper {
217
+ min-height: 100%;
218
+ height: auto !important;
219
+ height: 100%;
220
+ margin: 0 auto -48px;
221
+ }
222
+ .footer, .push {
223
+ height: 48px;
224
+ }
@@ -0,0 +1,87 @@
1
+ /* eslint-disable */
2
+ var jumpToCode = (function init() {
3
+ // Classes of code we would like to highlight in the file view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
+
6
+ // Elements to highlight in the file listing view
7
+ var fileListingElements = ['td.pct.low'];
8
+
9
+ // We don't want to select elements that are direct descendants of another match
10
+ var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
+
12
+ // Selecter that finds elements on the page to which we can jump
13
+ var selector =
14
+ fileListingElements.join(', ') +
15
+ ', ' +
16
+ notSelector +
17
+ missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
+
19
+ // The NodeList of matching elements
20
+ var missingCoverageElements = document.querySelectorAll(selector);
21
+
22
+ var currentIndex;
23
+
24
+ function toggleClass(index) {
25
+ missingCoverageElements
26
+ .item(currentIndex)
27
+ .classList.remove('highlighted');
28
+ missingCoverageElements.item(index).classList.add('highlighted');
29
+ }
30
+
31
+ function makeCurrent(index) {
32
+ toggleClass(index);
33
+ currentIndex = index;
34
+ missingCoverageElements.item(index).scrollIntoView({
35
+ behavior: 'smooth',
36
+ block: 'center',
37
+ inline: 'center'
38
+ });
39
+ }
40
+
41
+ function goToPrevious() {
42
+ var nextIndex = 0;
43
+ if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
+ nextIndex = missingCoverageElements.length - 1;
45
+ } else if (missingCoverageElements.length > 1) {
46
+ nextIndex = currentIndex - 1;
47
+ }
48
+
49
+ makeCurrent(nextIndex);
50
+ }
51
+
52
+ function goToNext() {
53
+ var nextIndex = 0;
54
+
55
+ if (
56
+ typeof currentIndex === 'number' &&
57
+ currentIndex < missingCoverageElements.length - 1
58
+ ) {
59
+ nextIndex = currentIndex + 1;
60
+ }
61
+
62
+ makeCurrent(nextIndex);
63
+ }
64
+
65
+ return function jump(event) {
66
+ if (
67
+ document.getElementById('fileSearch') === document.activeElement &&
68
+ document.activeElement != null
69
+ ) {
70
+ // if we're currently focused on the search input, we don't want to navigate
71
+ return;
72
+ }
73
+
74
+ switch (event.which) {
75
+ case 78: // n
76
+ case 74: // j
77
+ goToNext();
78
+ break;
79
+ case 66: // b
80
+ case 75: // k
81
+ case 80: // p
82
+ goToPrevious();
83
+ break;
84
+ }
85
+ };
86
+ })();
87
+ window.addEventListener('keydown', jumpToCode);