@vef-framework/core 1.0.128 → 1.0.130

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.
@@ -1,87 +1,2 @@
1
1
  "use strict";
2
- "use strict";
3
- function has(obj, property) {
4
- return Object.hasOwn(obj, property);
5
- }
6
- function getAt(obj, addr) {
7
- if (!obj || typeof obj !== "object") {
8
- return null;
9
- }
10
- const segments = addr.split(".");
11
- let o = obj;
12
- for (const i in segments) {
13
- const segment = segments[i];
14
- if (has(o, segment)) {
15
- o = o[segment];
16
- }
17
- if (+i === segments.length - 1) {
18
- return o;
19
- }
20
- if (!o || typeof o !== "object") {
21
- return null;
22
- }
23
- }
24
- return null;
25
- }
26
- function isQuotedString(str) {
27
- if (str[0] !== '"' && str[0] !== "'") {
28
- return false;
29
- }
30
- if (str[0] !== str[str.length - 1]) {
31
- return false;
32
- }
33
- const [quoteType] = str;
34
- for (let p = 1; p < str.length; p++) {
35
- if (str[p] === quoteType && (p === 1 || str[p - 1] !== "\\") && p !== str.length - 1) {
36
- return false;
37
- }
38
- }
39
- return true;
40
- }
41
- function parseArgs(str) {
42
- const args = [];
43
- let arg = "";
44
- let depth = 0;
45
- let quote = "";
46
- let lastChar = "";
47
- for (let p = 0; p < str.length; p++) {
48
- const char = str.charAt(p);
49
- if (char === quote && lastChar !== "\\") {
50
- quote = "";
51
- } else if ((char === "'" || char === '"') && !quote && lastChar !== "\\") {
52
- quote = char;
53
- } else if (char === "(" && !quote) {
54
- depth++;
55
- } else if (char === ")" && !quote) {
56
- depth--;
57
- }
58
- if (char === "," && !quote && depth === 0) {
59
- args.push(arg);
60
- arg = "";
61
- } else if (char !== " " || quote) {
62
- arg += char;
63
- }
64
- lastChar = char;
65
- }
66
- if (arg) {
67
- args.push(arg);
68
- }
69
- return args;
70
- }
71
- function rmEscapes(str) {
72
- if (!str.length) {
73
- return "";
74
- }
75
- let clean = "";
76
- let lastChar = "";
77
- for (let p = 0; p < str.length; p++) {
78
- const char = str.charAt(p);
79
- if (char !== "\\" || lastChar === "\\") {
80
- clean += char;
81
- }
82
- lastChar = char;
83
- }
84
- return clean;
85
- }
86
-
87
- export { getAt, has, isQuotedString, parseArgs, rmEscapes };
2
+ function i(t,u){return Object.hasOwn(t,u)}function s(t,u){if(!t||typeof t!="object")return null;const n=u.split(".");let o=t;for(const r in n){const l=n[r];if(i(o,l)&&(o=o[l]),+r===n.length-1)return o;if(!o||typeof o!="object")return null}return null}function f(t){if(t[0]!=='"'&&t[0]!=="'"||t[0]!==t[t.length-1])return!1;const[u]=t;for(let n=1;n<t.length;n++)if(t[n]===u&&(n===1||t[n-1]!=="\\")&&n!==t.length-1)return!1;return!0}function h(t){const u=[];let n="",o=0,r="",l="";for(let c=0;c<t.length;c++){const e=t.charAt(c);e===r&&l!=="\\"?r="":(e==="'"||e==='"')&&!r&&l!=="\\"?r=e:e==="("&&!r?o++:e===")"&&!r&&o--,e===","&&!r&&o===0?(u.push(n),n=""):(e!==" "||r)&&(n+=e),l=e}return n&&u.push(n),u}function g(t){if(!t.length)return"";let u="",n="";for(let o=0;o<t.length;o++){const r=t.charAt(o);(r!=="\\"||n==="\\")&&(u+=r),n=r}return u}export{s as getAt,i as has,f as isQuotedString,h as parseArgs,g as rmEscapes};
package/esm/index.js CHANGED
@@ -1,10 +1,2 @@
1
1
  "use strict";
2
- import './api/index.js';
3
- import './auth/index.js';
4
- export { compile } from './expr/compiler.js';
5
- export { ApiClient, createApiClient } from './api/api-client.js';
6
- export { useQueryErrorResetBoundary } from '@tanstack/react-query';
7
- export { ApiContextProvider, useApiContext } from './api/api-context.js';
8
- export { AuthContextProvider, useAuthContext } from './auth/auth-context.js';
9
-
10
- "use strict";
2
+ import"./api/index.js";import"./auth/index.js";import{compile as i}from"./expr/compiler.js";import{ApiClient as x,createApiClient as m}from"./api/api-client.js";import{useQueryErrorResetBoundary as n}from"@tanstack/react-query";import{ApiContextProvider as A,useApiContext as C}from"./api/api-context.js";import{AuthContextProvider as c,useAuthContext as d}from"./auth/auth-context.js";export{x as ApiClient,A as ApiContextProvider,c as AuthContextProvider,i as compile,m as createApiClient,C as useApiContext,d as useAuthContext,n as useQueryErrorResetBoundary};
@@ -1,29 +1,2 @@
1
1
  "use strict";
2
- "use strict";
3
- function createDispatcher() {
4
- const middlewares = [];
5
- let currentIndex = 0;
6
- const dispatcher = (middleware) => middlewares.push(middleware);
7
- const dispatch = (payload) => {
8
- const current = middlewares[currentIndex];
9
- if (typeof current === "function") {
10
- return current(payload, (explicitPayload) => {
11
- currentIndex++;
12
- return dispatch(explicitPayload);
13
- });
14
- }
15
- currentIndex = 0;
16
- return payload;
17
- };
18
- dispatcher.dispatch = dispatch;
19
- dispatcher.unshift = (middleware) => middlewares.unshift(middleware);
20
- dispatcher.remove = (middleware) => {
21
- const index = middlewares.indexOf(middleware);
22
- if (index > -1) {
23
- middlewares.splice(index, 1);
24
- }
25
- };
26
- return dispatcher;
27
- }
28
-
29
- export { createDispatcher as default };
2
+ function u(){const n=[];let c=0;const e=t=>n.push(t),i=t=>{const s=n[c];return typeof s=="function"?s(t,o=>(c++,i(o))):(c=0,t)};return e.dispatch=i,e.unshift=t=>n.unshift(t),e.remove=t=>{const s=n.indexOf(t);s>-1&&n.splice(s,1)},e}export{u as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/core",
3
3
  "type": "module",
4
- "version": "1.0.128",
4
+ "version": "1.0.130",
5
5
  "private": false,
6
6
  "description": "The core of the VEF framework",
7
7
  "author": "Venus",
@@ -27,7 +27,7 @@
27
27
  "use-sync-external-store": "^1.4.0",
28
28
  "@tanstack/react-query": "5.69.0",
29
29
  "@tanstack/react-router": "1.114.27",
30
- "@vef-framework/shared": "1.0.128",
30
+ "@vef-framework/shared": "1.0.130",
31
31
  "axios": "1.8.4",
32
32
  "qs": "6.14.0"
33
33
  },