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.
- package/LICENSE +21 -0
- package/README.md +89 -0
- package/cursors/alias.svg +17 -0
- package/cursors/all-scroll.svg +12 -0
- package/cursors/bottom_left_corner.svg +16 -0
- package/cursors/bottom_right_corner.svg +16 -0
- package/cursors/bottom_side.svg +18 -0
- package/cursors/cell.svg +9 -0
- package/cursors/center_ptr.svg +9 -0
- package/cursors/col-resize.svg +9 -0
- package/cursors/color-picker.svg +10 -0
- package/cursors/context-menu.svg +10 -0
- package/cursors/copy.svg +17 -0
- package/cursors/crosshair.svg +20 -0
- package/cursors/default.svg +9 -0
- package/cursors/dnd-move.svg +9 -0
- package/cursors/dnd-no-drop.svg +16 -0
- package/cursors/down-arrow.svg +9 -0
- package/cursors/draft.svg +9 -0
- package/cursors/fleur.svg +10 -0
- package/cursors/help.svg +20 -0
- package/cursors/left-arrow.svg +9 -0
- package/cursors/left_side.svg +18 -0
- package/cursors/no-drop.svg +16 -0
- package/cursors/not-allowed.svg +9 -0
- package/cursors/openhand.svg +9 -0
- package/cursors/pencil.svg +9 -0
- package/cursors/pirate.svg +9 -0
- package/cursors/pointer.svg +9 -0
- package/cursors/progress-01.svg +15 -0
- package/cursors/progress-02.svg +15 -0
- package/cursors/progress-03.svg +15 -0
- package/cursors/progress-04.svg +15 -0
- package/cursors/progress-05.svg +15 -0
- package/cursors/progress-06.svg +15 -0
- package/cursors/progress-07.svg +15 -0
- package/cursors/progress-08.svg +15 -0
- package/cursors/progress-09.svg +15 -0
- package/cursors/progress-10.svg +15 -0
- package/cursors/progress-11.svg +15 -0
- package/cursors/progress-12.svg +15 -0
- package/cursors/progress-13.svg +15 -0
- package/cursors/progress-14.svg +15 -0
- package/cursors/progress-15.svg +15 -0
- package/cursors/progress-16.svg +15 -0
- package/cursors/progress-17.svg +15 -0
- package/cursors/progress-18.svg +15 -0
- package/cursors/progress-19.svg +15 -0
- package/cursors/progress-20.svg +15 -0
- package/cursors/progress-21.svg +15 -0
- package/cursors/progress-22.svg +15 -0
- package/cursors/progress-23.svg +15 -0
- package/cursors/right-arrow.svg +9 -0
- package/cursors/right_ptr.svg +9 -0
- package/cursors/right_side.svg +18 -0
- package/cursors/row-resize.svg +9 -0
- package/cursors/size_bdiag.svg +10 -0
- package/cursors/size_fdiag.svg +10 -0
- package/cursors/size_hor.svg +10 -0
- package/cursors/size_ver.svg +12 -0
- package/cursors/text.svg +9 -0
- package/cursors/top_left_corner.svg +16 -0
- package/cursors/top_right_corner.svg +16 -0
- package/cursors/top_side.svg +18 -0
- package/cursors/up-arrow.svg +9 -0
- package/cursors/vertical-text.svg +9 -0
- package/cursors/wait-01.svg +14 -0
- package/cursors/wait-02.svg +14 -0
- package/cursors/wait-03.svg +14 -0
- package/cursors/wait-04.svg +14 -0
- package/cursors/wait-05.svg +14 -0
- package/cursors/wait-06.svg +14 -0
- package/cursors/wait-07.svg +14 -0
- package/cursors/wait-08.svg +14 -0
- package/cursors/wait-09.svg +14 -0
- package/cursors/wait-10.svg +14 -0
- package/cursors/wait-11.svg +14 -0
- package/cursors/wait-12.svg +14 -0
- package/cursors/wait-13.svg +14 -0
- package/cursors/wait-14.svg +14 -0
- package/cursors/wait-15.svg +14 -0
- package/cursors/wait-16.svg +14 -0
- package/cursors/wait-17.svg +14 -0
- package/cursors/wait-18.svg +14 -0
- package/cursors/wait-19.svg +14 -0
- package/cursors/wait-20.svg +14 -0
- package/cursors/wait-21.svg +14 -0
- package/cursors/wait-22.svg +14 -0
- package/cursors/wait-23.svg +14 -0
- package/cursors/wayland-cursor.svg +10 -0
- package/cursors/x-cursor.svg +11 -0
- package/cursors/zoom-in.svg +13 -0
- package/cursors/zoom-out.svg +13 -0
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/index.js +1972 -0
- package/package.json +60 -0
- package/style.css +1 -0
- package/styles/_base.scss +525 -0
- package/styles/_mixins.scss +57 -0
- package/styles/_theme-dark.scss +103 -0
- package/styles/_theme-light.scss +103 -0
- package/styles/_themes.scss +34 -0
- package/styles/_variables.scss +72 -0
- package/styles/index.scss +7 -0
- package/types/bootstrap.d.ts +42 -0
- package/types/bootstrap.d.ts.map +1 -0
- package/types/common.d.ts +9 -0
- package/types/common.d.ts.map +1 -0
- package/types/component.d.ts +57 -0
- package/types/component.d.ts.map +1 -0
- package/types/core.d.ts +46 -0
- package/types/core.d.ts.map +1 -0
- package/types/di.d.ts +53 -0
- package/types/di.d.ts.map +1 -0
- package/types/directive.d.ts +47 -0
- package/types/directive.d.ts.map +1 -0
- package/types/http.d.ts +211 -0
- package/types/http.d.ts.map +1 -0
- package/types/pipe.d.ts +34 -0
- package/types/pipe.d.ts.map +1 -0
- package/types/router.d.ts +145 -0
- package/types/router.d.ts.map +1 -0
- package/types/seo.d.ts +134 -0
- package/types/seo.d.ts.map +1 -0
- package/types/validator.d.ts +73 -0
- package/types/validator.d.ts.map +1 -0
- package/types/virtual-for.d.ts +36 -0
- package/types/virtual-for.d.ts.map +1 -0
- package/types/vite-plugin.d.ts +18 -0
- package/types/vite-plugin.d.ts.map +1 -0
- package/vite.cjs +4 -0
- package/vite.d.ts +1 -0
- 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,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CAC5C;AAED,MAAM,WAAW,oBAAoB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAYD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAMjE;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAM5D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,iBAAiB,CAAC;CAC9B,CAgDA;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,GAAG,EACZ,iBAAiB,EAAE,GAAG,EACtB,kBAAkB,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,EACpE,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,EAChD,yBAAyB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,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 };
|