purity-world 1.0.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.
Files changed (134) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/cursors/alias.svg +17 -0
  4. package/cursors/all-scroll.svg +12 -0
  5. package/cursors/bottom_left_corner.svg +16 -0
  6. package/cursors/bottom_right_corner.svg +16 -0
  7. package/cursors/bottom_side.svg +18 -0
  8. package/cursors/cell.svg +9 -0
  9. package/cursors/center_ptr.svg +9 -0
  10. package/cursors/col-resize.svg +9 -0
  11. package/cursors/color-picker.svg +10 -0
  12. package/cursors/context-menu.svg +10 -0
  13. package/cursors/copy.svg +17 -0
  14. package/cursors/crosshair.svg +20 -0
  15. package/cursors/default.svg +9 -0
  16. package/cursors/dnd-move.svg +9 -0
  17. package/cursors/dnd-no-drop.svg +16 -0
  18. package/cursors/down-arrow.svg +9 -0
  19. package/cursors/draft.svg +9 -0
  20. package/cursors/fleur.svg +10 -0
  21. package/cursors/help.svg +20 -0
  22. package/cursors/left-arrow.svg +9 -0
  23. package/cursors/left_side.svg +18 -0
  24. package/cursors/no-drop.svg +16 -0
  25. package/cursors/not-allowed.svg +9 -0
  26. package/cursors/openhand.svg +9 -0
  27. package/cursors/pencil.svg +9 -0
  28. package/cursors/pirate.svg +9 -0
  29. package/cursors/pointer.svg +9 -0
  30. package/cursors/progress-01.svg +15 -0
  31. package/cursors/progress-02.svg +15 -0
  32. package/cursors/progress-03.svg +15 -0
  33. package/cursors/progress-04.svg +15 -0
  34. package/cursors/progress-05.svg +15 -0
  35. package/cursors/progress-06.svg +15 -0
  36. package/cursors/progress-07.svg +15 -0
  37. package/cursors/progress-08.svg +15 -0
  38. package/cursors/progress-09.svg +15 -0
  39. package/cursors/progress-10.svg +15 -0
  40. package/cursors/progress-11.svg +15 -0
  41. package/cursors/progress-12.svg +15 -0
  42. package/cursors/progress-13.svg +15 -0
  43. package/cursors/progress-14.svg +15 -0
  44. package/cursors/progress-15.svg +15 -0
  45. package/cursors/progress-16.svg +15 -0
  46. package/cursors/progress-17.svg +15 -0
  47. package/cursors/progress-18.svg +15 -0
  48. package/cursors/progress-19.svg +15 -0
  49. package/cursors/progress-20.svg +15 -0
  50. package/cursors/progress-21.svg +15 -0
  51. package/cursors/progress-22.svg +15 -0
  52. package/cursors/progress-23.svg +15 -0
  53. package/cursors/right-arrow.svg +9 -0
  54. package/cursors/right_ptr.svg +9 -0
  55. package/cursors/right_side.svg +18 -0
  56. package/cursors/row-resize.svg +9 -0
  57. package/cursors/size_bdiag.svg +10 -0
  58. package/cursors/size_fdiag.svg +10 -0
  59. package/cursors/size_hor.svg +10 -0
  60. package/cursors/size_ver.svg +12 -0
  61. package/cursors/text.svg +9 -0
  62. package/cursors/top_left_corner.svg +16 -0
  63. package/cursors/top_right_corner.svg +16 -0
  64. package/cursors/top_side.svg +18 -0
  65. package/cursors/up-arrow.svg +9 -0
  66. package/cursors/vertical-text.svg +9 -0
  67. package/cursors/wait-01.svg +14 -0
  68. package/cursors/wait-02.svg +14 -0
  69. package/cursors/wait-03.svg +14 -0
  70. package/cursors/wait-04.svg +14 -0
  71. package/cursors/wait-05.svg +14 -0
  72. package/cursors/wait-06.svg +14 -0
  73. package/cursors/wait-07.svg +14 -0
  74. package/cursors/wait-08.svg +14 -0
  75. package/cursors/wait-09.svg +14 -0
  76. package/cursors/wait-10.svg +14 -0
  77. package/cursors/wait-11.svg +14 -0
  78. package/cursors/wait-12.svg +14 -0
  79. package/cursors/wait-13.svg +14 -0
  80. package/cursors/wait-14.svg +14 -0
  81. package/cursors/wait-15.svg +14 -0
  82. package/cursors/wait-16.svg +14 -0
  83. package/cursors/wait-17.svg +14 -0
  84. package/cursors/wait-18.svg +14 -0
  85. package/cursors/wait-19.svg +14 -0
  86. package/cursors/wait-20.svg +14 -0
  87. package/cursors/wait-21.svg +14 -0
  88. package/cursors/wait-22.svg +14 -0
  89. package/cursors/wait-23.svg +14 -0
  90. package/cursors/wayland-cursor.svg +10 -0
  91. package/cursors/x-cursor.svg +11 -0
  92. package/cursors/zoom-in.svg +13 -0
  93. package/cursors/zoom-out.svg +13 -0
  94. package/index.cjs +1 -0
  95. package/index.d.ts +1 -0
  96. package/index.js +1972 -0
  97. package/package.json +60 -0
  98. package/style.css +1 -0
  99. package/styles/_base.scss +525 -0
  100. package/styles/_mixins.scss +57 -0
  101. package/styles/_theme-dark.scss +103 -0
  102. package/styles/_theme-light.scss +103 -0
  103. package/styles/_themes.scss +34 -0
  104. package/styles/_variables.scss +72 -0
  105. package/styles/index.scss +7 -0
  106. package/types/bootstrap.d.ts +42 -0
  107. package/types/bootstrap.d.ts.map +1 -0
  108. package/types/common.d.ts +9 -0
  109. package/types/common.d.ts.map +1 -0
  110. package/types/component.d.ts +57 -0
  111. package/types/component.d.ts.map +1 -0
  112. package/types/core.d.ts +46 -0
  113. package/types/core.d.ts.map +1 -0
  114. package/types/di.d.ts +53 -0
  115. package/types/di.d.ts.map +1 -0
  116. package/types/directive.d.ts +47 -0
  117. package/types/directive.d.ts.map +1 -0
  118. package/types/http.d.ts +211 -0
  119. package/types/http.d.ts.map +1 -0
  120. package/types/pipe.d.ts +34 -0
  121. package/types/pipe.d.ts.map +1 -0
  122. package/types/router.d.ts +145 -0
  123. package/types/router.d.ts.map +1 -0
  124. package/types/seo.d.ts +134 -0
  125. package/types/seo.d.ts.map +1 -0
  126. package/types/validator.d.ts +73 -0
  127. package/types/validator.d.ts.map +1 -0
  128. package/types/virtual-for.d.ts +36 -0
  129. package/types/virtual-for.d.ts.map +1 -0
  130. package/types/vite-plugin.d.ts +18 -0
  131. package/types/vite-plugin.d.ts.map +1 -0
  132. package/vite.cjs +4 -0
  133. package/vite.d.ts +1 -0
  134. package/vite.js +51 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtual-for.d.ts","sourceRoot":"","sources":["../../src/framework/virtual-for.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,UAAU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,WAAW,KAAK,OAAO,GACtE,IAAI,CA2SN"}
@@ -0,0 +1,18 @@
1
+ import type { Plugin } from 'vite';
2
+ export interface PurityPluginOptions {
3
+ /**
4
+ * Custom path mappings to resolve templateUrl aliases (e.g. { '@components/': 'src/components/' })
5
+ */
6
+ aliases?: Record<string, string>;
7
+ }
8
+ /**
9
+ * Vite plugin to transpile class decorators into standard ES expressions for browsers
10
+ * and inline HTML templates for instant synchronous rendering.
11
+ */
12
+ export declare function purityPlugin(options?: PurityPluginOptions): Plugin;
13
+ /**
14
+ * Backwards compatibility alias for decoratorsPlugin
15
+ */
16
+ export declare const decoratorsPlugin: typeof purityPlugin;
17
+ export default purityPlugin;
18
+ //# sourceMappingURL=vite-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../../src/framework/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAoHtE;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,qBAAe,CAAC;eAC9B,YAAY"}
package/vite.cjs ADDED
@@ -0,0 +1,4 @@
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("path");c=s(c,1);let l=require("fs");l=s(l,1);function u(e={}){return{name:`purity-decorators-plugin`,enforce:`pre`,transform(t,n){if(!n.endsWith(`.ts`)&&!n.endsWith(`.js`)||!t.includes(`@`))return null;let r=!1,i=[],a=[],o=0,s=[],u=t.replace(/(\/\*[\s\S]*?\*\/|\/\/[^\n\r]*|`(?:\\`|[\s\S])*?`|"(?:\\"|[^"\n\r])*"|'(?:\\'|[^'\n\r])*')/g,e=>{let t=`__PURITY_MASKED_STR_${s.length}__`;return s.push(e),t}).replace(/@Component\s*\(\s*\{([\s\S]*?)\}\s*\)\s*(?:\r?\n\s*)?(export\s+class|class)\s+([a-zA-Z0-9_$]+)/g,(t,r,i,u)=>{let d=r.replace(/__PURITY_MASKED_STR_(\d+)__/g,(e,t)=>s[Number(t)]).match(/templateUrl\s*:\s*['"]([^'"]+)['"]/);if(d){let t=d[1],s=c.default.dirname(n),f=t.startsWith(`./src/`)?c.default.resolve(process.cwd(),t):c.default.resolve(s,t);if(!l.default.existsSync(f)&&t.startsWith(`@`)){let n=!1;if(e.aliases){for(let[r,i]of Object.entries(e.aliases))if(t.startsWith(r)){f=c.default.resolve(process.cwd(),t.replace(r,i)),n=!0;break}}if(!n){let e=t.replace(/^@pages\//,`src/app/pages/`).replace(/^@components\//,`src/app/shared/components/`).replace(/^@widgets\//,`src/app/shared/widgets/`).replace(/^@app\//,`src/app/`);f=c.default.resolve(process.cwd(),e)}}if(l.default.existsSync(f)){let e=c.default.relative(s,f);e.startsWith(`.`)||(e=`./`+e);let n=`__purity_tpl_`+o++;return a.push(`import ${n} from '${e}?raw';`),`@Component({${r.replace(/templateUrl\s*:\s*__PURITY_MASKED_STR_\d+__/,`templateUrl: '${t}', template: ${n}`)}})\n${i} ${u}`}}return t}).replace(/(?:@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?export\s+class\s+([a-zA-Z0-9_$]+)|export\s+@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?class\s+([a-zA-Z0-9_$]+)|@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?class\s+([a-zA-Z0-9_$]+))/g,(e,t,n,a,o,s,c)=>{let l=t||a||s,u=n||o||c,d=e.includes(`export`),f=l.endsWith(`)`)?l:`${l}()`;return i.push(`${f}(${u});`),r=!0,`${d?`export `:``}class ${u}`});return!r&&a.length===0?null:{code:`${a.length>0?a.join(`
2
+ `)+`
3
+ `:``}${u}\n${i.join(`
4
+ `)}\n`.replace(/__PURITY_MASKED_STR_(\d+)__/g,(e,t)=>s[Number(t)]),map:null}}}}var d=u;exports.decoratorsPlugin=d,exports.default=u,exports.purityPlugin=u;
package/vite.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './types/vite-plugin';
package/vite.js ADDED
@@ -0,0 +1,51 @@
1
+ import e from "path";
2
+ import t from "fs";
3
+ //#region src/framework/vite-plugin.ts
4
+ function n(n = {}) {
5
+ return {
6
+ name: "purity-decorators-plugin",
7
+ enforce: "pre",
8
+ transform(r, i) {
9
+ if (!i.endsWith(".ts") && !i.endsWith(".js") || !r.includes("@")) return null;
10
+ let a = !1, o = [], s = [], c = 0, l = [], u = r.replace(/(\/\*[\s\S]*?\*\/|\/\/[^\n\r]*|`(?:\\`|[\s\S])*?`|"(?:\\"|[^"\n\r])*"|'(?:\\'|[^'\n\r])*')/g, (e) => {
11
+ let t = `__PURITY_MASKED_STR_${l.length}__`;
12
+ return l.push(e), t;
13
+ }).replace(/@Component\s*\(\s*\{([\s\S]*?)\}\s*\)\s*(?:\r?\n\s*)?(export\s+class|class)\s+([a-zA-Z0-9_$]+)/g, (r, a, o, u) => {
14
+ let d = a.replace(/__PURITY_MASKED_STR_(\d+)__/g, (e, t) => l[Number(t)]).match(/templateUrl\s*:\s*['"]([^'"]+)['"]/);
15
+ if (d) {
16
+ let r = d[1], l = e.dirname(i), f = r.startsWith("./src/") ? e.resolve(process.cwd(), r) : e.resolve(l, r);
17
+ if (!t.existsSync(f) && r.startsWith("@")) {
18
+ let t = !1;
19
+ if (n.aliases) {
20
+ for (let [i, a] of Object.entries(n.aliases)) if (r.startsWith(i)) {
21
+ f = e.resolve(process.cwd(), r.replace(i, a)), t = !0;
22
+ break;
23
+ }
24
+ }
25
+ if (!t) {
26
+ let t = r.replace(/^@pages\//, "src/app/pages/").replace(/^@components\//, "src/app/shared/components/").replace(/^@widgets\//, "src/app/shared/widgets/").replace(/^@app\//, "src/app/");
27
+ f = e.resolve(process.cwd(), t);
28
+ }
29
+ }
30
+ if (t.existsSync(f)) {
31
+ let t = e.relative(l, f);
32
+ t.startsWith(".") || (t = "./" + t);
33
+ let n = "__purity_tpl_" + c++;
34
+ return s.push(`import ${n} from '${t}?raw';`), `@Component({${a.replace(/templateUrl\s*:\s*__PURITY_MASKED_STR_\d+__/, `templateUrl: '${r}', template: ${n}`)}})\n${o} ${u}`;
35
+ }
36
+ }
37
+ return r;
38
+ }).replace(/(?:@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?export\s+class\s+([a-zA-Z0-9_$]+)|export\s+@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?class\s+([a-zA-Z0-9_$]+)|@([a-zA-Z0-9_$]+(?:\([^)]*\))?)\s*(?:\r?\n\s*)?class\s+([a-zA-Z0-9_$]+))/g, (e, t, n, r, i, s, c) => {
39
+ let l = t || r || s, u = n || i || c, d = e.includes("export"), f = l.endsWith(")") ? l : `${l}()`;
40
+ return o.push(`${f}(${u});`), a = !0, `${d ? "export " : ""}class ${u}`;
41
+ });
42
+ return !a && s.length === 0 ? null : {
43
+ code: `${s.length > 0 ? s.join("\n") + "\n" : ""}${u}\n${o.join("\n")}\n`.replace(/__PURITY_MASKED_STR_(\d+)__/g, (e, t) => l[Number(t)]),
44
+ map: null
45
+ };
46
+ }
47
+ };
48
+ }
49
+ var r = n;
50
+ //#endregion
51
+ export { r as decoratorsPlugin, n as default, n as purityPlugin };