ivue 1.5.0 → 1.5.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.
Files changed (54) hide show
  1. package/.eslintrc.js +1 -1
  2. package/demo/App.vue +6 -124
  3. package/demo/main.ts +0 -3
  4. package/demo/vite.config.ts +1 -9
  5. package/docs/.eslintrc.js +1 -1
  6. package/docs/docs/.vitepress/dist/404.html +2 -2
  7. package/docs/docs/.vitepress/dist/api/ivue.html +3 -3
  8. package/docs/docs/.vitepress/dist/api/propsWithDefaults.html +3 -3
  9. package/docs/docs/.vitepress/dist/assets/{app.C_6IW306.js → app.BEuVrZlt.js} +1 -1
  10. package/docs/docs/.vitepress/dist/assets/chunks/{@localSearchIndexroot.Cfu1MyIk.js → @localSearchIndexroot.BuKNEz2z.js} +1 -1
  11. package/docs/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.BEJZ5WJL.js → VPLocalSearchBox.CrwYL8pk.js} +1 -1
  12. package/docs/docs/.vitepress/dist/assets/chunks/index.es.DRFH_cBG.js +1 -0
  13. package/docs/docs/.vitepress/dist/assets/chunks/{theme.COJ5Yu8m.js → theme.CvibXqSO.js} +2 -2
  14. package/docs/docs/.vitepress/dist/assets/{index.md.D-9TpgnJ.js → index.md.mLYKdUe1.js} +1 -1
  15. package/docs/docs/.vitepress/dist/assets/{index.md.D-9TpgnJ.lean.js → index.md.mLYKdUe1.lean.js} +1 -1
  16. package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BS0BRUx_.js → pages_browse-code.md.DtJJKz-E.js} +1 -1
  17. package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.BbVqm1ey.js → pages_getting-started.md.BEgX6PyX.js} +2 -2
  18. package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.fL8xf0Gx.js → pages_guidelines.md.D5gNjB3w.js} +3 -3
  19. package/docs/docs/.vitepress/dist/assets/{pages_guidelines.md.fL8xf0Gx.lean.js → pages_guidelines.md.D5gNjB3w.lean.js} +3 -3
  20. package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.CP31gYQw.js → pages_how-it-works.md.YjizQt3g.js} +2 -2
  21. package/docs/docs/.vitepress/dist/assets/{pages_how-it-works.md.CP31gYQw.lean.js → pages_how-it-works.md.YjizQt3g.lean.js} +2 -2
  22. package/docs/docs/.vitepress/dist/assets/{pages_usage.md.5C8BnzAi.js → pages_usage.md.BlTPXw5A.js} +17 -17
  23. package/docs/docs/.vitepress/dist/assets/{pages_usage.md.5C8BnzAi.lean.js → pages_usage.md.BlTPXw5A.lean.js} +17 -17
  24. package/docs/docs/.vitepress/dist/hashmap.json +1 -1
  25. package/docs/docs/.vitepress/dist/index.html +5 -5
  26. package/docs/docs/.vitepress/dist/pages/advanced-usage.html +3 -3
  27. package/docs/docs/.vitepress/dist/pages/api.html +3 -3
  28. package/docs/docs/.vitepress/dist/pages/browse-code.html +5 -5
  29. package/docs/docs/.vitepress/dist/pages/getting-started.html +6 -6
  30. package/docs/docs/.vitepress/dist/pages/guidelines.html +6 -6
  31. package/docs/docs/.vitepress/dist/pages/how-it-works.html +6 -6
  32. package/docs/docs/.vitepress/dist/pages/how-its-made.html +3 -3
  33. package/docs/docs/.vitepress/dist/pages/introduction.html +3 -3
  34. package/docs/docs/.vitepress/dist/pages/usage.html +21 -21
  35. package/docs/docs/components/Component.vue +1 -1
  36. package/docs/docs/index.md +1 -1
  37. package/docs/docs/pages/browse-code.md +2 -2
  38. package/docs/docs/pages/getting-started.md +2 -2
  39. package/docs/docs/pages/how-it-works.md +2 -2
  40. package/docs/package.json +1 -1
  41. package/{src → lib}/__tests__/ivue.vitest.spec.ts +6 -6
  42. package/package.json +4 -4
  43. package/tsconfig.json +2 -1
  44. package/vite.config.ts +1 -10
  45. package/vitest.config.ts +1 -1
  46. package/dist/docs/vite-env.d.ts +0 -7
  47. package/dist/vite-env.d.ts +0 -7
  48. package/docs/docs/.vitepress/dist/assets/chunks/index.es.B1_StH0Z.js +0 -1
  49. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  50. /package/dist/{src/ivue.d.ts → ivue.d.ts} +0 -0
  51. /package/docs/docs/.vitepress/dist/assets/{pages_browse-code.md.BS0BRUx_.lean.js → pages_browse-code.md.DtJJKz-E.lean.js} +0 -0
  52. /package/docs/docs/.vitepress/dist/assets/{pages_getting-started.md.BbVqm1ey.lean.js → pages_getting-started.md.BEgX6PyX.lean.js} +0 -0
  53. /package/{src → lib}/index.ts +0 -0
  54. /package/{src → lib}/ivue.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { ivue } from "../../../src/ivue";
2
+ import { ivue } from "../../../lib/ivue";
3
3
  import { VueDd } from "vue-dd";
4
4
  import { ref } from 'vue';
5
5
 
@@ -17,7 +17,7 @@ import Button from './components/Button.vue'
17
17
  ∞&nbsp; Flexible like Composition API<br />
18
18
  ∞&nbsp; Extensible like TypeScript Class API<br />
19
19
  ∞&nbsp; Robust, Minimal, Opaque & Unobtrusive<br />
20
- ∞&nbsp; 100% VSCode / Intellij IDE Autocomplete Intellisence<br />
20
+ ∞&nbsp; 100% VSCode / Intellij IDE Autocomplete Intellisense<br />
21
21
  ∞&nbsp; 100% Vue 3 Compatible<br />
22
22
  ∞&nbsp; 100% Test Covered<br />
23
23
  ∞&nbsp; 100% Type Safe<br />
@@ -2,7 +2,7 @@
2
2
  aside: false
3
3
  ---
4
4
  # Source code
5
- Or [Browse the source code on GitHub](https://github.com/infinite-system/ivue/blob/main/src/ivue.ts)
5
+ Or [Browse the source code on GitHub](https://github.com/infinite-system/ivue/blob/main/lib/ivue.ts)
6
6
 
7
7
  ## Install by Copying
8
8
 
@@ -14,5 +14,5 @@ This installation path is recommended only if you quickly want to tinker with th
14
14
  :::
15
15
 
16
16
  :::code-group
17
- <<< ../../../src/ivue.ts{ts:line-numbers} [ivue.ts]
17
+ <<< ../../../lib/ivue.ts{ts:line-numbers} [ivue.ts]
18
18
  :::
@@ -23,9 +23,9 @@ pnpm i ivue
23
23
  :::details Click to expand the latest `ivue` source code to copy
24
24
 
25
25
  :::code-group
26
- <<< ../../../src/ivue.ts{ts:line-numbers} [ivue.ts]
26
+ <<< ../../../lib/ivue.ts{ts:line-numbers} [ivue.ts]
27
27
  :::
28
- Or [Copy from GitHub](https://github.com/infinite-system/ivue/blob/main/src/ivue.ts)
28
+ Or [Copy from GitHub](https://github.com/infinite-system/ivue/blob/main/lib/ivue.ts)
29
29
 
30
30
  ::: tip NOTE
31
31
  This installation path is recommended only if you quickly want to tinker with the internals of ivue, as you won't be getting the latest updates. Also note that this code comes from github `main` branch latest which might also be in beta and not fully published to `npm`.
@@ -40,9 +40,9 @@ Utility Types help to achieve the rest of `ivue` capabilities
40
40
 
41
41
  :::details Click to see the whole latest `ivue` source code from github main branch below:
42
42
  :::code-group
43
- <<< ../../../src/ivue.ts{ts:line-numbers} [ivue.ts]
43
+ <<< ../../../lib/ivue.ts{ts:line-numbers} [ivue.ts]
44
44
  :::
45
- Or [See on GitHub](https://github.com/infinite-system/ivue/blob/main/src/ivue.ts)
45
+ Or [See on GitHub](https://github.com/infinite-system/ivue/blob/main/lib/ivue.ts)
46
46
 
47
47
  ## 100% Vue 3 Compatible
48
48
 
package/docs/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "eslint-plugin-import": "^2.29.1",
19
19
  "eslint-plugin-vue": "^9.14.1",
20
20
  "execa": "^8.0.0",
21
- "ivue": "^1.2.4",
21
+ "ivue": "^1.5.1",
22
22
  "typescript": "^4.5.4",
23
23
  "vite-plugin-dynamic-import": "^1.5.0",
24
24
  "vite-tsconfig-paths": "^4.3.2",
@@ -25,19 +25,19 @@ class Bit {
25
25
  }
26
26
 
27
27
  class Item extends Bit {
28
- _width = iref(5);
28
+ _width = iref(5) as unknown as string | number;
29
29
  unit = iref('px');
30
30
  get width(): string {
31
31
  return this._width + this.unit;
32
32
  }
33
- set width(value: number) {
33
+ set width(value: number | string) {
34
34
  this._width = value;
35
35
  }
36
- _height = iref(5);
36
+ _height = iref(5) as unknown as string | number;
37
37
  get height(): string {
38
38
  return this._height + this.unit;
39
39
  }
40
- set height(value: number) {
40
+ set height(value: number | string) {
41
41
  this._height = value;
42
42
  }
43
43
  }
@@ -83,7 +83,7 @@ class RetailStoreItem extends StoreItem {
83
83
  return this._testProperty;
84
84
  }
85
85
  calculateSize() {
86
- return this._height + this._width;
86
+ return (this._height as number) + (this._width as number);
87
87
  }
88
88
  }
89
89
 
@@ -433,7 +433,7 @@ describe('ivue', () => {
433
433
  });
434
434
  });
435
435
  describe('core functions', () => {
436
- let useComposable = () => {
436
+ const useComposable = () => {
437
437
  return {
438
438
  x: ref(0),
439
439
  y: ref(0)
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "ivue",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Infinite Vue – Class Based Architecture for Vue 3",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "require": "./dist/index.umd.js",
9
9
  "import": "./dist/index.es.js",
10
- "types": "./dist/src/index.d.ts"
10
+ "types": "./dist/index.d.ts"
11
11
  }
12
12
  },
13
13
  "main": "./dist/index.umd.js",
14
14
  "module": "./dist/index.es.js",
15
- "types": "./dist/src/index.d.ts",
15
+ "types": "./dist/index.d.ts",
16
16
  "scripts": {
17
17
  "dev": "vite dev --host",
18
18
  "test": "vitest --coverage.enabled=true --reporter=verbose --ui",
19
19
  "coverage": "vitest run --coverage",
20
20
  "cypress": "cypress run --component",
21
21
  "cypress:headed": "cypress run --component --browser chrome --headed --no-exit",
22
- "build": "vite build",
22
+ "build": "tsc --p ./tsconfig.json && vite build",
23
23
  "release": "yarn build && yarn publish"
24
24
  },
25
25
  "peerDependencies": {
package/tsconfig.json CHANGED
@@ -17,8 +17,9 @@
17
17
  "forceConsistentCasingInFileNames": true,
18
18
  "types": ["vitest/globals"],
19
19
  "paths": {
20
- "@/*": ["src/*"]
20
+ "@/*": ["lib/*"]
21
21
  }
22
22
  },
23
+ "include": ["lib"],
23
24
  "exclude": ["dist", "node_modules"]
24
25
  }
package/vite.config.ts CHANGED
@@ -7,14 +7,6 @@ import pkg from "./package.json";
7
7
  import libCss from 'vite-plugin-libcss';
8
8
  import { terser } from 'rollup-plugin-terser';
9
9
 
10
- export const vueDocsPlugin = () => ({
11
- name: "vue-docs",
12
- transform (code: any, id: any) {
13
- if (!/vue&type=docs/.test(id)) return;
14
- return `export default ''`;
15
- }
16
- });
17
-
18
10
  // https://vitejs.dev/config/
19
11
  export default defineConfig({
20
12
  resolve: {
@@ -32,13 +24,12 @@ export default defineConfig({
32
24
  dts({
33
25
  cleanVueFileName: true,
34
26
  }),
35
- vueDocsPlugin(),
36
27
  libCss()
37
28
  ],
38
29
  build: {
39
30
  cssCodeSplit: true,
40
31
  lib: {
41
- entry: "./src/index.ts",
32
+ entry: "./lib/index.ts",
42
33
  formats: ["es", "umd"],
43
34
  // the name expose in umd mode
44
35
  name: pkg.name,
package/vitest.config.ts CHANGED
@@ -12,7 +12,7 @@ export default mergeConfig(
12
12
  root: fileURLToPath(new URL("./", import.meta.url)),
13
13
  reporters: ["default", "html", "verbose"],
14
14
  coverage: {
15
- include: ['src/**']
15
+ include: ['lib/**']
16
16
  }
17
17
  },
18
18
  })
@@ -1,7 +0,0 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module "*" {
4
- import type { DefineComponent } from 'vue'
5
- const component: DefineComponent<{}, {}, any>
6
- export default component
7
- }
@@ -1,7 +0,0 @@
1
- /// <reference types="vite/client" />
2
-
3
- declare module "*" {
4
- import type { DefineComponent } from 'vue'
5
- const component: DefineComponent<{}, {}, any>
6
- export default component
7
- }
@@ -1 +0,0 @@
1
- import{a8 as m,h as b,a9 as P,s as E}from"./framework.CvEKxEoK.js";const v=new Map;function M(t){if(v.has(t))return v.get(t);const o=new Map;let l=t.prototype;for(;l.constructor!==Object;)Object.entries(Object.getOwnPropertyDescriptors(l)).forEach(([f,i])=>{const r=o.get(f);r!==i&&(i!=null&&i.get||i!=null&&i.set)&&(r!=null&&r.get&&(i.get=r==null?void 0:r.get),r!=null&&r.set&&(i.set=r==null?void 0:r.set),o.set(f,i))}),l=Object.getPrototypeOf(l);return v.set(t,o),o}function R(t,...o){var l,f;const i=M(t),r=i!=null&&i.size?{}:null,u=m(new t(...o));for(const[n,a]of i)((l=t==null?void 0:t.ivue)==null?void 0:l[n])!==!1&&Object.defineProperty(u,n,{get:a.get?()=>{var s,g;return n in r?r[n]:r[n]=b({get:(s=a.get)==null?void 0:s.bind(u),set:(g=a.set)==null?void 0:g.bind(u)})}:void 0,set:(f=a.set)==null?void 0:f.bind(u),enumerable:!1});return Object.defineProperty(u,"toRefs",{get:()=>function(n,a,s){return function(g,z){var O,w;const d={};if(Array.isArray(g))for(let p=0;p<g.length;p++){const e=g[p];if(a.has(e))if(e in s)d[e]=s[e];else{const c=a.get(e);d[e]=s[e]=b({get:(O=c==null?void 0:c.get)==null?void 0:O.bind(n),set:(w=c==null?void 0:c.set)==null?void 0:w.bind(n)})}else typeof n[e]=="function"?d[e]=n[e].bind(n):d[e]=P(n,e)}else{let p=new Set(D(n));a.forEach((e,c)=>{var h,j;d[c]=c in s?s[c]:s[c]=b({get:(h=e.get)==null?void 0:h.bind(n),set:(j=e.set)==null?void 0:j.bind(n)}),p==null||p.delete(c)}),p.forEach(e=>{typeof n[e]=="function"?d[e]=n[e].bind(n):d[e]=P(n,e)}),p=null}return d}}(u,i,r),enumerable:!1}),"init"in u&&u.init(),u}const y=new Map;function D(t){if(y.has(t.constructor))return y.get(t.constructor);const o=t.constructor,l=new Set;do Object.getOwnPropertyNames(t).forEach(f=>{["caller","callee","arguments","constructor"].includes(f)||l.add(f)}),t=Object.getPrototypeOf(t);while(t.constructor!==Object);return y.set(o,l),l}const S=E;function C(t,...o){return typeof t=="function"?x(t)?R(t,...o).toRefs(!0):t(...o):t}function x(t){var o;return typeof t=="function"&&!!t.prototype&&!((o=Object.getOwnPropertyDescriptor(t,"prototype"))!=null&&o.writable)}export{R as E,S as x,C as z};
File without changes
File without changes
File without changes
File without changes