@vef-framework/core 1.0.101 → 1.0.102
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/es/api/api-client.js +1 -544
- package/es/api/api-context.js +1 -95
- package/es/api/index.js +1 -5
- package/es/api/query-client.js +1 -31
- package/es/api/request-client.js +1 -244
- package/es/auth/auth-context.js +1 -36
- package/es/auth/index.js +1 -3
- package/es/expr/compiler.js +1 -300
- package/es/expr/helpers.js +1 -87
- package/es/index.js +1 -9
- package/es/middleware/dispatcher.js +1 -29
- package/lib/api/api-client.cjs +1 -549
- package/lib/api/api-context.cjs +1 -100
- package/lib/api/index.cjs +1 -20
- package/lib/api/query-client.cjs +1 -35
- package/lib/api/request-client.cjs +1 -249
- package/lib/auth/auth-context.cjs +1 -41
- package/lib/auth/index.cjs +1 -12
- package/lib/expr/compiler.cjs +1 -304
- package/lib/expr/helpers.cjs +1 -95
- package/lib/index.cjs +1 -27
- package/lib/middleware/dispatcher.cjs +1 -33
- package/package.json +2 -2
package/lib/expr/helpers.cjs
CHANGED
|
@@ -1,95 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
function has(obj, property) {
|
|
7
|
-
return Object.hasOwn(obj, property);
|
|
8
|
-
}
|
|
9
|
-
function getAt(obj, addr) {
|
|
10
|
-
if (!obj || typeof obj !== "object") {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
const segments = addr.split(".");
|
|
14
|
-
let o = obj;
|
|
15
|
-
for (const i in segments) {
|
|
16
|
-
const segment = segments[i];
|
|
17
|
-
if (has(o, segment)) {
|
|
18
|
-
o = o[segment];
|
|
19
|
-
}
|
|
20
|
-
if (+i === segments.length - 1) {
|
|
21
|
-
return o;
|
|
22
|
-
}
|
|
23
|
-
if (!o || typeof o !== "object") {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
function isQuotedString(str) {
|
|
30
|
-
if (str[0] !== '"' && str[0] !== "'") {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
if (str[0] !== str[str.length - 1]) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
const [quoteType] = str;
|
|
37
|
-
for (let p = 1; p < str.length; p++) {
|
|
38
|
-
if (str[p] === quoteType && (p === 1 || str[p - 1] !== "\\") && p !== str.length - 1) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
function parseArgs(str) {
|
|
45
|
-
const args = [];
|
|
46
|
-
let arg = "";
|
|
47
|
-
let depth = 0;
|
|
48
|
-
let quote = "";
|
|
49
|
-
let lastChar = "";
|
|
50
|
-
for (let p = 0; p < str.length; p++) {
|
|
51
|
-
const char = str.charAt(p);
|
|
52
|
-
if (char === quote && lastChar !== "\\") {
|
|
53
|
-
quote = "";
|
|
54
|
-
} else if ((char === "'" || char === '"') && !quote && lastChar !== "\\") {
|
|
55
|
-
quote = char;
|
|
56
|
-
} else if (char === "(" && !quote) {
|
|
57
|
-
depth++;
|
|
58
|
-
} else if (char === ")" && !quote) {
|
|
59
|
-
depth--;
|
|
60
|
-
}
|
|
61
|
-
if (char === "," && !quote && depth === 0) {
|
|
62
|
-
args.push(arg);
|
|
63
|
-
arg = "";
|
|
64
|
-
} else if (char !== " " || quote) {
|
|
65
|
-
arg += char;
|
|
66
|
-
}
|
|
67
|
-
lastChar = char;
|
|
68
|
-
}
|
|
69
|
-
if (arg) {
|
|
70
|
-
args.push(arg);
|
|
71
|
-
}
|
|
72
|
-
return args;
|
|
73
|
-
}
|
|
74
|
-
function rmEscapes(str) {
|
|
75
|
-
if (!str.length) {
|
|
76
|
-
return "";
|
|
77
|
-
}
|
|
78
|
-
let clean = "";
|
|
79
|
-
let lastChar = "";
|
|
80
|
-
for (let p = 0; p < str.length; p++) {
|
|
81
|
-
const char = str.charAt(p);
|
|
82
|
-
if (char !== "\\" || lastChar === "\\") {
|
|
83
|
-
clean += char;
|
|
84
|
-
}
|
|
85
|
-
lastChar = char;
|
|
86
|
-
}
|
|
87
|
-
return clean;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
exports.getAt = getAt;
|
|
91
|
-
exports.has = has;
|
|
92
|
-
exports.isQuotedString = isQuotedString;
|
|
93
|
-
exports.parseArgs = parseArgs;
|
|
94
|
-
exports.rmEscapes = rmEscapes;
|
|
95
|
-
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
1
|
+
"use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:57.455Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function has(obj,property){return Object.hasOwn(obj,property)}function getAt(obj,addr){if(!obj||typeof obj!="object")return null;const segments=addr.split(".");let o=obj;for(const i in segments){const segment=segments[i];if(has(o,segment)&&(o=o[segment]),+i===segments.length-1)return o;if(!o||typeof o!="object")return null}return null}function isQuotedString(str){if(str[0]!=='"'&&str[0]!=="'"||str[0]!==str[str.length-1])return!1;const[quoteType]=str;for(let p=1;p<str.length;p++)if(str[p]===quoteType&&(p===1||str[p-1]!=="\\")&&p!==str.length-1)return!1;return!0}function parseArgs(str){const args=[];let arg="",depth=0,quote="",lastChar="";for(let p=0;p<str.length;p++){const char=str.charAt(p);char===quote&&lastChar!=="\\"?quote="":(char==="'"||char==='"')&&!quote&&lastChar!=="\\"?quote=char:char==="("&&!quote?depth++:char===")"&&!quote&&depth--,char===","&&!quote&&depth===0?(args.push(arg),arg=""):(char!==" "||quote)&&(arg+=char),lastChar=char}return arg&&args.push(arg),args}function rmEscapes(str){if(!str.length)return"";let clean="",lastChar="";for(let p=0;p<str.length;p++){const char=str.charAt(p);(char!=="\\"||lastChar==="\\")&&(clean+=char),lastChar=char}return clean}exports.getAt=getAt,exports.has=has,exports.isQuotedString=isQuotedString,exports.parseArgs=parseArgs,exports.rmEscapes=rmEscapes;/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/lib/index.cjs
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
require('./api/index.cjs');
|
|
7
|
-
require('./auth/index.cjs');
|
|
8
|
-
const compiler = require('./expr/compiler.cjs');
|
|
9
|
-
const apiClient = require('./api/api-client.cjs');
|
|
10
|
-
const reactQuery = require('@tanstack/react-query');
|
|
11
|
-
const apiContext = require('./api/api-context.cjs');
|
|
12
|
-
const authContext = require('./auth/auth-context.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.compile = compiler.compile;
|
|
17
|
-
exports.ApiClient = apiClient.ApiClient;
|
|
18
|
-
exports.createApiClient = apiClient.createApiClient;
|
|
19
|
-
Object.defineProperty(exports, "useQueryErrorResetBoundary", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: () => reactQuery.useQueryErrorResetBoundary
|
|
22
|
-
});
|
|
23
|
-
exports.ApiContextProvider = apiContext.ApiContextProvider;
|
|
24
|
-
exports.useApiContext = apiContext.useApiContext;
|
|
25
|
-
exports.AuthContextProvider = authContext.AuthContextProvider;
|
|
26
|
-
exports.useAuthContext = authContext.useAuthContext;
|
|
27
|
-
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
1
|
+
"use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:57.455Z, made by Venus. */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./api/index.cjs"),require("./auth/index.cjs");const compiler=require("./expr/compiler.cjs"),apiClient=require("./api/api-client.cjs"),reactQuery=require("@tanstack/react-query"),apiContext=require("./api/api-context.cjs"),authContext=require("./auth/auth-context.cjs");exports.compile=compiler.compile,exports.ApiClient=apiClient.ApiClient,exports.createApiClient=apiClient.createApiClient,Object.defineProperty(exports,"useQueryErrorResetBoundary",{enumerable:!0,get:()=>reactQuery.useQueryErrorResetBoundary}),exports.ApiContextProvider=apiContext.ApiContextProvider,exports.useApiContext=apiContext.useApiContext,exports.AuthContextProvider=authContext.AuthContextProvider,exports.useAuthContext=authContext.useAuthContext;/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
5
|
-
|
|
6
|
-
function createDispatcher() {
|
|
7
|
-
const middlewares = [];
|
|
8
|
-
let currentIndex = 0;
|
|
9
|
-
const dispatcher = (middleware) => middlewares.push(middleware);
|
|
10
|
-
const dispatch = (payload) => {
|
|
11
|
-
const current = middlewares[currentIndex];
|
|
12
|
-
if (typeof current === "function") {
|
|
13
|
-
return current(payload, (explicitPayload) => {
|
|
14
|
-
currentIndex++;
|
|
15
|
-
return dispatch(explicitPayload);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
currentIndex = 0;
|
|
19
|
-
return payload;
|
|
20
|
-
};
|
|
21
|
-
dispatcher.dispatch = dispatch;
|
|
22
|
-
dispatcher.unshift = (middleware) => middlewares.unshift(middleware);
|
|
23
|
-
dispatcher.remove = (middleware) => {
|
|
24
|
-
const index = middlewares.indexOf(middleware);
|
|
25
|
-
if (index > -1) {
|
|
26
|
-
middlewares.splice(index, 1);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
return dispatcher;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
exports.default = createDispatcher;
|
|
33
|
-
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
1
|
+
"use strict";/*! VefFramework version: 1.0.102, build time: 2025-03-07T16:32:57.455Z, made by Venus. */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function createDispatcher(){const middlewares=[];let currentIndex=0;const dispatcher=middleware=>middlewares.push(middleware),dispatch=payload=>{const current=middlewares[currentIndex];return typeof current=="function"?current(payload,explicitPayload=>(currentIndex++,dispatch(explicitPayload))):(currentIndex=0,payload)};return dispatcher.dispatch=dispatch,dispatcher.unshift=middleware=>middlewares.unshift(middleware),dispatcher.remove=middleware=>{const index=middlewares.indexOf(middleware);index>-1&&middlewares.splice(index,1)},dispatcher}exports.default=createDispatcher;/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.102",
|
|
5
5
|
"private": false,
|
|
6
6
|
"packageManager": "pnpm@9.15.0",
|
|
7
7
|
"description": "The core of the VEF framework",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"use-sync-external-store": "^1.4.0",
|
|
37
37
|
"@tanstack/react-query": "5.67.1",
|
|
38
38
|
"@tanstack/react-router": "1.112.18",
|
|
39
|
-
"@vef-framework/shared": "1.0.
|
|
39
|
+
"@vef-framework/shared": "1.0.102",
|
|
40
40
|
"axios": "1.8.2",
|
|
41
41
|
"qs": "6.14.0"
|
|
42
42
|
},
|